Computing the CDF of a normal distribution gives the wrong result if the location is specified as an integer array, and CDF is called with the smallest legal int32 value.
MWE: The following should all return 0.0, as the CDF $F(x)$ of a Gaussian should approach 0 for $x \to -\infty$
A workaround for me is to explicitly cast the location vector to float.
This is a highly unlikely edge-case, but it did occur for me during a real-world problem (computing mutual information).
System info (python version, jaxlib version, accelerator, etc.)
Description
Computing the CDF of a normal distribution gives the wrong result if the location is specified as an integer array, and CDF is called with the smallest legal int32 value.
MWE: The following should all return
0.0
, as the CDF $F(x)$ of a Gaussian should approach 0 for $x \to -\infty$But instead it yields:
Note that
log_cdf
seems to be OK.A workaround for me is to explicitly cast the location vector to float. This is a highly unlikely edge-case, but it did occur for me during a real-world problem (computing mutual information).
System info (python version, jaxlib version, accelerator, etc.)