    FOREIGN MODULE java_math;

    IMPORT
        java_lang,
        java_io,
        java_util;

    TYPE

      BigDecimal* = POINTER TO EXTENSIBLE RECORD (java_lang.Number + java_lang.Comparable)
                    STATIC
                      ROUND_UP* = 0;
                      ROUND_DOWN* = 1;
                      ROUND_CEILING* = 2;
                      ROUND_FLOOR* = 3;
                      ROUND_HALF_UP* = 4;
                      ROUND_HALF_DOWN* = 5;
                      ROUND_HALF_EVEN* = 6;
                      ROUND_UNNECESSARY* = 7;
                      PROCEDURE Init*(p0 : REAL) : BigDecimal,CONSTRUCTOR;
                      PROCEDURE Init*(p0 : java_lang.String) : BigDecimal,CONSTRUCTOR;
                      PROCEDURE Init*(p0 : BigInteger) : BigDecimal,CONSTRUCTOR;
                      PROCEDURE Init*(p0 : BigInteger;
                                      p1 : INTEGER) : BigDecimal,CONSTRUCTOR;
                      PROCEDURE valueOf*(p0 : LONGINT) : BigDecimal;
                      PROCEDURE valueOf*(p0 : LONGINT;
                                         p1 : INTEGER) : BigDecimal;
                    END;

      BigInteger* = POINTER TO EXTENSIBLE RECORD (java_lang.Number + java_lang.Comparable)
                    STATIC
                      ZERO* : BigInteger;
                      ONE* : BigInteger;
                      PROCEDURE Init*(p0 : INTEGER;
                                      p1 : INTEGER;
                                      p2 : java_util.Random) : BigInteger,CONSTRUCTOR;
                      PROCEDURE Init*(p0 : INTEGER;
                                      p1 : java_util.Random) : BigInteger,CONSTRUCTOR;
                      PROCEDURE Init*(    p0 : INTEGER;
                                      IN  p1 : ARRAY OF BYTE) : BigInteger,CONSTRUCTOR;
                      PROCEDURE Init*(p0 : java_lang.String) : BigInteger,CONSTRUCTOR;
                      PROCEDURE Init*(p0 : java_lang.String;
                                      p1 : INTEGER) : BigInteger,CONSTRUCTOR;
                      PROCEDURE Init*(IN  p0 : ARRAY OF BYTE) : BigInteger,CONSTRUCTOR;
                      PROCEDURE valueOf*(p0 : LONGINT) : BigInteger;
                    END;

    PROCEDURE (self:BigDecimal) abs*() : BigDecimal,NEW,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) add*(p0 : BigDecimal) : BigDecimal,NEW,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) compareTo*(p0 : java_lang.Object) : INTEGER,NEW,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) compareTo*(p0 : BigDecimal) : INTEGER,NEW,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) divide*(p0 : BigDecimal;
                                        p1 : INTEGER) : BigDecimal,NEW,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) divide*(p0 : BigDecimal;
                                        p1 : INTEGER;
                                        p2 : INTEGER) : BigDecimal,NEW,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) doubleValue*() : REAL,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) equals*(p0 : java_lang.Object) : BOOLEAN,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) floatValue*() : SHORTREAL,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) hashCode*() : INTEGER,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) intValue*() : INTEGER,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) longValue*() : LONGINT,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) max*(p0 : BigDecimal) : BigDecimal,NEW,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) min*(p0 : BigDecimal) : BigDecimal,NEW,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) movePointLeft*(p0 : INTEGER) : BigDecimal,NEW,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) movePointRight*(p0 : INTEGER) : BigDecimal,NEW,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) multiply*(p0 : BigDecimal) : BigDecimal,NEW,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) negate*() : BigDecimal,NEW,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) scale*() : INTEGER,NEW,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) setScale*(p0 : INTEGER) : BigDecimal,NEW,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) setScale*(p0 : INTEGER;
                                          p1 : INTEGER) : BigDecimal,NEW,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) signum*() : INTEGER,NEW,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) subtract*(p0 : BigDecimal) : BigDecimal,NEW,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) toBigInteger*() : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) toString*() : java_lang.String,EXTENSIBLE;

    PROCEDURE (self:BigDecimal) unscaledValue*() : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) abs*() : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) add*(p0 : BigInteger) : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) and*(p0 : BigInteger) : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) andNot*(p0 : BigInteger) : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) bitCount*() : INTEGER,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) bitLength*() : INTEGER,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) clearBit*(p0 : INTEGER) : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) compareTo*(p0 : java_lang.Object) : INTEGER,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) compareTo*(p0 : BigInteger) : INTEGER,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) divide*(p0 : BigInteger) : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) divideAndRemainder*(p0 : BigInteger) : POINTER TO ARRAY OF BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) doubleValue*() : REAL,EXTENSIBLE;

    PROCEDURE (self:BigInteger) equals*(p0 : java_lang.Object) : BOOLEAN,EXTENSIBLE;

    PROCEDURE (self:BigInteger) flipBit*(p0 : INTEGER) : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) floatValue*() : SHORTREAL,EXTENSIBLE;

    PROCEDURE (self:BigInteger) gcd*(p0 : BigInteger) : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) getLowestSetBit*() : INTEGER,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) hashCode*() : INTEGER,EXTENSIBLE;

    PROCEDURE (self:BigInteger) intValue*() : INTEGER,EXTENSIBLE;

    PROCEDURE (self:BigInteger) isProbablePrime*(p0 : INTEGER) : BOOLEAN,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) longValue*() : LONGINT,EXTENSIBLE;

    PROCEDURE (self:BigInteger) max*(p0 : BigInteger) : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) min*(p0 : BigInteger) : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) mod*(p0 : BigInteger) : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) modInverse*(p0 : BigInteger) : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) modPow*(p0 : BigInteger;
                                        p1 : BigInteger) : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) multiply*(p0 : BigInteger) : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) negate*() : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) not*() : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) or*(p0 : BigInteger) : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) pow*(p0 : INTEGER) : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) remainder*(p0 : BigInteger) : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) setBit*(p0 : INTEGER) : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) shiftLeft*(p0 : INTEGER) : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) shiftRight*(p0 : INTEGER) : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) signum*() : INTEGER,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) subtract*(p0 : BigInteger) : BigInteger,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) testBit*(p0 : INTEGER) : BOOLEAN,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) toByteArray*() : POINTER TO ARRAY OF BYTE,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) toString*() : java_lang.String,EXTENSIBLE;

    PROCEDURE (self:BigInteger) toString*(p0 : INTEGER) : java_lang.String,NEW,EXTENSIBLE;

    PROCEDURE (self:BigInteger) xor*(p0 : BigInteger) : BigInteger,NEW,EXTENSIBLE;

    END java_math.