Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
07-19-2011, 01:04 PM #1
- Join Date
- Jul 2011
- Thanked 0 Times in 0 Posts
Problem with BigInt.js , not performing subtraction on bigninteger numbers
Following are some of the interfaces provided by this plugin:
// x = new BigInt("1234567890123456789012345678901234567890");
// y = new BigInt("0x123456789abcdef0123456789abcdef0");
// z = x.clone();
// z = bigint_uminus(x);
// z = bigint_plus(x, y);
// z = bigint_minus(x, y);
// z = bigint_mul(x, y);
// z = bigint_div(x, y);
// z = bigint_mod(x, y);
// cmp = bigint_cmp(x, y); /* return -1, 0, or 1 */
// num = bigint_number(x); /* convert normal number (may be floating) */
From the above interfaces , I just need to use bigint_plus and bigint_minus functions for my code.
But bigint_minus is not returning the proper subtraction for two big integers.
Attached is the BigInt.txt file , before using please rename the file to BigInt.js.apart from bigint_minus functions other functions are working fine for me.
Please let me know what is the problem with bigint_minus() function.