RE : 34.123*89 = 3036.95 (3036.947)

• To: mathgroup at smc.vnet.net
• Subject: [mg47923] RE : [mg47905] 34.123*89 = 3036.95 (3036.947)
• From: "Florian Jaccard" <florian.jaccard at eiaj.ch>
• Date: Fri, 30 Apr 2004 19:27:02 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```Hello  Thomas,

This question has just been discussed this month.

http://forums.wolfram.com/mathgroup/search/index.cgi?q=Bug+in+IntegerPart

To make it short : Cumputers represent the floating point numbers with a
finite precision, in base 2. So the result of a computation cannot have
infinite precision. With Mathematica, the default precision is
\$MachinePrecision , i.e. less then 16 significant digits.

If you look at the representation with 7 significant digits, you may be
happier :

In[22]:=
NumberForm[34.123*89, 7]

Out[22]//NumberForm=
3036.947

Speziell mit Mathematica:

You may also want to precise that your first number has , let us say, 50
significant digits. In this case, the result will also have 50 significant
digits :

In[23]:=
34.123`50*89

Out[23]=
3036.9470000000000000000000000000000000000000000000

Beste Grüsse

F.Jaccard

-----Message d'origine-----
De : Thomas Schulz [mailto:thomas-k-schulz at t-online.de]
Envoyé : vendredi, 30. avril 2004 01:40
À : mathgroup at smc.vnet.net
Objet : [mg47905] 34.123*89 = 3036.95 (3036.947)

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?

i use a IBook (G4) with Mac OS X.
THX
Thomas

```

• Prev by Date: Re: 34.123*89 = 3036.95 (3036.947)
• Next by Date: Re: labeling curves on a plot
• Previous by thread: Union & Select for removing duplicates in a list
• Next by thread: on ColorFunction and combined images?