Average Error: 0.6 → 1.0
Time: 4.6s
Precision: binary64
\[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}\]
\[1 - \frac{\frac{x}{y - t}}{y - z}\]
1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}
1 - \frac{\frac{x}{y - t}}{y - z}
(FPCore (x y z t) :precision binary64 (- 1.0 (/ x (* (- y z) (- y t)))))
(FPCore (x y z t) :precision binary64 (- 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) {
	return 1.0 - ((x / (y - t)) / (y - z));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.6

    \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}\]
  2. Using strategy rm
  3. Applied *-un-lft-identity_binary640.6

    \[\leadsto 1 - \frac{\color{blue}{1 \cdot x}}{\left(y - z\right) \cdot \left(y - t\right)}\]
  4. Applied times-frac_binary641.0

    \[\leadsto 1 - \color{blue}{\frac{1}{y - z} \cdot \frac{x}{y - t}}\]
  5. Using strategy rm
  6. Applied associate-*l/_binary641.0

    \[\leadsto 1 - \color{blue}{\frac{1 \cdot \frac{x}{y - t}}{y - z}}\]
  7. Simplified1.0

    \[\leadsto 1 - \frac{\color{blue}{\frac{x}{y - t}}}{y - z}\]
  8. Final simplification1.0

    \[\leadsto 1 - \frac{\frac{x}{y - t}}{y - z}\]

Reproduce

herbie shell --seed 2020273 
(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)))))