MathGroup Archive 2004

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

Search the Archive

Re: 34.123*89 = 3036.95 (3036.947)

  • To: mathgroup at
  • Subject: [mg47913] Re: 34.123*89 = 3036.95 (3036.947)
  • From: Bill Rowe <readnewsciv at>
  • Date: Fri, 30 Apr 2004 19:26:52 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

On 4/29/04 at 7:40 PM, thomas-k-schulz at (Thomas Schulz)

>I am a NewBe - and i dont understand the Result. Mathematica says
>that 34.123*89 = 3036.94699999997 but its 3036.947... How can i
>change this?

The short answer is you can't. 

The reason this happens is you've asked Mathematica to do a computation with inexact machine precision numbers. Mathematica (like any other program that uses machine numbers) first converts the number you input to binary form then does the computation. The number 34.123 cannot be exactly represented in binary form with a finite number of digits. So, the result will not be exactly 3036.947.

The small difference you get when using inexact numbers from what you expect will vary with details of the machine on which you are running Mathematica.
To reply via email subtract one hundred and four

  • Prev by Date: Re: 34.123*89 = 3036.95 (3036.947)
  • Next by Date: Re: labeling curves on a plot
  • Previous by thread: Re: 34.123*89 = 3036.95 (3036.947)
  • Next by thread: Re: 34.123*89 = 3036.95 (3036.947)