Code example for BigInteger

Methods: add

0
 
    public static PyObject newSigned64(long value) {
        return Py.newInteger(value);
    } 
 
    private static final BigInteger UINT64_BASE = BigInteger.valueOf(Long.MAX_VALUE).add(BigInteger.ONE);
    public static PyObject newUnsigned64(long value) {
        return value < 0
                ? Py.newLong(BigInteger.valueOf(value & 0x7fffffffffffffffL).add(UINT64_BASE))
                : Py.newInteger(value);
    } 
 
    public static PyObject newFloat32(int value) {
        return Py.newFloat(Float.intBitsToFloat(value));
    } 
 
    public static PyObject newFloat32(long value) {
        return Py.newFloat(Float.intBitsToFloat((int) value));
    } 
 
    public static PyObject newFloat64(long value) {