chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] IEEE float arithmetic


From: Thomas Chust
Subject: Re: [Chicken-users] IEEE float arithmetic
Date: Thu, 22 Jun 2006 14:36:13 +0200 (CEST)

On Tue, 20 Jun 2006, John Cowan wrote:

Thomas Chust scripsit:

in my humble opinion it is a good idea to throw an exception by default
if a numerical operation does not make sense. This makes error detection
in algorithms much easier. If CHICKEN did not throw exceptions in cases
like division by zero, I would find myself wrapping tons of numerical
operations in custom functions or macros in order to throw the
exceptions by hand.

What do you do now about the other ways of generating infinities and NaNs?
An overflow will be a correctly signed infinity, and attempts to add or
divide +infinity and -infinity will return NaN. [...]

Hello,

well, I usually do add wrappers to throw exceptions at some critical points in my programs for such cases. But it always bothers me, because I like a high level language to do a fair amount of error checking for me automatically. If I really need high speed unchecked code for efficiency, I program in C and hand-optimize the assembler code...

cu,
Thomas




reply via email to

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