New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rakudo doesn't report an error on log(0) #406
Comments
From @masakRakudo r32568: $ ./perl6 -e 'my $result = log(0); say "Still alive after getting $result"' S29: =item log our Num multi method log ( Num $x: Num :$base = Num::e ) is export Logarithm of base C<$base>, default Natural. Calling with C<$x == 0> is an (Since log is periodic along the imaginary axis, an error should |
From @pmichaudOn Tue, Nov 11, 2008 at 11:57:02PM -0800, Carl Mäsak wrote:
Now fixed in r32574: $ ./parrot perl6.pbc -e 'my $result = log(0); say $result;' Note that instead of throwing an exception immediately, log(0) Pm |
The RT System itself - Status changed from 'new' to 'open' |
@pmichaud - Status changed from 'open' to 'resolved' |
From @zoffixznetLooks like this bug re-appeared and Rakudo's function all come down to nqp::log_n(): <ZoffixW> m: say log 0 2008 IEEE 754[^1], in section 9.2, says log(0) needs to give a divideByZero exception. [1] http://www.csee.umbc.edu/~tsimo1/CMSC455/IEEE-754-2008.pdf On Wed Nov 12 07:53:52 2008, pmichaud wrote:
|
@zoffixznet - Status changed from 'resolved' to 'open' |
From @zoffixznetI should've read more: "Section 7.3 Division by zero", says 'For logB(0) when logBFormat is a floating-point format, the sign of the infinity is minus (−∞).' And I'm guessing this case matches it, because JVM and C standard lib too give -Inf and nqp just maps the operations to VM's operations. Reclosing :) On Mon Oct 17 05:58:14 2016, cpan@zoffix.com wrote:
|
@zoffixznet - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#60490 (status was 'resolved')
Searchable as RT60490$
The text was updated successfully, but these errors were encountered: