the.bay.news

Wrong component signs in Complex.cosh/sinh for large negative real parts

Swift Forums
Wrong component signs in Complex.cosh/sinh for large negative real parts
While independently testing Swift Numerics main at commit 899af71c0256d0ad181e3b7eb3453c1065d928a5, I found that the overflow-avoiding fast paths for Complex.cosh and Complex.sinh return the wrong sign for one component when the real part is sufficiently large and negative. The error also propagates to Complex.cos and Complex.sin. This is a component-sign/quadrant error, rather than an accuracy-at-the-last-bit issue. Minimal reproducer import ComplexModule typealias C = Complex<Double> print...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.