MathGroup Archive 2004

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

Search the Archive

RE: RE: Re: bug in IntegerPart ?

  • To: mathgroup at
  • Subject: [mg47886] RE: [mg47837] RE: [mg47809] Re: bug in IntegerPart ?
  • From: "DrBob" <drbob at>
  • Date: Thu, 29 Apr 2004 19:39:33 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

I was wrong, here. Explicit digits should appear after "^^", be cause we're
not evaluating a function, we're inputting a number in a specific notation.


-----Original Message-----
From: DrBob [mailto:drbob at] 
To: mathgroup at
Subject: [mg47886] [mg47837] RE: [mg47809] Re: bug in IntegerPart ?

2^^BaseForm[0.35`, 2] WOULD be a legitimate expression, if Help were correct
in saying that BaseForm is a wrapper, affecting printing but not evaluation.


-----Original Message-----
From: Bill Rowe [mailto:readnewsciv at] 
To: mathgroup at
Subject: [mg47886] [mg47837] [mg47809] Re: bug in IntegerPart ?

On 4/26/04 at 2:41 AM, ancow65 at (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]

BaseForm isn't doing what you think and will not show the difference.
BaseForm controls only the display of a number. By default Mathematica
displays a number to 6 significant digits. Both 1.65 - 1.3 and .35 are the
same to 6 significant digits. Consequently, these will display the same when
using BaseForm.

To see the difference use RealDigits or FullForm. Both of these clearly show
the difference between 1.65 - 1.3 and .35.

>(n = 2^^0.010110011001100110011 )
> => 0.350000

Right, here you've inputed a number accurate to 6 significant digits. So,
Mathematica displays 6 significant digits

> Notice the unussual display of trailing zeros. 

No, not unusual. Exactly as it should be. If I input 6 significant digits as

.35`6, I expect Mathematica to display 6 significant digits with the default

>Additionally, a completely legitimate expression
>2^^BaseForm[0.35`, 2]
>produces a syntax error message.

The expression 2^^BaseForm[0.35, 2] isn't a legitimate expression. BaseForm
puts a wrapper on the expression to control display. That is
Head at BaseForm[0.35, 2] is BaseForm, not a sequence of binary digits.

To reply via email subtract one hundred and four

  • Prev by Date: Re: The Wave Equation : Mathematica vs. Mathworld
  • Next by Date: Re: The Wave Equation : Mathematica vs. Mathworld
  • Previous by thread: Re: bug in IntegerPart ?
  • Next by thread: Re: bug in IntegerPart ?