Average Error: 0.6 → 0.6
Time: 22.2s
Precision: binary64
\[[z, t] = \mathsf{sort}([z, t]) \\]
\[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
\[1 + \sqrt[3]{x} \cdot \frac{\frac{-1}{\frac{y - z}{\sqrt[3]{x} \cdot \sqrt[3]{x}}}}{y - t} \]
1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}
1 + \sqrt[3]{x} \cdot \frac{\frac{-1}{\frac{y - z}{\sqrt[3]{x} \cdot \sqrt[3]{x}}}}{y - t}
(FPCore (x y z t) :precision binary64 (- 1.0 (/ x (* (- y z) (- y t)))))
(FPCore (x y z t)
 :precision binary64
 (+ 1.0 (* (cbrt x) (/ (/ -1.0 (/ (- y z) (* (cbrt x) (cbrt x)))) (- 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 + (cbrt(x) * ((-1.0 / ((y - z) / (cbrt(x) * cbrt(x)))) / (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.6

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

    \[\leadsto 1 - \color{blue}{\frac{1}{\frac{\left(y - z\right) \cdot \left(y - t\right)}{x}}} \]
  3. Applied add-cube-cbrt_binary640.8

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

    \[\leadsto 1 - \frac{1}{\color{blue}{\frac{y - z}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{y - t}{\sqrt[3]{x}}}} \]
  5. Applied add-cube-cbrt_binary640.5

    \[\leadsto 1 - \frac{\color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}}}{\frac{y - z}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{y - t}{\sqrt[3]{x}}} \]
  6. Applied times-frac_binary640.6

    \[\leadsto 1 - \color{blue}{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\frac{y - z}{\sqrt[3]{x} \cdot \sqrt[3]{x}}} \cdot \frac{\sqrt[3]{1}}{\frac{y - t}{\sqrt[3]{x}}}} \]
  7. Applied cancel-sign-sub-inv_binary640.6

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

    \[\leadsto 1 + \color{blue}{\frac{\frac{-1}{\frac{y - z}{\sqrt[3]{x} \cdot \sqrt[3]{x}}}}{y - t} \cdot \sqrt[3]{x}} \]
  9. Final simplification0.6

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

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