diff options
Diffstat (limited to 'libjava/gnu/java/math')
-rw-r--r-- | libjava/gnu/java/math/Fixed.h | 44 | ||||
-rw-r--r-- | libjava/gnu/java/math/GMP.h | 125 | ||||
-rw-r--r-- | libjava/gnu/java/math/MPN.h | 57 |
3 files changed, 226 insertions, 0 deletions
diff --git a/libjava/gnu/java/math/Fixed.h b/libjava/gnu/java/math/Fixed.h new file mode 100644 index 000000000..18f522e9c --- /dev/null +++ b/libjava/gnu/java/math/Fixed.h @@ -0,0 +1,44 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_math_Fixed__ +#define __gnu_java_math_Fixed__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace math + { + class Fixed; + } + } + } +} + +class gnu::java::math::Fixed : public ::java::lang::Object +{ + + Fixed(); +public: + static jint div(jint, jint, jint); + static jint mul(jint, jint, jint); + static jint ceil(jint, jint); + static jint floor(jint, jint); + static jint trunc(jint, jint); + static jint round(jint, jint); + static jfloat floatValue(jint, jint); + static jdouble doubleValue(jint, jint); + static jint fixedValue(jint, jfloat); + static jint fixedValue(jint, jdouble); + static jint intValue(jint, jint); + static jint roundIntValue(jint, jint); + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_math_Fixed__ diff --git a/libjava/gnu/java/math/GMP.h b/libjava/gnu/java/math/GMP.h new file mode 100644 index 000000000..b038f1004 --- /dev/null +++ b/libjava/gnu/java/math/GMP.h @@ -0,0 +1,125 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_math_GMP__ +#define __gnu_java_math_GMP__ + +#pragma interface + +#include <java/lang/Object.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace classpath + { + class Pointer; + } + namespace java + { + namespace math + { + class GMP; + } + } + } +} + +class gnu::java::math::GMP : public ::java::lang::Object +{ + +public: + GMP(); +private: + void acquireRef(); + void releaseRef(); +public: // actually protected + void finalize(); +public: + void fromByteArray(JArray< jbyte > *); + void fromBI(::gnu::java::math::GMP *); + void fromLong(jlong); + jint fromString(::java::lang::String *, jint); + void fromSignedMagnitude(JArray< jbyte > *, jboolean); + ::java::lang::String * toString(jint); + void toByteArray(JArray< jbyte > *); + jdouble doubleValue(); + jint absIntValue(); + jint compare(::gnu::java::math::GMP *); + void add(::gnu::java::math::GMP *, ::gnu::java::math::GMP *); + void subtract(::gnu::java::math::GMP *, ::gnu::java::math::GMP *); + void multiply(::gnu::java::math::GMP *, ::gnu::java::math::GMP *); + void quotient(::gnu::java::math::GMP *, ::gnu::java::math::GMP *); + void remainder(::gnu::java::math::GMP *, ::gnu::java::math::GMP *); + void quotientAndRemainder(::gnu::java::math::GMP *, ::gnu::java::math::GMP *, ::gnu::java::math::GMP *); + void modulo(::gnu::java::math::GMP *, ::gnu::java::math::GMP *); + void pow(jint, ::gnu::java::math::GMP *); + void modPow(::gnu::java::math::GMP *, ::gnu::java::math::GMP *, ::gnu::java::math::GMP *); + void modInverse(::gnu::java::math::GMP *, ::gnu::java::math::GMP *); + void gcd(::gnu::java::math::GMP *, ::gnu::java::math::GMP *); + void shiftLeft(jint, ::gnu::java::math::GMP *); + void shiftRight(jint, ::gnu::java::math::GMP *); + void abs(::gnu::java::math::GMP *); + void negate(::gnu::java::math::GMP *); + jint bitLength(); + jint bitCount(); + void and$(::gnu::java::math::GMP *, ::gnu::java::math::GMP *); + void or$(::gnu::java::math::GMP *, ::gnu::java::math::GMP *); + void xor$(::gnu::java::math::GMP *, ::gnu::java::math::GMP *); + void andNot(::gnu::java::math::GMP *, ::gnu::java::math::GMP *); + void not$(::gnu::java::math::GMP *); + void flipBit(jint, ::gnu::java::math::GMP *); + jint testBit(jint); + void setBit(jint, jboolean, ::gnu::java::math::GMP *); + jint testPrimality(jint); + jint lowestSetBit(); + static void natInitializeLibrary(); +private: + void natInitialize(); + void natFinalize(); + void natFromLong(jlong); + void natFromBI(::gnu::classpath::Pointer *); + void natFromByteArray(JArray< jbyte > *); + jint natFromString(::java::lang::String *, jint); + void natFromSignedMagnitude(JArray< jbyte > *, jboolean); + ::java::lang::String * natToString(jint); + void natToByteArray(JArray< jbyte > *); + jint natAbsIntValue(); + jdouble natDoubleValue(); + jint natCompare(::gnu::classpath::Pointer *); + void natAdd(::gnu::classpath::Pointer *, ::gnu::classpath::Pointer *); + void natSubtract(::gnu::classpath::Pointer *, ::gnu::classpath::Pointer *); + void natMultiply(::gnu::classpath::Pointer *, ::gnu::classpath::Pointer *); + void natQuotient(::gnu::classpath::Pointer *, ::gnu::classpath::Pointer *); + void natRemainder(::gnu::classpath::Pointer *, ::gnu::classpath::Pointer *); + void natQuotientAndRemainder(::gnu::classpath::Pointer *, ::gnu::classpath::Pointer *, ::gnu::classpath::Pointer *); + void natModulo(::gnu::classpath::Pointer *, ::gnu::classpath::Pointer *); + void natPow(jint, ::gnu::classpath::Pointer *); + void natModPow(::gnu::classpath::Pointer *, ::gnu::classpath::Pointer *, ::gnu::classpath::Pointer *); + void natModInverse(::gnu::classpath::Pointer *, ::gnu::classpath::Pointer *); + void natGCD(::gnu::classpath::Pointer *, ::gnu::classpath::Pointer *); + jint natTestPrimality(jint); + void natShiftLeft(jint, ::gnu::classpath::Pointer *); + void natShiftRight(jint, ::gnu::classpath::Pointer *); + jint natLowestSetBit(); + void natAbs(::gnu::classpath::Pointer *); + void natNegate(::gnu::classpath::Pointer *); + jint natBitLength(); + jint natSetBitCount(); + void natXor(::gnu::classpath::Pointer *, ::gnu::classpath::Pointer *); + void natOr(::gnu::classpath::Pointer *, ::gnu::classpath::Pointer *); + void natAnd(::gnu::classpath::Pointer *, ::gnu::classpath::Pointer *); + void natAndNot(::gnu::classpath::Pointer *, ::gnu::classpath::Pointer *); + void natFlipBit(jint, ::gnu::classpath::Pointer *); + jint natTestBit(jint); + void natSetBit(jint, jboolean, ::gnu::classpath::Pointer *); + void natNot(::gnu::classpath::Pointer *); + ::gnu::classpath::Pointer * __attribute__((aligned(__alignof__( ::java::lang::Object)))) native_ptr; + jint refCount; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_math_GMP__ diff --git a/libjava/gnu/java/math/MPN.h b/libjava/gnu/java/math/MPN.h new file mode 100644 index 000000000..50289abae --- /dev/null +++ b/libjava/gnu/java/math/MPN.h @@ -0,0 +1,57 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_math_MPN__ +#define __gnu_java_math_MPN__ + +#pragma interface + +#include <java/lang/Object.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace math + { + class MPN; + } + } + } +} + +class gnu::java::math::MPN : public ::java::lang::Object +{ + +public: + MPN(); + static jint add_1(JArray< jint > *, JArray< jint > *, jint, jint); + static jint add_n(JArray< jint > *, JArray< jint > *, JArray< jint > *, jint); + static jint sub_n(JArray< jint > *, JArray< jint > *, JArray< jint > *, jint); + static jint mul_1(JArray< jint > *, JArray< jint > *, jint, jint); + static void mul(JArray< jint > *, JArray< jint > *, jint, JArray< jint > *, jint); + static jlong udiv_qrnnd(jlong, jint); + static jint divmod_1(JArray< jint > *, JArray< jint > *, jint, jint); + static jint submul_1(JArray< jint > *, jint, JArray< jint > *, jint, jint); + static void divide(JArray< jint > *, jint, JArray< jint > *, jint); + static jint chars_per_word(jint); + static jint count_leading_zeros(jint); + static jint set_str(JArray< jint > *, JArray< jbyte > *, jint, jint); + static jint cmp(JArray< jint > *, JArray< jint > *, jint); + static jint cmp(JArray< jint > *, jint, JArray< jint > *, jint); + static jint rshift(JArray< jint > *, JArray< jint > *, jint, jint, jint); + static void rshift0(JArray< jint > *, JArray< jint > *, jint, jint, jint); + static jlong rshift_long(JArray< jint > *, jint, jint); + static jint lshift(JArray< jint > *, jint, JArray< jint > *, jint, jint); + static jint findLowestBit(jint); + static jint findLowestBit(JArray< jint > *); + static jint gcd(JArray< jint > *, JArray< jint > *, jint); + static jint intLength(jint); + static jint intLength(JArray< jint > *, jint); + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_math_MPN__ |