Re: 34.123*89 = 3036.95 (3036.947)
- To: mathgroup at smc.vnet.net
- Subject: [mg47913] Re: 34.123*89 = 3036.95 (3036.947)
- From: Bill Rowe <readnewsciv at earthlink.net>
- Date: Fri, 30 Apr 2004 19:26:52 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
On 4/29/04 at 7:40 PM, thomas-k-schulz at t-online.de (Thomas Schulz) wrote: >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