Average Error: 0.7 → 0.7
Time: 4.5s
Precision: binary64
\[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
\[1 + \frac{x}{\left(y - t\right) \cdot \left(z - y\right)} \]
1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}
1 + \frac{x}{\left(y - t\right) \cdot \left(z - y\right)}
(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) (- z y)))))
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) * (z - y)));
}

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

    \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
  2. Applied frac-2neg_binary640.7

    \[\leadsto 1 - \color{blue}{\frac{-x}{-\left(y - z\right) \cdot \left(y - t\right)}} \]
  3. Simplified0.7

    \[\leadsto 1 - \frac{-x}{\color{blue}{-\left(y - t\right) \cdot \left(y - z\right)}} \]
  4. Final simplification0.7

    \[\leadsto 1 + \frac{x}{\left(y - t\right) \cdot \left(z - y\right)} \]

Reproduce

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