odd behavior of ^

BlitzMax Forums/BlitzMax Programming/odd behavior of ^

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Still not sure why the compiler doesn't use an int version of ^ if both numbers are ints (the result will NEVER be a float) or at least offer an int version...

"2 to power of 3 = 7.9999999999999982"
This is totally incorrect. 2 to the power of 3 is 8.

Period.

2.0 to the power of 3.0, on the other hand, could be interpreted that way with the limitations of binary floating point representation.

Russell