06:31 < [Coke]> iBakeCake: latest message on perl6-users about log(23,0) seems 
to be something in your current wheelhouse
06:32 < iBakeCake> [Coke]: what is it?
06:32 < iBakeCake> Isn't log base 0 undefined
06:32 < moritz> log to base 0?
06:32 < [Coke]> 
http://www.nntp.perl.org/group/perl.perl6.users/2016/10/msg3027.html
06:33 < moritz> m: say log(23, 0)
06:33 <+camelia> rakudo-moar 71a01e: OUTPUT«-0␤»
06:33 < moritz> that's the complaint
06:34 < iBakeCake> m: say log( my num $ = 23, my num $ = 0)
06:34 <+camelia> rakudo-moar 71a01e: OUTPUT«This type cannot unbox to a native 
number: P6opaque, Int␤  in block <unit> at <tmp> line 1␤␤»
06:34 < iBakeCake> m: say log( my num $ = 23e0, my num $ = 0e0)
06:34 <+camelia> rakudo-moar 71a01e: OUTPUT«-0␤»
06:34 < iBakeCake> Well, I recently checked the log() stuff for nums...
06:34  * iBakeCake looks
06:34 < iBakeCake> Ah, ok, now I remember
06:35 < iBakeCake> m: say log(23)/−∞
06:35 <+camelia> rakudo-moar 71a01e: OUTPUT«-0␤»
06:37 < iBakeCake> ln(0) by 2008 IEEE 754 is −∞; and log₀(23) = ln(23)/ln(0) = 
ln(23)/−∞ = -0
06:37 < iBakeCake> So it's not so much an artefact of the log() but rather how 
we divide by infinity
06:41 < iBakeCake> IEEE section 6.1 tells about division by −∞ would give the 
limit, with the sign of ∞, so -0 is right. and section 7.3 
                   says that ln(0) is −∞
06:41 < iBakeCake> If anyone wanted to respond to that person... I don't have a 
perl6-users subscriptions

On Thu, Oct 20, 2016 at 01:54:43PM +1100, Francis (Grizzly) Smit wrote:
: I think I've found a bug some how there is no power that you can
: raise 0 to and get 23 or any number, except 0
: 
: 
: $ perl6 -e "say log(23, 0);"
: -0
: 
: 
: shouldn't it be NaN
: 
: 
: $ perl6 --version
: This is Rakudo version 2016.10-17-g200364a built on MoarVM version
: 2016.10-15-g715e39a
: implementing Perl 6.c.
: 
: 
: -- 
: 
:    .~.     In my life God comes first....
:    /V\         but Linux is pretty high after that :-D
:   /( )\    Francis (Grizzly) Smit
:   ^^-^^    http://www.smit.id.au/
: -----BEGIN GEEK CODE BLOCK-----
: Version: 3.1
: GM/CS/H/P/S/IT/L d- s+:+ a++ C++++ UL++++$ P+++ L+++$ E--- W+++
: N w--- M-- V-- PE- PGP t+ 5-- X-- R- tv b++++ DI(+) D-
: G e++ h+ y? r% z---
: ------END GEEK CODE BLOCK------
: http://www.geekcode.com/

Reply via email to