Skip to content
Permalink
Browse files

Add missing decont in Rational.new for ZDRs

  • Loading branch information...
zoffixznet committed Sep 23, 2018
1 parent 671c411 commit 75ec2248ce2081dd1fdf00084c0a62fbd235975b
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/Rational.pm6
@@ -29,7 +29,7 @@ my role Rational[::NuT = Int, ::DeT = ::("NuT")] does Real {
nqp::create(self),
::?CLASS, '$!denominator', nqp::decont(de)),
::?CLASS, '$!numerator', nqp::box_i(
nqp::isgt_I(nu, 0) ?? 1 !! nu ?? -1 !! 0, nu.WHAT)),
nqp::isgt_I(nqp::decont(nu), 0) ?? 1 !! nu ?? -1 !! 0, nu.WHAT)),
nqp::stmts( # normal rational
(my $gcd := nqp::gcd_I(nqp::decont(nu), nqp::decont(de), Int)),
(my $nu := nqp::div_I(nqp::decont(nu), $gcd, NuT)),

0 comments on commit 75ec224

Please sign in to comment.
You can’t perform that action at this time.