least-positive vs least-positive-normalized
Raymond Toy
toy.raymond at gmail.com
Wed Feb 6 05:39:58 UTC 2019
Sorry for the delay....
On Tue, Jan 29, 2019 at 11:08 PM Daniel KochmaĆski <daniel at turtleware.eu>
wrote:
> Hey,
>
> > With ecl 16.1.3, I noticed that least-positive-double-float and
> > least-positive-normalized-double-float are exactly equal. This is
> > allowed, but ecl can work with denormals since (/
> > least-positive-normalized-double-float 10) is printed correctly.
>
> The reason they are the same is because portable C gives us DBL_MIN at
> our disposal (and its counterparts for other floats).
>
Seems reasonable for portability.
> >
> > Maybe these two values should be different?
>
> Maybe we could hardcode other value when ieee-floating-point is in
> featuers (fwiw it is an optional build flag). I'm not sure what would
> be the right thing here.
>
I don't know either, but it is a bit weird if you can create and print
values that are less than least-positive-double-float. :-)
> >
> > Or maybe ecl really meant to turn on flush-to-zero so that no
> > denormals can
> > occur?
> >
>
> ECL signals a floating-point-overflow/underflow conditions unless
> disabled by an internal function si:trap-fpe.
>
You trap on underflow by default? That seems unusual and kind of annoying.
>
> Regards,
> Daniel
>
>
>
--
Ray
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20190205/46c23654/attachment.html>
More information about the ecl-devel
mailing list