Average Error: 4.6 → 4.4
Time: 6.9s
Precision: 64
\[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\]
\[\left(\left(\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot x\right) \cdot \left(\sqrt[3]{\frac{\sqrt[3]{y}}{z}} \cdot \sqrt[3]{\frac{\sqrt[3]{y}}{z}}\right)\right) \cdot \sqrt[3]{\frac{\sqrt[3]{y}}{z}} + \left(x \cdot \frac{\sqrt[3]{t} \cdot \sqrt[3]{t}}{\sqrt[3]{1 - z} \cdot \sqrt[3]{1 - z}}\right) \cdot \left(-\frac{\sqrt[3]{t}}{\sqrt[3]{1 - z}}\right)\]
x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)
\left(\left(\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot x\right) \cdot \left(\sqrt[3]{\frac{\sqrt[3]{y}}{z}} \cdot \sqrt[3]{\frac{\sqrt[3]{y}}{z}}\right)\right) \cdot \sqrt[3]{\frac{\sqrt[3]{y}}{z}} + \left(x \cdot \frac{\sqrt[3]{t} \cdot \sqrt[3]{t}}{\sqrt[3]{1 - z} \cdot \sqrt[3]{1 - z}}\right) \cdot \left(-\frac{\sqrt[3]{t}}{\sqrt[3]{1 - z}}\right)
double f(double x, double y, double z, double t) {
        double r479644 = x;
        double r479645 = y;
        double r479646 = z;
        double r479647 = r479645 / r479646;
        double r479648 = t;
        double r479649 = 1.0;
        double r479650 = r479649 - r479646;
        double r479651 = r479648 / r479650;
        double r479652 = r479647 - r479651;
        double r479653 = r479644 * r479652;
        return r479653;
}

double f(double x, double y, double z, double t) {
        double r479654 = y;
        double r479655 = cbrt(r479654);
        double r479656 = r479655 * r479655;
        double r479657 = x;
        double r479658 = r479656 * r479657;
        double r479659 = z;
        double r479660 = r479655 / r479659;
        double r479661 = cbrt(r479660);
        double r479662 = r479661 * r479661;
        double r479663 = r479658 * r479662;
        double r479664 = r479663 * r479661;
        double r479665 = t;
        double r479666 = cbrt(r479665);
        double r479667 = r479666 * r479666;
        double r479668 = 1.0;
        double r479669 = r479668 - r479659;
        double r479670 = cbrt(r479669);
        double r479671 = r479670 * r479670;
        double r479672 = r479667 / r479671;
        double r479673 = r479657 * r479672;
        double r479674 = r479666 / r479670;
        double r479675 = -r479674;
        double r479676 = r479673 * r479675;
        double r479677 = r479664 + r479676;
        return r479677;
}

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

Target

Original4.6
Target4.4
Herbie4.4
\[\begin{array}{l} \mathbf{if}\;x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \lt -7.623226303312042442144691872793570510727 \cdot 10^{-196}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t \cdot \frac{1}{1 - z}\right)\\ \mathbf{elif}\;x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \lt 1.413394492770230216018398633584271456447 \cdot 10^{-211}:\\ \;\;\;\;\frac{y \cdot x}{z} + \left(-\frac{t \cdot x}{1 - z}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t \cdot \frac{1}{1 - z}\right)\\ \end{array}\]

Derivation

  1. Initial program 4.6

    \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\]
  2. Using strategy rm
  3. Applied sub-neg4.6

    \[\leadsto x \cdot \color{blue}{\left(\frac{y}{z} + \left(-\frac{t}{1 - z}\right)\right)}\]
  4. Applied distribute-lft-in4.6

    \[\leadsto \color{blue}{x \cdot \frac{y}{z} + x \cdot \left(-\frac{t}{1 - z}\right)}\]
  5. Using strategy rm
  6. Applied *-un-lft-identity4.6

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

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

    \[\leadsto x \cdot \color{blue}{\left(\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{1} \cdot \frac{\sqrt[3]{y}}{z}\right)} + x \cdot \left(-\frac{t}{1 - z}\right)\]
  9. Applied associate-*r*4.3

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

    \[\leadsto \color{blue}{\left(\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot x\right)} \cdot \frac{\sqrt[3]{y}}{z} + x \cdot \left(-\frac{t}{1 - z}\right)\]
  11. Using strategy rm
  12. Applied add-cube-cbrt4.5

    \[\leadsto \left(\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot x\right) \cdot \frac{\sqrt[3]{y}}{z} + x \cdot \left(-\frac{t}{\color{blue}{\left(\sqrt[3]{1 - z} \cdot \sqrt[3]{1 - z}\right) \cdot \sqrt[3]{1 - z}}}\right)\]
  13. Applied add-cube-cbrt4.7

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

    \[\leadsto \left(\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot x\right) \cdot \frac{\sqrt[3]{y}}{z} + x \cdot \left(-\color{blue}{\frac{\sqrt[3]{t} \cdot \sqrt[3]{t}}{\sqrt[3]{1 - z} \cdot \sqrt[3]{1 - z}} \cdot \frac{\sqrt[3]{t}}{\sqrt[3]{1 - z}}}\right)\]
  15. Applied distribute-rgt-neg-in4.7

    \[\leadsto \left(\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot x\right) \cdot \frac{\sqrt[3]{y}}{z} + x \cdot \color{blue}{\left(\frac{\sqrt[3]{t} \cdot \sqrt[3]{t}}{\sqrt[3]{1 - z} \cdot \sqrt[3]{1 - z}} \cdot \left(-\frac{\sqrt[3]{t}}{\sqrt[3]{1 - z}}\right)\right)}\]
  16. Applied associate-*r*4.3

    \[\leadsto \left(\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot x\right) \cdot \frac{\sqrt[3]{y}}{z} + \color{blue}{\left(x \cdot \frac{\sqrt[3]{t} \cdot \sqrt[3]{t}}{\sqrt[3]{1 - z} \cdot \sqrt[3]{1 - z}}\right) \cdot \left(-\frac{\sqrt[3]{t}}{\sqrt[3]{1 - z}}\right)}\]
  17. Using strategy rm
  18. Applied add-cube-cbrt4.4

    \[\leadsto \left(\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot x\right) \cdot \color{blue}{\left(\left(\sqrt[3]{\frac{\sqrt[3]{y}}{z}} \cdot \sqrt[3]{\frac{\sqrt[3]{y}}{z}}\right) \cdot \sqrt[3]{\frac{\sqrt[3]{y}}{z}}\right)} + \left(x \cdot \frac{\sqrt[3]{t} \cdot \sqrt[3]{t}}{\sqrt[3]{1 - z} \cdot \sqrt[3]{1 - z}}\right) \cdot \left(-\frac{\sqrt[3]{t}}{\sqrt[3]{1 - z}}\right)\]
  19. Applied associate-*r*4.4

    \[\leadsto \color{blue}{\left(\left(\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot x\right) \cdot \left(\sqrt[3]{\frac{\sqrt[3]{y}}{z}} \cdot \sqrt[3]{\frac{\sqrt[3]{y}}{z}}\right)\right) \cdot \sqrt[3]{\frac{\sqrt[3]{y}}{z}}} + \left(x \cdot \frac{\sqrt[3]{t} \cdot \sqrt[3]{t}}{\sqrt[3]{1 - z} \cdot \sqrt[3]{1 - z}}\right) \cdot \left(-\frac{\sqrt[3]{t}}{\sqrt[3]{1 - z}}\right)\]
  20. Final simplification4.4

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

Reproduce

herbie shell --seed 2019362 +o rules:numerics
(FPCore (x y z t)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"
  :precision binary64

  :herbie-target
  (if (< (* x (- (/ y z) (/ t (- 1 z)))) -7.623226303312042e-196) (* x (- (/ y z) (* t (/ 1 (- 1 z))))) (if (< (* x (- (/ y z) (/ t (- 1 z)))) 1.4133944927702302e-211) (+ (/ (* y x) z) (- (/ (* t x) (- 1 z)))) (* x (- (/ y z) (* t (/ 1 (- 1 z)))))))

  (* x (- (/ y z) (/ t (- 1 z)))))