Re: PI()



On Tue, Feb 01, 2005 at 09:03:51PM -0500, Morten Welinder wrote:
On Tue, 01 Feb 2005 15:57:55 -0700, Andreas J. Guelzow
<aguelzow taliesin ca> wrote:
In view of CEILING(-2.5) == -3 and FLOOR(-2.5) == -2

CEIL is the sane version of CEILING.
INT is the sane version of FLOOR.

The mistake here is to try to make sense of this.  If the rounding function
group in Excel had been designed with just one iota of sense we would
not have this mess.  As it is, we have.  The best we can do is to offer
our sincere apologies in the help text (after we reorganize all the help
texts).

As I explained clearly in bug 162682 this isn't a matter of Excel compatibility
it's simply that Gnumeric's rounding functions were hacked in quickly and
never tested.

Go ahead, do as I just did and type "=CEILING(-2.5)" into Excel, and it will
tell you that you need to specify an additional argument, and offer to show
you Excel's help pages for the 2-argument CEILING() function.

Some weeks ago I asked Andreas about this stuff, but he claimed the Excel
functions were a "generalisation" of the mathematical functions ceiling()
and floor(). I have no idea where he got his idea from, he doesn't seem to
have a copy of Excel or of the Excel documentation, which is why I asked
him if he understood it. Instead he took my question as an insult, and
tried to insult me back, as though this was a game of some sort.

It would seem sensible for Gnumeric to provide the ceiling() and floor()
mathmetical functions as the single parameter versions of CEILING() and
FLOOR() or if not, to eliminate these single parameter versions altogether
and provide a good signpost to the relevant single parameter function.

This all seems like a distraction from the main thrust of bug 162682 which
has a perfectly good fix waiting to be checked in.

And, FWIW, I recommend that you retain PI() as close as practical to the
ratio between the area of a circle and the square of its radius according
to Euclidean geometry. The alternative (attempting to measure a more
accurate value for our universe) is fraught with difficulties and has no
practical advantage over compatibility with existing software.

Nick.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]