Closed stephentyrone closed 3 years ago
@NevinBR what would you prefer to be credited as in the comments?
Note that this doesn't yet handle Re(z) ≈ -1 quite right. That's relatively easy to fix up, but I have some other work to do today, so it'll have to wait.
@NevinBR what would you prefer to be credited as in the comments?
I’d be a little surprised if I’m the first to create an implementation like this, but any of “Nevin”, “NevinBR”, or “Nevin B-R” would be fine.
Adapts @NevinBR's cute factorization of the real part here:
https://forums.swift.org/t/elementaryfunctions-compliance-for-complex/37903/3
Adds a little bit of FMA magic to avoid catastrophic cancellation and recover a good componentwise error bound as well as an error bound in the complex norm.