-
-
Save zoffixznet/043124ef58a020ec8ec719c904b9ea6a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cpan@perlbuild2~/CPANPRC/rakudo (nom)$ gd | |
diff --git a/src/core/Num.pm b/src/core/Num.pm | |
index b122621..d1ad252 100644 | |
--- a/src/core/Num.pm | |
+++ b/src/core/Num.pm | |
@@ -337,25 +337,17 @@ multi sub infix:<*>(num $a, num $b) returns num { | |
} | |
multi sub infix:</>(Num:D \a, Num:D \b) { | |
- b | |
- ?? nqp::p6box_n(nqp::div_n(nqp::unbox_n(a), nqp::unbox_n(b))) | |
- !! Failure.new(X::Numeric::DivideByZero.new(:using</>, :numerator(a))) | |
+ nqp::p6box_n(nqp::div_n(nqp::unbox_n(a), nqp::unbox_n(b))) | |
} | |
multi sub infix:</>(num $a, num $b) returns num { | |
- $b | |
- ?? nqp::div_n($a, $b) | |
- !! Failure.new(X::Numeric::DivideByZero.new(:using</>, :numerator($a))) | |
+ nqp::div_n($a, $b) | |
} | |
multi sub infix:<%>(Num:D \a, Num:D \b) { | |
- b | |
- ?? nqp::p6box_n(nqp::mod_n(nqp::unbox_n(a), nqp::unbox_n(b))) | |
- !! Failure.new(X::Numeric::DivideByZero.new(:using<%>, :numerator(a))) | |
+ nqp::p6box_n(nqp::mod_n(nqp::unbox_n(a), nqp::unbox_n(b))) | |
} | |
multi sub infix:<%>(num $a, num $b) returns num { | |
- $b | |
- ?? nqp::mod_n($a, $b) | |
- !! Failure.new(X::Numeric::DivideByZero.new(:using<%>, :numerator($a))) | |
+ nqp::mod_n($a, $b) | |
} | |
# (If we get 0 here, must be underflow, since floating overflow provides Inf.) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment