Average Error: 0.7 → 1.1
Time: 19.4s
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 r157590 = 1.0;
        double r157591 = x;
        double r157592 = y;
        double r157593 = z;
        double r157594 = r157592 - r157593;
        double r157595 = t;
        double r157596 = r157592 - r157595;
        double r157597 = r157594 * r157596;
        double r157598 = r157591 / r157597;
        double r157599 = r157590 - r157598;
        return r157599;
}

double f(double x, double y, double z, double t) {
        double r157600 = 1.0;
        double r157601 = 1.0;
        double r157602 = y;
        double r157603 = z;
        double r157604 = r157602 - r157603;
        double r157605 = r157601 / r157604;
        double r157606 = x;
        double r157607 = t;
        double r157608 = r157602 - r157607;
        double r157609 = -r157607;
        double r157610 = r157609 + r157607;
        double r157611 = r157608 + r157610;
        double r157612 = r157606 / r157611;
        double r157613 = r157605 * r157612;
        double r157614 = r157600 - r157613;
        return r157614;
}

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