Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit 780480d

Browse files
Update src/itp.jl
1 parent 4358c40 commit 780480d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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)