Code: Select all
newLISP v.10.6.0 64-bit on OSX IPv4/6 UTF-8 libffi, options: newlisp -h
> (flt -0.8)
0
Code: Select all
newLISP v.10.6.0 32-bit on Win32 IPv4/6 libffi, options: newlisp -h
> (flt -0.8)
-1085485875
Btw, in Java:
Code: Select all
Float.floatToIntBits(-0.8f)
Is this different behavior "intended"? (I know Mac is 64-bit and Win is 32-bit)
However, how could I get the same result on my Mac? I tried several things but I had no success.
While experimenting I found also this:
Code: Select all
newLISP v.10.6.0 32-bit on Win32 IPv4/6 libffi, options: newlisp -h
> (format "%f" -0.8)
"-0.800000"
Code: Select all
newLISP v.10.6.0 64-bit on OSX IPv4/6 UTF-8 libffi, options: newlisp -h
> (format "%f" -0.8)
ERR: mismatch in number of arguments in function format : .8
>
Stefan