RE: Math functions? (Particularly transcendental ones)
by Dan Sugalski other posts by this author
Sep 10 2001 6:15PM messages near this date
RE: Math functions? (Particularly transcendental ones)
|
Re: Math functions? (Particularly transcendental ones)
At 10:58 AM 9/10/2001 -0700, David Whipp wrote:
> Dan Sugalski wrote:
> > Okay, I'm whipping together the "fancy math" section of the
> > interpreter assembly language. I've got:
> [...]
> > Can anyone think of things I've forgotten? It's been a while
> > since I've done numeric work.
>
> I'm not sure where this belongs, but I'd really like to have
> a usage model for some of the edges of arithmetic. For example,
> it should be possible to enable/disable overflow and underflow
> exceptions. Basically, Perl5 should be IEE754 compliant; and it
> should support the (optional) traps. It would also nice to have
> a saturation-on-overflow mode/type.
I'd intended the basic math ops on floats and ints (the ones in I and N
registers) to ignore over and underflow stuff, or potentially throw
exceptions, though there's no exception code at the moment. For math ops on
variables, I'd intended they catch the exceptions and handle upgrading as
appropriate. (The assumption being that the compiler would generate the
low-level int/float code and make sure things don't over/underflow. I'm
thinking that was probably a naive thought... :)
> If you have this type of stuff for floats; it'd be consistant to
> have it for integers, too.
Yep. For variable operations we'd need it certainly, to catch cases where
we need to go to the bigint format.
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
dan@[...].org have teddy bears and even
teddy bears get drunk
Thread:
Dan Sugalski
Tim Conrow
David Whipp
Dan Sugalski
Uri Guttman
David Whipp
David Whipp
Benjamin Stuhl
Jeremy Howard
Brent Dax
Ariel Scolnicov
Michael G Schwern
Jeremy Howard
Brent Dax
Ariel Scolnicov
Michael G Schwern
Uri Guttman
Uri Guttman
Uri Guttman
Brian Wheeler
Bryan C. Warnock
Brian Wheeler
Dan Sugalski
Brian Wheeler
Uri Guttman
Dan Sugalski
Uri Guttman
Brian Wheeler
Dan Sugalski
Bryan C. Warnock
Dave Storrs
Uri Guttman
Wizard
Dan Sugalski
Uri Guttman
Buddha Buck
Wizard
Brian Wheeler
Dan Sugalski
Uri Guttman
Dan Sugalski
Brian Wheeler
John Siracusa
Bryan C. Warnock
Michael G Schwern
Uri Guttman
Michael G Schwern
Michael G Schwern
Bryan C. Warnock
Dan Sugalski
Uri Guttman
Buddha Buck
Dan Sugalski
Bart Lateur
Uri Guttman
Dan Sugalski
Bart Lateur
Uri Guttman
Uri Guttman
Dan Sugalski
Uri Guttman
Dan Sugalski
|