![]() |
|
Sometimes it just goes crazy - Printable Version +- Boriel Basic Forum (https://forum.boriel.com) +-- Forum: Compilers and Computer Languages (https://forum.boriel.com/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://forum.boriel.com/forumdisplay.php?fid=11) +---- Forum: Bug Reports (https://forum.boriel.com/forumdisplay.php?fid=15) +---- Thread: Sometimes it just goes crazy (/showthread.php?tid=162) |
Sometimes it just goes crazy - britlion - 2010-02-20 I was having trouble with a variable not being where I expected. In the end, I have this code: Code: FUNCTION SINE(num as FIXED) as FIXEDSo num is a fixed, and the skipped code makes it 0<=num<=90 The routine prints out for those two: 0.35554504...... 23301 Now, I'm thinking that INT(0.35) is 0. The compiler landed about 23,000 too high on that one. Any idea why? Re: Sometimes it just goes crazy - boriel - 2010-03-03 britlion Wrote:I was having trouble with a variable not being where I expected. In the end, I have this code: It seems to be an overflow due to the bug of the INT(<fixed value>), which is now fixed. Read the INT bug thread and download the latest version, and compile this code with it, to test if it is solved or not. |