What ??? A math bug in my BB2D ???
BlitzPlus Forums/BlitzPlus Programming/What ??? A math bug in my BB2D ???
| ||
Try this, it's a strange result, no ?Print (1+(1/32)) ( I've got the last update ) |
| ||
Haven't got Blitz2D installed but I get the same (correct) result in Blitz3D and BlitzPlus - "1". |
| ||
Umm, you didn't write what your result was. I get "1" (Blitz3D). Seems normal to me. |
| ||
1/32 is probably 0 1+0 is 1 If you change it to: Print (1+(1.0/32)) You will get something more useful. |
| ||
Isn't it because you haven't defined any variable output types and since no decimal places are being used in the argument blitz automatically assumes the answer will be an int? So 1.03125 is stripped down to 1. |
| ||
yes, you're right Enay, if there no float in argument, Blitz will consider it with an Int result. |