MathGroup Archive 1992

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

Search the Archive

Re: Ceiling & Floor


The comments from Dave Withoff are useful, but still the following three
computations make one wonder what is really going on.

In[19]:= Ceiling[10^22 + 0.]

Out[19]= 10000000000000000000000

In[20]:= Ceiling[10^23 + 0.]

Out[20]= 99999999999999991611392

In[21]:= Ceiling[10^23 + 0.000000000000000000000000000]

Out[21]= 99999999999999991611392

Just for reference

In[22]:= {$Version, $MachinePrecision}

Out[22]= {SPARC 2.0 (July 8, 1991), 16}

One expects something to happen between 19 and 20 digits, but not between
22 and 23 digits.

John Gray





  • Prev by Date: Re: Ceiling & Floor
  • Next by Date: Re: Ceiling & Floor
  • Previous by thread: Re: Ceiling & Floor
  • Next by thread: Re: Ceiling & Floor