MathGroup Archive 2004

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

Search the Archive

Re: bug in IntegerPart ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg47961] Re: bug in IntegerPart ?
  • From: ancow65 at yahoo.com (AC)
  • Date: Sun, 2 May 2004 04:51:03 -0400 (EDT)
  • References: <c6vhrn$gcq$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Daniel Lichtblau <danl at wolfram.com> wrote in message news:<c6vhrn$gcq$1 at smc.vnet.net>...
> [.deleted.]
>
> > We already agreed that 'decimal' != 'approximate' (at least in
> > mathematics).
> We have agreed to no such thing. By universal convention (okay,
> universal - 1), 1.65 is an approximate number.
> 

Ok, I will agree (for a moment :-)). What is that something that you
are approximating with 0.35?  Is that

NumberForm[0.35, 100]
=> 0.35

or 

NumberForm[1.65-1.3,15]
=> 0.35
0.35

or 

NumberForm[1.65 - 1.3, 16]
=> 0.3499999999999999
0.3499999999999999

NumberForm[1.65 - 1.3, 100]
=> 0.3499999999999999
0.3499999999999999

Oops, it looks like I came accross a bug. Let's try again your
favorite RealDigits.

RealDigits[0.35]
=> {{3, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0}
3.500000000000000

RealDigits[1.65-1.3]
=> {{3, 4, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9}, 0}

3.499999999999999

1.65-1.3 // FullForm
=> 0.34999999999999987`

Do you claim that 'approximate' are decimals that don't have finite
binary representation or all decimals? Just asking. :-)

So maybe this is that 'perfect' number.

2^^0.0101100110011001100110011001100110011001100110011001100110011001100110011\
001100110011
=> 0.3500000000000000000000000

I tried to check more digits, but I filled out the whole line. When I
added the continuation mark \ and more digits in the next line, an
error occured:

Mathematica has detected a possible internal error. If possible,
report the error to support at wolfram.com, quoting "Assertion 'ibuf ==
((box)->nchars)' failed at matheditio.c:2093", and describe in as much
detail as possible what you were doing when the error occurred.

Mr. Lichtblau, it look like a job for you.

I think I will stop my quest for a perfect number here.

AC


> [.deleted.]
> 
> Daniel Lichtblau
> Wolfram Research


  • Prev by Date: Re: bug in IntegerPart ?
  • Next by Date: Re: Fitting a Cylinder to 3D data points
  • Previous by thread: Re: bug in IntegerPart ?
  • Next by thread: Re: bug in IntegerPart ?