Average Error: 0.5 → 1.2
Time: 4.5s
Precision: 64
\[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}\]
\[1 - \frac{1}{y - z} \cdot \frac{x}{y - t}\]
1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}
1 - \frac{1}{y - z} \cdot \frac{x}{y - t}
double code(double x, double y, double z, double t) {
	return ((double) (1.0 - ((double) (x / ((double) (((double) (y - z)) * ((double) (y - t))))))));
}
double code(double x, double y, double z, double t) {
	return ((double) (1.0 - ((double) (((double) (1.0 / ((double) (y - z)))) * ((double) (x / ((double) (y - t))))))));
}

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.5

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

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

    \[\leadsto 1 - \color{blue}{\frac{1}{y - z} \cdot \frac{x}{y - t}}\]
  5. Final simplification1.2

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

Reproduce

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