MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Mathematica not IEEE-754 compliant?

  • To: mathgroup at
  • Subject: [mg131944] Re: Mathematica not IEEE-754 compliant?
  • From: danl at
  • Date: Mon, 4 Nov 2013 23:17:59 -0500 (EST)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • References: <l4n97h$b25$> <l4sjo2$pkv$> <l525s5$9gt$>

There is a subtlety having to do with Mathematica semantics rather than IEEE arithmetic. n/d is intertpreted, and evaluated, as n*(d^(-1)). If you go through the various computations to check on how your example will behave, I suspect it will come out fine, with the ELP ("error in last place") discrepancy between n*(d^(-1)) and n/d resulting from roundoff error in the process of taking the reciprocal and then multiplying.

To get the division semantics directly in Mathematica one can instead use


In this case your example will give the result you had expected.

I should mention that once the actual arithmetic is performed in Mathematica, when operands are machine doubles then it is done using hardware operations that are invoked from C. If the C compiler used in the build process is IEEE compliant, then those operations will be as well. To the best of my knowledge all compilers we use to build Mathematica are IEEE compliant.

Daniel Lichtblau
Wolfram Research

  • Prev by Date: Re: Finding branches where general solution is possible
  • Next by Date: PlotRange with Histogram Log height
  • Previous by thread: Re: Mathematica not IEEE-754 compliant?
  • Next by thread: Re: Mathematica not IEEE-754 compliant?