Re: %% with zero denominator

2017-12-11 Thread zoffix


On 2017-12-11 12:22 PM, Sean McAfee wrote:

Well, not really.  I don't think x %% 0 should return a Failure at all.


Is there a particular problem the current implementation fails to  
solve? In boolean
context `x %% 0` *is* equivalent to False. The Failure carries  
additional information
to those who want it. You can discard that information with `so x %%  
0` if you aren't
already evaluating in Bool context. Seems returning a Failure is the  
best of both worlds.


We try to follow IEEE 754-2008 standard whenever we can and I have  
some memory of us

verifying last year stuff like modulo was reasonably conforming.



1 / 0 is an expression which can evaluate to no sensible value


It can produce a sensible value. In floating point context (that is in  
Num view), that's a perfectly cromulent positive infinity, again per  
IEEE 754 standard:


 m: say (1 / 0).Num
 rakudo-moar fed56be25: OUTPUT: «Inf␤»

Cheers,
ZZ


[NOTICE] Main Development Branch Renamed from “nom” to “master”

2017-10-28 Thread zoffix


If you track latest rakudo changes by means of a local checkout of the  
development repository, please take notice that we renamed our  
unusually-named main development branch from nom to the more  
traditional name master


See  
http://rakudo.org/2017/10/27/main-development-branch-renamed-from-nom-to-master/ for more  
info