Open itssumertime opened 10 years ago
Yesss. Admittedly this is a JS problem. See also #390 :)
Actually @itssumertime Do you know if this is a display issue or an calculations?
Numbers in JS are double-precision, which should be fine for most projects..I hope.
My students were using super large numbers that had more than 16 digits in them and doing modular math with them (for an RSA project), and when I asked what they did, they responded with "I am fairly sure it drops everything after the 16th digit to a 0. We haven't tried since we first started out, so I can't be 100% sure, but I believe what was happening was that the mods were coming back as 0 mod 2".
I think it means that the rough size of the number stayed but actual precise end digits were getting dropped.
Actually, he updated me and said that it does return incorrect calculations past a certain point and then "NaN" past another point, but it does seem to retain beyond 16 when checked with Wolfram|Alpha.
So I think you're right @cycomachead
Ah, ok. Gotcha. So bignums are something we should have in Snap! :)
Some students have math intensive projects that would greatly improve with greater digit precision. Some examples are RSA encryption and graphing calculators created in Snap.