MathGroup Archive 2001

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

Search the Archive

Re: output precision

  • To: mathgroup at
  • Subject: [mg26569] Re: [mg26553] output precision
  • From: Tomas Garza <tgarza01 at>
  • Date: Fri, 5 Jan 2001 22:23:04 -0500 (EST)
  • References: <>
  • Sender: owner-wri-mathgroup at

39.78 9.37

Use NumberForm to display the result to the desired precision:

Table[NumberForm[39.78 9.37, j], {j, 5, 8}]
{"372.74", "372.739", "372.7386", "372.7386"}

Both your factors in this example are machine-precision numbers, so that
they are handled by the double-precision floating point hardware of your
machine as approximate real numbers, and hence the actual result (i.e., what
Mathematica stores internally) is also an approximate number:


So you must bear in mind the distinction between the result of an arithmetic
operation (what Mathematica actually stores) and what is shown on your
display, and this you can control with NumberForm.

Tomas Garza
Mexico City

----- Original Message -----
From: "Peter Klamser" <klamser at>
To: mathgroup at
Subject: [mg26569] [mg26553] output precision

> Hi, a trivial problem:
> 39.78 9.37=372.7386
> Mathematica says:
> 39.78 9.37=372.739
> How can I make Mathematica output the prescise result?
> Regrads, peter Klamser

  • Prev by Date: Re: mathematica log sessions
  • Next by Date: Re: Dirichlet generating function
  • Previous by thread: Re: output precision
  • Next by thread: Re: output precision