Ad
  • Custom User Avatar

    Approved.

  • Custom User Avatar

    Great suggestion! I've adjusted the description for now, however, I feel like it could use some clarification (eg: Use whatever the language's primitive int type's max value is (or its equivalent)? Or opt for the biggest possible integer type?). Input is welcome!

  • Custom User Avatar

    It seems that the author has not updated the description yet...

    That change was reverted, as was noted in a later comment in that chain. The tests for other languages also only go up to 2**53-1. ^

    I seem to have missed the test case for 9223372036854775808ull when looking through your C code and approved it. I've removed said test case now, at a quick glance I think the random tests can also go above 2**53-1 (specifically ntest = ge_uint(150u, 200u); would give pretty large numbers if those are the exponents)? (I'm not too familiar with C though)

  • Custom User Avatar

    Approved.

  • Custom User Avatar

    Approved.

  • Custom User Avatar

    Valid point, I've reverted the description. Let's just have Number.MAX_SAFE_INTEGER as an arbitrary limit for simplicity's sake then. I did add a note about not needing to manually validate input however.

  • Custom User Avatar

    Although there's no specific tests for BigInt types, I did end up changing the description to "any finite positive integer greater than 0". Thanks for your feedback!

  • Custom User Avatar

    Thank you for your input! I've adjusted the description accordingly.

  • Custom User Avatar

    I've added a set of random tests now. Each one generates a set of random powers of 2 and passes the sum of them onto the powers function. I believe this should be sufficient.