MathGroup Archive 2010

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

Search the Archive

Re: Puzzled by IntegerPart

  • To: mathgroup at smc.vnet.net
  • Subject: [mg114626] Re: Puzzled by IntegerPart
  • From: Patrick Scheibe <pscheibe at trm.uni-leipzig.de>
  • Date: Fri, 10 Dec 2010 02:32:55 -0500 (EST)

Check this

In[20]:= RealDigits[100*1.15]

Out[20]= {{1, 1, 4, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9}, 3}

and have a look at the binary representation

In[21]:= BaseForm[1.15,2]
Out[21]//BaseForm= Subscript[1.0010011001100110011, 2]

1.15 has an exact representation in base 10 but is a periodic number
which will be truncated in base 2.

Cheers
Patrick

On Thu, 2010-12-09 at 06:00 -0500, Themis Matsoukas wrote:
> IntegerPart[100*1.15]
> 
> 114
> 
> ???
> 
> Themis
> 



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