Skip to content

Commit

Permalink
Correct abs! so it works for Taylor1{TaylorN{T}}
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis Benet committed Oct 10, 2017
1 parent fa81ce8 commit 5d956f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ for T in (:Taylor1, :TaylorN)

@inline function abs!(c::$T, a::$T, k::Int)
z = zero(constant_term(a))
if constant_term(a) > z
if constant_term(constant_term(a)) > constant_term(z)
return add!(c, a, k)
elseif constant_term(a) < z
elseif constant_term(constant_term(a)) < constant_term(z)
return subst!(c, a, k)
else
throw(ArgumentError(
Expand Down

0 comments on commit 5d956f2

Please sign in to comment.