Menu

#2 wrong result of unsignedinteger-+

open
nobody
Interpreter (2)
5
2008-04-16
2008-04-16
Anonymous
No

wrong result of unsignedinteger-+

an expression like (+ 0x0 1 2) gives a wrong result because the function unsignedinteger-+ does not add or subtract correctly.

workaround: replace by an interpreted version.

add in you init.lsp the following function:

(defun unsignedinteger-+ fexpr(x)
(apply '-(cons this(mapcar '(lambda(z)(minus(integer z))) x))))

which is correct up to 2^63

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.