← Back to events
ActiveAIRelease

viable/strict/1792277451: [MPS] Fix complex log1p precision (#201093)

What happened

Complex log1p on MPS computed log(hypot(1 + x, y)) , so for small |z| everything below eps relative to 1 was lost in 1 + x (e.g. log1p(1e-19+1e-18j) had a real part of 0 instead of 1e-19 ), and, more generally, the real part cancels catastrophically whenever 1 + z is close to the unit circle ( log|1 + z| ~ 0 ). Against an mpmath reference the real part was off by up to ~8e6 ulp for small |z| and ~6e14 ulp near the u…

Summary assembled by rule from the sources below

Why it's spreading

Sources