MathGroup Archive 2007

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

Search the Archive

Re: Re: ===$MaxMachineNumber}

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80888] Re: [mg80848] Re: ===$MaxMachineNumber}
  • From: Daniel Lichtblau <danl at wolfram.com>
  • Date: Wed, 5 Sep 2007 02:44:17 -0400 (EDT)
  • References: <200708290810.EAA26797@smc.vnet.net> <200709040743.DAA23914@smc.vnet.net>

Chris Chiasson wrote:
> On Aug 30, 1:43 am, Daniel Lichtblau <d... at wolfram.com> wrote:
> <snip/>
> 
>>Not in this example.
>>
>>Looking at the bit pattern of $MaxMachineNumber should give an idea of
>>what it actually is.
>>
>>In[14]:= InputForm[rr = RealDigits[$MaxMachineNumber,2]]
>>
>>Out[14]//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[18]:= Length[rr[[1]]]
>>
>>Out[18]= 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[19]:= ii = Sum[2^j, {j,1024-53,1024-1}];
>>
>>In[20]:= N[ii]===$MaxMachineNumber
>>Out[20]= True
> 
> 
> Thank you for this detailed explanation.

You are welcome.


> </snip>
> 
>>The floating point number requires 8 bytes and, as every Mathematica
>>entity is stored in an "expr" construct with various fields, the other 8
>>bytes are the expr overhead.
> 
> 
> Is this why packed arrays save space-they save on the "metadata" that
> would normally be required for each sub expression?
> 
> 
> --
> http://chris.chiasson.name
> 

Yes, that's exactly the reason for the space savings.

Daniel Lichtblau
Wolfram Research


  • Prev by Date: Re: Fwd: correction to: more than 1.5 hrs of trying: Grid Alignment problem ?
  • Next by Date: Re: double integral of long expression in Mathematica
  • Previous by thread: Re: ===$MaxMachineNumber}
  • Next by thread: Re: ndsolve ndsv problem