       Re: {Precision@N[2^1024],N[2^1024]===\$MaxMachineNumber}

• To: mathgroup at smc.vnet.net
• Subject: [mg80729] Re: [mg80685] {Precision@N[2^1024],N[2^1024]===\$MaxMachineNumber}
• From: Daniel Lichtblau <danl at wolfram.com>
• Date: Thu, 30 Aug 2007 02:35:29 -0400 (EDT)
• References: <200708290810.EAA26797@smc.vnet.net>

```Chris Chiasson wrote:
> on my computer, this command gives
> {15.9546,False}
>
> However, I think the result is supposed to be
> {MachinePrecision,True}
>
> Is there something wrong with N?

Not in this example.

Looking at the bit pattern of \$MaxMachineNumber should give an idea of
what it actually is.

In:= InputForm[rr = RealDigits[\$MaxMachineNumber,2]]

Out//InputForm=
{{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, 1024}

In:= Length[rr[]]

Out= 53

So we have a string of 53 1's, to the right of the radix, times 2^1024.
To get an integer equivalent one would do

In:= ii = Sum[2^j, {j,1024-53,1024-1}];

In:= N[ii]===\$MaxMachineNumber
Out= True

> My computer is an Athlon XP running Windows XP SP2.
>
> Also, why does
> ByteCount@\$MaxMachineNumber
> give
> 16
> ? I'm sure I am missing something, but I thought a double precision
> floating point number would only take up 8 bytes.
>
> Thanks.
>

The floating point number requires 8 bytes and, as every Mathematica
entity is stored in an "expr" construct with various fields, the other 8