JuliaMath / JuliaMath/Roots.jl

In a42 the almost_equal test is probably wrong

Open
#99 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
413
Forks
61
Avg merge
57m
Merged PRs (30d)
5

Description

I mean this test:

https://github.com/JuliaMath/Roots.jl/pull/98/commits/cc03ba6e5d9a43ca8cd4d4f786eda956bbc7084b#diff-9471aab4b037f803f311ca8d2d35fe8fR558

It potentially uses the wrong type (Float64, which is not necessarily the type it's working with), and also it seems to use realmin in place of eps, where eps is the appropriate value.

I want to change it to

```
abs(x - y) < 32 * max(eps(x), eps(y))
```

which is probably what was intended anyway.

Contributor guide

No contributing guide indexed for this repository

Research direction

Inspect the almost_equal test in the file and commit referenced by the linked diff, focusing on its numeric type and tolerance comparison. Run the relevant Julia tests; done means the test uses the intended working type and eps-based tolerance without regressions.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.