Re: Float division error (and 7.1.12/website)
Jan Wielemaker <[email protected]> Thu, 17 Apr 2014 09:56:12 +0200
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
Hi Richard, On 16-04-14 23:59, Richard A. O'Keefe wrote: > Jan, can you add to the manual, somewhere, in very large letters: > > SWI Prolog uses exactly the same floating point arithmetic > as C. This is normally provided by your hardware, and > can be expected to conform to the IEEE 754 standard. This > is BINARY FLOATING-POINT arithmetic, not arithmetic on the > mathematical real numbers. If you think you have found a > mistake in Prolog's arithmetic, you are almost certainly > wrong, and should make sure that you understand why, for > example, 0.3*3 is not exactly equal to 0.9, before you > report the "bug". > > People who don't bother learning how any other language does > floating point arithmetic won't read this either, but at least > we can point to it in reply. I'm all in favour, but I fear that except using this text as the home page or printing it together with every answer that includes floats, there is little chance it will make a difference :-( Added your quote to http://www.swi-prolog.org/FAQ/floats.txt At least we can deal with the next victim with a simple link. > PS: I went to the web site to check if you already had > something like this, but clicking on the link for the manual > http://www.swi-prolog.org/pldoc/doc_for?object=manual > gave me A typical case of eating your own dogfood. Fixed. 7.1.12 seems a bit broken wrt HTTP services due to integration work with the pengines package and improving the Unix daemon facilities. I'll try to get to the bottom and fix this (the current fix is mostly a work-around). 7.1.13 should be our lucky number soon. Cheers --- Jan P.s. Generated some figures about string/atom performance. To appear soon.