Embarrassing Arithmetic behaviour

"j.gressier" <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <380862331.127821.1392804230670.JavaMail.www@wwinf8226>

XP 32 bits (Athlon 64 bits)  and W7 32 bits. Same behaviour on both PCs.
Swi-Prolog 6.6.1


15 ?- A is 4.9 * 10000.
A = 49000.0.

-------------------------------------------
16 ?- A is 4.9 * 100000.
A = 490000.00000000006.
-------------------------------------------

Whereas :

17 ?- A is 3.9 * 100000.
A = 390000.0.

and :

18 ?- A is 4.9 * 1000000.
A = 4900000.0.


(No problem with Swi-Prolog 5.8 under Linux or Windows)

Jacques Gressier




 
-------------- next part --------------
HTML attachment scrubbed and removed
_______________________________________________
SWI-Prolog mailing list
[email protected]
https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.