chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] CR: expt should signal error on domain error


From: Aleksej Saushev
Subject: Re: [Chicken-hackers] CR: expt should signal error on domain error
Date: Thu, 14 Jul 2011 02:54:49 +0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix)

  Hello!

Felix <address@hidden> writes:

> From: Peter Bex <address@hidden>
> Subject: Re: [Chicken-hackers] CR: expt should signal error on domain error
> Date: Mon, 4 Jul 2011 09:21:44 +0200
>
>> On Mon, Jul 04, 2011 at 02:47:01AM -0400, John Cowan wrote:
>>> Felix scripsit:
>>> 
>>> > * Those who want IEEE behaviour can have it using "fpexpt".
>>> 
>>> True.  However, I tend to expect that the fp* functions will provide
>>> efficient versions of the regular procedures (because they know their
>>> arguments are flonums) rather than returning different results.
>> 
>> +1 on that.  Having the fp (or fx, for that matter) procedures behave
>> differently from the "generic" ones on flonums is unintuitive and seems
>> to me like trouble in the making.
>
> Is this intuition, or are you simply being used to it? I learned in
> School that division by zero is invalid.

Referring to school is counterproductive. We don't tell everything in school.
E.g. the major part of analysis isn't told, and discrete mathematics is not
mentioned at all.

> Nobody told me about nonsense
> like positive or negative zero, or numbers that aren't. That is
> unintuitive.

This is plain wrong. When explaining physics, we have to deal with 
infinitesimals,
and the most frequent approach taken is using them very much like in Robinson 
analysis.
That we don't talk about Archimedes axiom, hyperreal numbers and transfer 
principle
doesn't matter at all, it is the approach that matters.

And we do distinguish between positive zero and negative zero,
since it has significant impact on branch cuts. In some cases you can't
get valid solution for differential equations (e.g. fluid flows) due to
lack of negative zero.

> Unfortunately we take conventions born out of technical
> peculiarities or peformance hacks for granted.

Some conventions are more substantiated than by will of some programmer.
We do need more numbers than we're given; all those "not-a-numbers" are
there in the standard because otherwise we had and would have to invent them
from scratch from time to time.

> This deeply disappoints me. You all are a bunch of robots.

Right. We're bunch of robots since we happened to deal with real world problems
in physics, chemistry, or engineering rather than implementing programming 
languages.


-- 
HE CE3OH...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]