Log In  

Even simpler: PRINT(-1) will print -0.99999

P#10143 2015-04-23 08:14 ( Edited 2015-04-23 20:06)

That explains why I was confused when testing an undocumented (although it exists in jelpi.p8) math function sgn(x) which returns -1 or 1 based on the sign of the number. In other languages its supposed to also return 0 but trying sgn(0) returns 1 at the moment. Either way, i was testing in the console via print and I was also seeing -0.99999 instead of -1

P#10155 2015-04-23 16:06 ( Edited 2015-04-23 20:06)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 01:01:33 | 0.005s | Q:9