Flaw in floating point (fixed)


#1

Hi
I think I found a flaw in the floating point.
Try this for example :
(+ 69.5 0.5)
it returns 6.0 instead of 60
You can try other numbers ending on 0.5 they give the same error.
Can anyone confirm this ?
For David : I’m using the 2.5 beta version with the sdcard support

Thanks
Ronny


#2

Confirmed. I’ll investigate.


#3

Thanks ,

I found this several weeks ago , but first i thought I did something wrong
I think that the internal result is correct , but the output is wrong
I use floating point to calculate the julian day , and to calculate the phase of the moon
the phase of the moon is ok , but the julian day is reported wrong on this day.
I had the same problem on januari the 1st

Hope this helps a bit .

Regards,
Ronny


#6

#7

#8

This is fixed by Version 2.5c for the ARM, ESP, or STM32 versions of uLisp. The AVR and MSP430 versions weren’t affected.


#9