ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl6-language
perl6-language
RE: Math functions? (Particularly transcendental ones)
by Hong Zhang other posts by this author
Sep 10 2001 9:12PM messages near this date
Re: Math functions? (Particularly transcendental ones) | Re: What's up with %MY?
>  Uri Guttman  

>  > we are planning automatic over/underflow to bigfloat. so there is no

>  > need for traps. they could be provided at the time of the 

>  > conversion to big*.

>  

>  OK. But will Perl support signaling and non-signaling NANs?


I don't think we should go for automatic overflow/underflow between
float and bigfloat. The float exception (overflow, underflow, inexact,
divide zero, ...) is very difficult to handle. Using Unix signal is 
expensive and very platform-specific (lots of ucontext issues). Since
C language does not support floating-point signal, we may use some
assembly code to handle it, it will be porting nightmare.

Since most of floating-point assumes IEEE-semantics, taking automatic
float/bigfloat will change this assumption significantly. It may a
lot of code and algorithm. I think it is safer just to provide a
BigDecimal class for developers to use, and keep the basic float
semantics (close to 64-bit IEEE-754 if possible).

Hong



Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved