[perl #60490] Rakudo doesn't report an error on log(0)

2016-10-17 Thread Zoffix Znet via RT
I 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.

[perl #60490] Rakudo doesn't report an error on log(0)

2016-10-17 Thread Zoffix Znet via RT
Looks like this bug re-appeared and Rakudo's function all come down to nqp::log_n(): m: say log 0 rakudo-moar 2dd0dd: OUTPUT«-Inf␤» m: use nqp; say nqp::log_n(0e0) rakudo-moar 2dd0dd: OUTPUT«-Inf␤» 2008 IEEE 754[^1], in section 9.2, says log(0) needs to give a divideByZero

[perl #60490] Rakudo doesn't report an error on log(0)

2008-11-12 Thread Carl Mäsak
# New Ticket Created by Carl Mäsak # Please include the string: [perl #60490] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=60490 Rakudo r32568: $ ./perl6 -e 'my $result = log(0); say Still alive after getting

Re: [perl #60490] Rakudo doesn't report an error on log(0)

2008-11-12 Thread Patrick R. Michaud
On Tue, Nov 11, 2008 at 11:57:02PM -0800, Carl Mäsak wrote: Rakudo r32568: $ ./perl6 -e 'my $result = log(0); say Still alive after getting $result' Still alive after getting -inf Now fixed in r32574: $ ./parrot perl6.pbc -e 'my $result = log(0); say $result;' Can't take log of 0