Dear CIAO users (and Jose Morales, in special)
Thanks for your replies so far about my problems with arithmetic in CIAO.
I would just like to add at this point that if I try the same division with other values, the long sequence of zeros won't appear. Check this:
?- X is 1927/100.
X = 19.27 ?
However, if I try
?- X is 1926/100.
X = 19.2600000000000029 ?
I am running CIAO version 1.8 and the specs of my machine (as requested by Jose Morales) are:
Operating System Microsoft Windows XP Professional Version: 5.1.2600
Memory (RAM) Capacity: 512 MB
Processor Intel(R) Pentium(R) 4 CPU 2.26GHz Version: x86 Family 15 Model 2 Stepping 4 Speed: 2253 MHz
It is perhaps official CIAO mailing list policy to be overpolite and cautious in its response, but I am not one of the CIAO officials, so I can butt in like an elephant in a porcelano shop ...
Do yourself a favour for life and get www.wldelft.nl/soft/d3d/misc/goldberg.pdf (the title is "What Every Computer Scientist Should Know About Floating-Point Arithmetic") and read it until you understand half of it;
and do (on a linux system - but there must be an equivalent windows thing, or of there isn't, tell me and I will send you the man page):
man fprintf
I would not have told this to someone in psychology using Prolog, but since you are in a reputed Department of Computing Science, I felt this was the correct advice (pass it on to your student :-)
Cheers
Bart Demoen ============================================================================== Message: Address: Action: help majordomo(a)clip.dia.fi.upm.es Info. on useful commands subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list <whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list ----------------------------------------------------------------------------- Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/ -----------------------------------------------------------------------------