Skip to content

Commit

Permalink
Update src/types.jl
Browse files Browse the repository at this point in the history
Co-authored-by: Bowen S. Zhu <[email protected]>
  • Loading branch information
mxhbl and bowenszhu authored Aug 30, 2024
1 parent f54464f commit e06f2c7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1221,8 +1221,7 @@ function ^(a::SN, b)
new_dict = mapvalues((k, v) -> b*v, a.dict)
if b isa Rational
if isinteger(b)
integer_type = only(typeof(b).parameters)
coeff = a.coeff ^ convert(integer_type, b)
coeff = a.coeff ^ numerator(b)
else
coeff = 1
merge!(new_dict, Dict(term(^, a.coeff, b) => 1))
Expand Down

0 comments on commit e06f2c7

Please sign in to comment.