Skip to content

Commit

Permalink
Add missing decont in Rational.new for ZDRs
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Sep 23, 2018
1 parent 671c411 commit 75ec224
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Rational.pm6
Expand Up @@ -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)),
Expand Down

0 comments on commit 75ec224

Please sign in to comment.