You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, I noticed on the Janet samples for Rosetta Code factorial, any of them with a factorial of 1e3 would give a return value of "inf" (not correct).
As I began to play with large numbers (I assume these are all floats and not actually ints at all) I observe some logical incorrectness:
it would appear after some precision point anything afterwards is disregarded, resulting in false comparison results.
I think bignum should be handled in a separate module or package, or baked in for non-float based numbers (no decimal points), or else numbers exceeding the precision that can be properly handled should trigger errors.
What do you think?
The text was updated successfully, but these errors were encountered:
Janet numbers are IEEE754 double precision floating point numbers, and as such follow al of the semantics these numbers obey. Which includes limited precision. This will not change.
Edit: This includes on parsing - there is no plan to parse large numbers or extremely precise numbers into a different number type.
First off, I noticed on the Janet samples for Rosetta Code factorial, any of them with a factorial of 1e3 would give a return value of "inf" (not correct).
As I began to play with large numbers (I assume these are all floats and not actually ints at all) I observe some logical incorrectness:
a large number that isn't actually "inf" can't be equal to itself + 1
@bakpakin ^ any idea?
it would appear after some precision point anything afterwards is disregarded, resulting in false comparison results.
I think bignum should be handled in a separate module or package, or baked in for non-float based numbers (no decimal points), or else numbers exceeding the precision that can be properly handled should trigger errors.
What do you think?
The text was updated successfully, but these errors were encountered: