1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}1 - x \cdot \frac{\frac{1}{y - z}}{y - t}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) {
return (1.0 - (x * ((1.0 / (y - z)) / (y - t))));
}



Bits error versus x



Bits error versus y



Bits error versus z



Bits error versus t
Results
Initial program 0.5
rmApplied associate-/r*1.0
rmApplied *-un-lft-identity1.0
Applied div-inv1.0
Applied times-frac0.6
Simplified0.6
Final simplification0.6
herbie shell --seed 2020057 +o rules:numerics
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, A"
:precision binary64
(- 1 (/ x (* (- y z) (- y t)))))