newLISP Fan Club

Forum => newLISP in the real world => Topic started by: HPW on September 05, 2006, 11:09:56 PM

Title: Big integers?
Post by: HPW on September 05, 2006, 11:09:56 PM

newLISP v.8.9.8 on Win32 MinGW.

> (/ 951984987716899 2)
-1551688047
> (setq a 951984987716899)
1191591203
> (setq a 951984987716899.0)
9.519849877e+014
> (int 951984987716899.0)
1191591203


Doc: Integers larger than 9,223,372,036,854,775,807 are truncated to 9,223,372,036,854,775,807. Integers smaller than -9,223,372,036,854,775,808 are truncated to -9,223,372,036,854,775,808.



What do I wrong?
Title:
Post by: cormullion on September 06, 2006, 12:56:53 AM
These look correct (although my eyes go funny when I look at them...:-):


newLISP v.8.9.8 on OSX UTF-8, execute 'newlisp -h' for more info.
> (/ 951984987716899 2)
475992493858449
>  (setq a 951984987716899)
951984987716899
> (setq a 951984987716899.0)
9.519849877e+14
> (int 951984987716899.0)
951984987716899
>


so there's something odd.
Title:
Post by: HPW on September 06, 2006, 02:13:17 AM
So it seems to be a Win32 MinGW bug.

;-(
Title:
Post by: Lutz on September 06, 2006, 04:45:27 AM
Yes, there is definitely a problem with the new 64Bit stuff on Win32 MinGW, I will investigate.



Lutz
Title:
Post by: Lutz on September 06, 2006, 08:04:00 AM
Fortunately this was only a display problem with ints on Win32,  fixed in development version 8.9.9. See announcement in news section.



Lutz