Skip to content

Commit c01cf7b

Browse files
Update src/itp.jl
1 parent 3d52cd6 commit c01cf7b

File tree

1 file changed

+2
-1
lines changed
  • lib/SimpleNonlinearSolve/src

1 file changed

+2
-1
lines changed

lib/SimpleNonlinearSolve/src/itp.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ struct Itp{T} <: AbstractBracketingAlgorithm
5353
if k2 < 1 || k2 > (1.5 + sqrt(5) / 2)
5454
ArgumentError("Hyper-parameter κ₂ should be between 1 and 1 + ϕ where ϕ ≈ 1.618... is the golden ratio")
5555
end
56-
return new(k1, k2, n0)
56+
T = promote_type(eltype(k1), eltype(k2))
57+
return new{T}(k1, k2, n0)
5758
end
5859
end
5960

0 commit comments

Comments
 (0)