newLISP Fan Club

Forum => Anything else we might add? => Topic started by: alex on March 21, 2006, 04:03:50 AM

Title: (+) and (inc)
Post by: alex on March 21, 2006, 04:03:50 AM
(+) and (inc)
newLISP v.8.8.0 on Win32 MinGW, execute 'newlisp -h' for more info.

> (setq num 2147483646)
2147483646
> (+ num 5)
-2147483645
> (inc 'num 5)
2147483651
>

Why?
Title:
Post by: cormullion on March 21, 2006, 04:42:56 AM
Could it be that:


QuoteIf num is supplied, inc always returns the result as floating point even for integer input arguments.


I notice that

(add num 5)


also gives 2147483651...