Average Error: 0.7 → 1.1
Time: 20.5s
Precision: 64
\[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}\]
\[1 - \frac{1}{y - z} \cdot \frac{x}{\left(y - t\right) + \left(\left(-t\right) + t\right)}\]
1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}
1 - \frac{1}{y - z} \cdot \frac{x}{\left(y - t\right) + \left(\left(-t\right) + t\right)}
double f(double x, double y, double z, double t) {
        double r162327 = 1.0;
        double r162328 = x;
        double r162329 = y;
        double r162330 = z;
        double r162331 = r162329 - r162330;
        double r162332 = t;
        double r162333 = r162329 - r162332;
        double r162334 = r162331 * r162333;
        double r162335 = r162328 / r162334;
        double r162336 = r162327 - r162335;
        return r162336;
}

double f(double x, double y, double z, double t) {
        double r162337 = 1.0;
        double r162338 = 1.0;
        double r162339 = y;
        double r162340 = z;
        double r162341 = r162339 - r162340;
        double r162342 = r162338 / r162341;
        double r162343 = x;
        double r162344 = t;
        double r162345 = r162339 - r162344;
        double r162346 = -r162344;
        double r162347 = r162346 + r162344;
        double r162348 = r162345 + r162347;
        double r162349 = r162343 / r162348;
        double r162350 = r162342 * r162349;
        double r162351 = r162337 - r162350;
        return r162351;
}

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. Using strategy rm
  3. Applied add-cube-cbrt0.9

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

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

    \[\leadsto 1 - \frac{x}{\left(y - z\right) \cdot \color{blue}{\left(\mathsf{fma}\left(\sqrt[3]{y} \cdot \sqrt[3]{y}, \sqrt[3]{y}, -\sqrt[3]{t} \cdot \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right)\right) + \mathsf{fma}\left(-\sqrt[3]{t}, \sqrt[3]{t} \cdot \sqrt[3]{t}, \sqrt[3]{t} \cdot \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right)\right)\right)}}\]
  6. Applied distribute-lft-in7.1

    \[\leadsto 1 - \frac{x}{\color{blue}{\left(y - z\right) \cdot \mathsf{fma}\left(\sqrt[3]{y} \cdot \sqrt[3]{y}, \sqrt[3]{y}, -\sqrt[3]{t} \cdot \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right)\right) + \left(y - z\right) \cdot \mathsf{fma}\left(-\sqrt[3]{t}, \sqrt[3]{t} \cdot \sqrt[3]{t}, \sqrt[3]{t} \cdot \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right)\right)}}\]
  7. Simplified7.0

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

    \[\leadsto 1 - \frac{x}{\left(y - z\right) \cdot \left({\left(\sqrt[3]{y}\right)}^{3} - t\right) + \color{blue}{\left(y - z\right) \cdot \left(\left(-t\right) + t\right)}}\]
  9. Using strategy rm
  10. Applied distribute-lft-out0.8

    \[\leadsto 1 - \frac{x}{\color{blue}{\left(y - z\right) \cdot \left(\left({\left(\sqrt[3]{y}\right)}^{3} - t\right) + \left(\left(-t\right) + t\right)\right)}}\]
  11. Applied *-un-lft-identity0.8

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

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

    \[\leadsto 1 - \frac{1}{y - z} \cdot \color{blue}{\frac{x}{\left(y - t\right) + \left(\left(-t\right) + t\right)}}\]
  14. Final simplification1.1

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

Reproduce

herbie shell --seed 2019325 +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)))))