Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upExponentiation (^) can break Int/Float type safety #529
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
|
Closing as a duplicate. |
jvoigtlaender
closed this
Mar 18, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
mgold
Mar 18, 2016
Contributor
I looked for if this had already been reported... where's the original?
|
I looked for if this had already been reported... where's the original? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
|
Ok thanks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mgold commentedMar 18, 2016
Currently, exponentiation
(^) : number -> number -> number. A negative integer power will yield a float, producing a float value typed as an Int.toFloat bad == 0.001which can cause all kinds of havoc.Perhaps the return value should be changed from
numbertoFloat.