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 of negative `Int`s #194
Comments
TheSeamau5
referenced this issue
Mar 12, 2015
Closed
Changed return type of exponentiation operator #197
This was referenced Mar 16, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
evancz
Sep 22, 2016
Member
Consolidated all the math related stuff into the #721 meta issue. Follow along there!
|
Consolidated all the math related stuff into the #721 meta issue. Follow along there! |
evancz
closed this
Sep 22, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
yjchoe commentedMar 11, 2015
Hello,
I recently noticed that exponentiation of negative
Ints can result in non-integral numbers with the typeInt. For example:So, for instance, I could produce the following error on my
elm-replsession:I think
0.25being anIntmakes little sense, but I am not sure what would be the appropriate fix for this. The options I can think of are returning anumber, returning aFloat, and making such expressions illegal. The current implementation of(^)simply calls a native JS function and has typenumber -> number -> number.