JuliaMath / JuliaMath/Calculus.jl

Proper `epsilon` for complex?

Open
#115 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
285
Forks
78
PR merge metrics
No merged PRs in 30d

Description

It seems that the finite difference routines would "just work" if `epsilon` was changed to the "correct value".
Unless there's some kind of norm argument, I would propose changing each part using the current epsilon. For example, if `epsilon1` is from `real(x)` and `epsilon2` is from `imag(x)`, then `epsilon = epsilon1 + im*epsilon2`.

Would this be fine? This definition would make it safe for the case where a user is just "packing" floats into complex numbers, which can be common in physical applications. If this is acceptable I'll make a PR.

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.