Commit 0be1190c authored by Justin Lebar's avatar Justin Lebar Committed by TensorFlower Gardener
Browse files

[XLA] Improve precision of lgamma.

Our lgamma implementation suffered from precision loss and nans primarily due
to naive computation of sin(pi * x): The multiplication may overflow or lose
precision.  This patch fixes that, and adds an exhaustive test that checks all
fp16 inputs, for this and other special functions.

There are many other special functions which fail the fp16 exhaustive test,
some quite spectacularly.  These will be handled separately, along with
(probably) some sort of fp32 test.

Relevant to #25052

PiperOrigin-RevId: 230831395
parent 456b5eaf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment