MathGroup Archive 2010

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

Search the Archive

Re: Puzzled by IntegerPart

  • To: mathgroup at smc.vnet.net
  • Subject: [mg114607] Re: Puzzled by IntegerPart
  • From: James Stein <mathgroup at stein.org>
  • Date: Fri, 10 Dec 2010 02:29:25 -0500 (EST)

The puzzle is easily solved by observing that the fractional part is greater
than zero, verified by the fact that this input:
     FractionalPart [ 1.15*100 ] > 0
returns 'True".

More seriously, documentation for both IntegerPart and FractionalPart, in
"Possible Issues", warns about potential precision problems.  However, your
expression is so apparently innocent that one wonders why Mathematica cannot
do better...


On Thu, Dec 9, 2010 at 3:00 AM, Themis Matsoukas <tmatsoukas at me.com> wrote:

> IntegerPart[100*1.15]
>
> 114
>
> ???
>
> Themis
>
>


  • Prev by Date: Re: Puzzled by IntegerPart
  • Next by Date: Re: Puzzled by IntegerPart
  • Previous by thread: Re: Puzzled by IntegerPart
  • Next by thread: Re: Puzzled by IntegerPart