develooper Front page | perl.perl5.porters | Postings from September 2014

further thoughts on inf and nan

Thread Next
From:
Jarkko Hietaniemi
Date:
September 13, 2014 15:17
Subject:
further thoughts on inf and nan
Message ID:
54145FF2.8030803@iki.fi
Currently we hard-fail on division by zero, log of zero or negative,
or sqrt of negative.

An option is that we could return Inf/-Inf/NaN instead, softly.

Arguably, for the sqrt, we could also return a Math::Complex,
but that's little bit beyond (ta-dah) inf and nan (and handled by
Math::Complex already).

Just an observation.





Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About