[Openmcl-devel] Fun with Measurements

Eric Marsden eric.marsden at free.fr
Mon Oct 30 11:42:19 PST 2006


>>>>> "bf" == Brent Fulgham <bfulg at pacbell.net> writes:

,----
| ;; this can be 1e-6 on most compilers, but for COMPUTE-PI-DECIMAL on
| ;; OpenMCL we lose lotsa precision
| (defun fuzzy-eql (a b)
|    (< (abs (/ (- a b) b)) 1e-4))
| 
| (defun run-pi-decimal/small ()
|    (assert (fuzzy-eql pi (/ (compute-pi-decimal 200) (expt 10 198)))))
| 
| (defun run-pi-decimal/big ()
|    (assert (fuzzy-eql pi (/ (compute-pi-decimal 1000) (expt 10 998)))))
`----

  bf> The comment regarding OpenMCL is not mine, this was in the benchmark  
  bf> sources.  Does anyone know why this comment is being made?

  I wrote this comment. My (also somewhat fuzzy) recollection is that
  OpenMCL on 32-bit MacOS X was getting much less precision than the
  other implementations I was testing. This may be due to lower
  precision in the PowerPC FPU (64-bit rather than 80-bit on x86 given
  various assumptions). I just checked that OpenMCL on AMD64 works
  with a fuzziness of 1e-6. 
  
-- 
Eric Marsden




More information about the Openmcl-devel mailing list