Skip to content

Commit

Permalink
Issue 421 (#422)
Browse files Browse the repository at this point in the history
* fix undesired type promotion to Float64

* version bump

* typo
jverzani authored Mar 12, 2024
1 parent 0ca2344 commit d528e90
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Roots"
uuid = "f2b01f46-fcfa-551c-844a-d8ac1e96c665"
version = "2.1.2"
version = "2.1.3"

[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
2 changes: 1 addition & 1 deletion src/hybrid.jl
Original file line number Diff line number Diff line change
@@ -80,7 +80,7 @@ function solve!(
r, a, b = state0.xn1, state.xn0, state.xn1
Δr = abs(r - b)
Δx = abs(b - a)
ts, TB = 1e-3, 1e2 # too small, too big
ts, TB = one(r)/1000, 100*one(r) # too small, too big
if Δr >= TB * Δx
adj = true
r = b + sign(r - b) * TB * Δx ## too big
1 change: 1 addition & 0 deletions test/test_find_zero.jl
Original file line number Diff line number Diff line change
@@ -36,6 +36,7 @@ struct Order3_Test <: Roots.AbstractSecantMethod end
@test find_zero(sin, 3.0, m) pi
@test find_zero(sin, big(3), m) pi
@test find_zero(sin, big(3.0), m) pi
@test find_zero(x -> x^2 - 2.0f0, 2.0f0, m) sqrt(2) # issue 421
end

## defaults for method argument

2 comments on commit d528e90

@jverzani
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/102764

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v2.1.3 -m "<description of version>" d528e9004d3773348b3c0a5f18c127a1bb1621bf
git push origin v2.1.3

Please sign in to comment.