Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    Jul 2011
    Thanked 0 Times in 0 Posts

    Unhappy Problem with BigInt.js , not performing subtraction on bigninteger numbers


    I am using BigInt.js javascript package for performing arithmetic operations on
    biginteger numbers.

    Following are some of the interfaces provided by this plugin:

    // Interfaces:
    // 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.


    Attached Files Attached Files


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts