Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: Re: bug in IntegerPart ?

  • To: mathgroup at
  • Subject: [mg47797] Re: [mg47769] Re: bug in IntegerPart ?
  • From: Andrzej Kozlowski <akoz at>
  • Date: Tue, 27 Apr 2004 04:46:47 -0400 (EDT)
  • References: <c6g015$4lk$> <>
  • Sender: owner-wri-mathgroup at

On 26 Apr 2004, at 15:41, AC wrote:

> "DrBob" <drbob at> wrote in message 
> news:<c6g015$4lk$1 at>...
>> There's NO reason to be puzzled. 1.65 and 1.3 can't be represented 
>> exactly
>> in binary, so of course their difference may not be exact, either. 
>> Hence the
>> division problems have different numerators.
> Your 'explanation' makes no sense whatsoever. Mathematica's binary
> representations of 1.65-1.3 and 0.35 are the same. That can be seen by
> comparing
>   BaseForm[1.65 - 1.3, 2]
> with
>   BaseForm[0.35,2]
It does make sense and certainly not the same!

FullForm[BaseForm[0.35, 2]]


FullForm[BaseForm[1.65 - 1.3, 2]]


Or just evaluate BaseForm using INputform for output. You should not 
trust in such cases  what you see in StandardForm or TraditionalForm. 
In fact RealDigits[,2] gives you the relevant information.

Andrzej Kozlowski
Chiba, Japan

  • Prev by Date: RE: Question on pattern matching
  • Next by Date: Re: undocumented function StringQ
  • Previous by thread: Re: bug in IntegerPart ?
  • Next by thread: Re: Re: bug in IntegerPart ?