Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1992
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1992

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

Search the Archive

Re: Ceiling & Floor

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: Re: Ceiling & Floor
  • From: wheeler at super.org (Ferrell S. Wheeler)
  • Date: Thu, 26 Mar 92 11:51:48 EST

>> Ceiling[10^30 + 3.333] returns 1000000000000000019884624838656

> This is NOT a bug.

> Arithmetic with machine numbers results in machine numbers (unless the result
> can't be expressed as a machine number due to overflow or underflow.)
> 53 or 64 (or whatever your machine happens to use) bits is insufficient
> to give any digits to the right of the decimal point.  Ceiling[ ] and Floor[ ]
> have nothing to do with it.
> 
> Jerry B. Keiper
> keiper at wri.com 

I too understand why it did what it did, that does not mean this
behavior is the "correct" behavior.  The expression as typed makes
absolutely perfect sense mathematically.  I offer as evidence that
Mathematica is not as stupid as you would have us believe:

Ceiling[100000000000000000000000000000. + 3.333]
Floor[100000000000000000000000000000. + 3.333]

both return the mathematically correct answer.  Now the precision
of the initial summand is 30ish whereas in the initial example the
first summand had infinite precision.

Take care,

Ferrell Wheeler
wheeler at super.org








  • Prev by Date: Why won't MMA simplify parts of expressions?
  • Next by Date: Re: Ceiling & Floor
  • Previous by thread: Re: Ceiling & Floor
  • Next by thread: Re: Ceiling & Floor