Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2010

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

Search the Archive

Re: Puzzled by IntegerPart

  • To: mathgroup at
  • Subject: [mg114710] Re: Puzzled by IntegerPart
  • From: Albert Retey <awnl at>
  • Date: Mon, 13 Dec 2010 06:34:45 -0500 (EST)
  • References: <ie28rd$mja$>


> Round and Rational have solved the problem. But I am curious, why do
> the phantom decimals not show with N?
> N[100*1.15, 20]
> 115.

N has no influence on the formatting but is used to convert to floating
point numbers. What you want is either of these:





PS: Does anyone understand why

NumberForm[100*1.15, 20]

will be shown as 115. ? Is this really the intended behavior?

  • Prev by Date: Re: LessEqual vs Inequality, was ..Re: Replacement Rule with Sqrt
  • Next by Date: Re: Question: Compile in Mathematica 8.0
  • Previous by thread: Re: Puzzled by IntegerPart
  • Next by thread: Re: Puzzled by IntegerPart