Average Error: 4.8 → 4.8
Time: 55.3s
Precision: 64
\[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\]
\[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\]
x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)
x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)
double f(double x, double y, double z, double t) {
        double r19246377 = x;
        double r19246378 = y;
        double r19246379 = z;
        double r19246380 = r19246378 / r19246379;
        double r19246381 = t;
        double r19246382 = 1.0;
        double r19246383 = r19246382 - r19246379;
        double r19246384 = r19246381 / r19246383;
        double r19246385 = r19246380 - r19246384;
        double r19246386 = r19246377 * r19246385;
        return r19246386;
}

double f(double x, double y, double z, double t) {
        double r19246387 = x;
        double r19246388 = y;
        double r19246389 = z;
        double r19246390 = r19246388 / r19246389;
        double r19246391 = t;
        double r19246392 = 1.0;
        double r19246393 = r19246392 - r19246389;
        double r19246394 = r19246391 / r19246393;
        double r19246395 = r19246390 - r19246394;
        double r19246396 = r19246387 * r19246395;
        return r19246396;
}

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.8
Target4.3
Herbie4.8
\[\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.8

    \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\]
  2. Final simplification4.8

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

Reproduce

herbie shell --seed 2019200 
(FPCore (x y z t)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"

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

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