Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
lrnv authored and tansongchen committed Sep 25, 2024
1 parent dd72964 commit f1f850b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
6 changes: 0 additions & 6 deletions src/primitive.jl
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,6 @@ end
ex = :($ex; TaylorScalar($([Symbol('v', i) for i in 1:N]...)))
return :(@inbounds $ex)
end
@inline function *(a::TaylorScalar{T1, N}, b::TaylorScalar{T2, N}) where {T1, T2, N}
*(promote(a, b)...)
end
@inline function /(a::TaylorScalar{T1, N}, b::TaylorScalar{T2, N}) where {T1, T2, N}
*(promote(a, b)...)
end

for R in (Integer, Real)
@eval @generated function ^(t::TaylorScalar{T, N}, n::S) where {S <: $R, T, N}
Expand Down
4 changes: 0 additions & 4 deletions src/scalar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@ function promote_rule(::Type{TaylorScalar{T, N}},
::Type{S}) where {T, S, N}
TaylorScalar{promote_type(T, S), N}
end
function promote_rule(::Type{TaylorScalar{T1, N}},
::Type{TaylorScalar{T2, N}}) where {T1, T2, N}
TaylorScalar{promote_type(T1, T2), N}
end

function (::Type{F})(x::TaylorScalar{T, N}) where {T, N, F <: AbstractFloat}
F(primal(x))
Expand Down

0 comments on commit f1f850b

Please sign in to comment.