-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
area-System.Numericshelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributors
Description
I have found a number of potential places for improvements in System.Numerics.Complex:
- Use
Math.SinCoswhen available in various places. - Use
double.Hypotwhen available inComplex.Hypot sinhandcoshare calculated simultaneously as:
double p = Math.Exp(x);
double q = 1 / p;
double sinh = (p - q) * 0.5;
double cosh = (p + q) * 0.5;
This is inaccurate for sinh due to catastrophic cancellation of p-q when x is close to zero.
Could perhaps be solved by using Math.Sinh and Math.Cosh within a threshold?
PaulusParssinen
Metadata
Metadata
Assignees
Labels
area-System.Numericshelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributors