Skip to content

Commit

Permalink
Merge pull request #829 from devmotion/patch-1
Browse files Browse the repository at this point in the history
Generalize `::Irrational` to `::AbstractIrrational`
  • Loading branch information
shashi committed Mar 17, 2023
2 parents d3bbe4d + 7836526 commit 3bad882
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/num.jl
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ end
<(s, x::Num) = value(s) <value(x)
<(s::Num, x::Num) = value(s) <value(x)

Num(q::Irrational) = Num(Term(identity, [q]))
Num(q::AbstractIrrational) = Num(Term(identity, [q]))

for T in (Integer, Rational)
@eval Base.:(^)(n::Num, i::$T) = Num(value(n)^i)
Expand Down

0 comments on commit 3bad882

Please sign in to comment.