1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}
\begin{array}{l}
\mathbf{if}\;z \leq -5.9303573156645634 \cdot 10^{+94}:\\
\;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{x}{y - t}}{y - z}\\
\end{array}
(FPCore (x y z t) :precision binary64 (- 1.0 (/ x (* (- y z) (- y t)))))
(FPCore (x y z t) :precision binary64 (if (<= z -5.9303573156645634e+94) (+ 1.0 (/ (/ x z) (- y t))) (- 1.0 (/ (/ x (- y t)) (- y z)))))
double code(double x, double y, double z, double t) {
return 1.0 - (x / ((y - z) * (y - t)));
}
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5.9303573156645634e+94) {
tmp = 1.0 + ((x / z) / (y - t));
} else {
tmp = 1.0 - ((x / (y - t)) / (y - z));
}
return tmp;
}



Bits error versus x



Bits error versus y



Bits error versus z



Bits error versus t
Results
if z < -5.9303573156645634e94Initial program 0.0
Applied associate-/r*_binary640.0
Taylor expanded in y around 0 0.2
Simplified0.2
if -5.9303573156645634e94 < z Initial program 1.0
Applied *-commutative_binary641.0
Applied associate-/r*_binary640.3
Final simplification0.3
herbie shell --seed 2021275
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, A"
:precision binary64
(- 1.0 (/ x (* (- y z) (- y t)))))