MathGroup Archive 2007

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

Search the Archive

MachinePrecission and FPU

  • To: mathgroup at
  • Subject: [mg81266] MachinePrecission and FPU
  • From: dh <dh at>
  • Date: Tue, 18 Sep 2007 00:36:46 -0400 (EDT)


I could trace down a discrepancy between a C program and Mathematica to the

following. Try to compute 0.03/0.006 and you get 4.9999999.. as neither

0.03 nor 0.006 can be represented accurately, this is not amazing.

However, the same calculated with C and C++ on PC's gives 5.0000..

Now, WHY?

I can imagine that the initialization of the floating point unit is the

cause. Does anybody know how one can determine the parameters Mathematica uses 

during the  FPU initialization? Is it possible to change this 


thank's Daniel

  • Prev by Date: Aspect Ratio question
  • Next by Date: Re: Button Help Example
  • Previous by thread: Re: Aspect Ratio question
  • Next by thread: Re: MachinePrecission and FPU