JuliaMath / JuliaMath/SpecialFunctions.jl

Extensive use of abs for complex tolerances

Open
#468 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
381
Forks
113
Avg merge
1d 23h
Merged PRs (30d)
1

Description

I just profiled `expintx(1,z::Complex)` and found the majority of the time is spent checking the convergence using `abs(stuff) < ϵ`. Would there be a problem with simply squaring all of these and using `abs2(stuff) < ϵ^2`? This is much much faster, especially when `stuff::Complex`.

Since `ϵ=10eps(T)`, I suppose that could lead to some issues. But I would much prefer to slightly reduce the tolerance than the current waste of compute.

I'm happy to do the PR if it's likely to get merged in.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.