Average Error: 3.9 → 4.1
Time: 8.1s
Precision: binary64
\[\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}\]
\[\begin{array}{l} \mathbf{if}\;t \leq -1.6844335713955825 \cdot 10^{-113}:\\ \;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{t + a}}{t} + \left(c \cdot \left(a + 0.8333333333333334\right) - a \cdot b\right)\right)}}\\ \mathbf{elif}\;t \leq -2.683950136323593 \cdot 10^{-266}:\\ \;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(\frac{z \cdot \left(\sqrt{t + a} \cdot \left(t \cdot \left(a - \frac{5}{6}\right)\right)\right) + t \cdot \left(\left(b - c\right) \cdot \left(\left(a - \frac{5}{6}\right) \cdot 0.6666666666666666 + t \cdot \left(\frac{5}{6} \cdot \frac{5}{6} - a \cdot a\right)\right)\right)}{t \cdot \left(t \cdot \left(a - \frac{5}{6}\right)\right)}\right)}}\\ \mathbf{elif}\;t \leq -4.595287319339345 \cdot 10^{-303}:\\ \;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{t + a}}{t} + \left(c \cdot \left(a + 0.8333333333333334\right) - a \cdot b\right)\right)}}\\ \mathbf{elif}\;t \leq 0.000868470817534886:\\ \;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(\frac{z \cdot \left(\sqrt{t + a} \cdot \left(t \cdot \left(a - \frac{5}{6}\right)\right)\right) + t \cdot \left(\left(b - c\right) \cdot \left(\left(a - \frac{5}{6}\right) \cdot 0.6666666666666666 + t \cdot \left(\frac{5}{6} \cdot \frac{5}{6} - a \cdot a\right)\right)\right)}{t \cdot \left(t \cdot \left(a - \frac{5}{6}\right)\right)}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\log \left(e^{\frac{2}{t \cdot 3}}\right) - \left(a + \frac{5}{6}\right)\right)\right)}}\\ \end{array}\]
\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}
\begin{array}{l}
\mathbf{if}\;t \leq -1.6844335713955825 \cdot 10^{-113}:\\
\;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{t + a}}{t} + \left(c \cdot \left(a + 0.8333333333333334\right) - a \cdot b\right)\right)}}\\

\mathbf{elif}\;t \leq -2.683950136323593 \cdot 10^{-266}:\\
\;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(\frac{z \cdot \left(\sqrt{t + a} \cdot \left(t \cdot \left(a - \frac{5}{6}\right)\right)\right) + t \cdot \left(\left(b - c\right) \cdot \left(\left(a - \frac{5}{6}\right) \cdot 0.6666666666666666 + t \cdot \left(\frac{5}{6} \cdot \frac{5}{6} - a \cdot a\right)\right)\right)}{t \cdot \left(t \cdot \left(a - \frac{5}{6}\right)\right)}\right)}}\\

\mathbf{elif}\;t \leq -4.595287319339345 \cdot 10^{-303}:\\
\;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{t + a}}{t} + \left(c \cdot \left(a + 0.8333333333333334\right) - a \cdot b\right)\right)}}\\

\mathbf{elif}\;t \leq 0.000868470817534886:\\
\;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(\frac{z \cdot \left(\sqrt{t + a} \cdot \left(t \cdot \left(a - \frac{5}{6}\right)\right)\right) + t \cdot \left(\left(b - c\right) \cdot \left(\left(a - \frac{5}{6}\right) \cdot 0.6666666666666666 + t \cdot \left(\frac{5}{6} \cdot \frac{5}{6} - a \cdot a\right)\right)\right)}{t \cdot \left(t \cdot \left(a - \frac{5}{6}\right)\right)}\right)}}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\log \left(e^{\frac{2}{t \cdot 3}}\right) - \left(a + \frac{5}{6}\right)\right)\right)}}\\

\end{array}
(FPCore (x y z t a b c)
 :precision binary64
 (/
  x
  (+
   x
   (*
    y
    (exp
     (*
      2.0
      (-
       (/ (* z (sqrt (+ t a))) t)
       (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))
(FPCore (x y z t a b c)
 :precision binary64
 (if (<= t -1.6844335713955825e-113)
   (/
    x
    (+
     x
     (*
      y
      (pow
       (exp 2.0)
       (+
        (* z (/ (sqrt (+ t a)) t))
        (- (* c (+ a 0.8333333333333334)) (* a b)))))))
   (if (<= t -2.683950136323593e-266)
     (/
      x
      (+
       x
       (*
        y
        (pow
         (exp 2.0)
         (/
          (+
           (* z (* (sqrt (+ t a)) (* t (- a (/ 5.0 6.0)))))
           (*
            t
            (*
             (- b c)
             (+
              (* (- a (/ 5.0 6.0)) 0.6666666666666666)
              (* t (- (* (/ 5.0 6.0) (/ 5.0 6.0)) (* a a)))))))
          (* t (* t (- a (/ 5.0 6.0)))))))))
     (if (<= t -4.595287319339345e-303)
       (/
        x
        (+
         x
         (*
          y
          (pow
           (exp 2.0)
           (+
            (* z (/ (sqrt (+ t a)) t))
            (- (* c (+ a 0.8333333333333334)) (* a b)))))))
       (if (<= t 0.000868470817534886)
         (/
          x
          (+
           x
           (*
            y
            (pow
             (exp 2.0)
             (/
              (+
               (* z (* (sqrt (+ t a)) (* t (- a (/ 5.0 6.0)))))
               (*
                t
                (*
                 (- b c)
                 (+
                  (* (- a (/ 5.0 6.0)) 0.6666666666666666)
                  (* t (- (* (/ 5.0 6.0) (/ 5.0 6.0)) (* a a)))))))
              (* t (* t (- a (/ 5.0 6.0)))))))))
         (/
          x
          (+
           x
           (*
            y
            (pow
             (exp 2.0)
             (+
              (* z (/ (sqrt (+ t a)) t))
              (*
               (- b c)
               (- (log (exp (/ 2.0 (* t 3.0)))) (+ a (/ 5.0 6.0))))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	return (x / ((double) (x + ((double) (y * ((double) exp(((double) (2.0 * ((double) ((((double) (z * ((double) sqrt(((double) (t + a)))))) / t) - ((double) (((double) (b - c)) * ((double) (((double) (a + (5.0 / 6.0))) - (2.0 / ((double) (t * 3.0))))))))))))))))));
}
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((t <= -1.6844335713955825e-113)) {
		tmp = (x / ((double) (x + ((double) (y * ((double) pow(((double) exp(2.0)), ((double) (((double) (z * (((double) sqrt(((double) (t + a)))) / t))) + ((double) (((double) (c * ((double) (a + 0.8333333333333334)))) - ((double) (a * b)))))))))))));
	} else {
		double tmp_1;
		if ((t <= -2.683950136323593e-266)) {
			tmp_1 = (x / ((double) (x + ((double) (y * ((double) pow(((double) exp(2.0)), (((double) (((double) (z * ((double) (((double) sqrt(((double) (t + a)))) * ((double) (t * ((double) (a - (5.0 / 6.0))))))))) + ((double) (t * ((double) (((double) (b - c)) * ((double) (((double) (((double) (a - (5.0 / 6.0))) * 0.6666666666666666)) + ((double) (t * ((double) (((double) ((5.0 / 6.0) * (5.0 / 6.0))) - ((double) (a * a)))))))))))))) / ((double) (t * ((double) (t * ((double) (a - (5.0 / 6.0)))))))))))))));
		} else {
			double tmp_2;
			if ((t <= -4.595287319339345e-303)) {
				tmp_2 = (x / ((double) (x + ((double) (y * ((double) pow(((double) exp(2.0)), ((double) (((double) (z * (((double) sqrt(((double) (t + a)))) / t))) + ((double) (((double) (c * ((double) (a + 0.8333333333333334)))) - ((double) (a * b)))))))))))));
			} else {
				double tmp_3;
				if ((t <= 0.000868470817534886)) {
					tmp_3 = (x / ((double) (x + ((double) (y * ((double) pow(((double) exp(2.0)), (((double) (((double) (z * ((double) (((double) sqrt(((double) (t + a)))) * ((double) (t * ((double) (a - (5.0 / 6.0))))))))) + ((double) (t * ((double) (((double) (b - c)) * ((double) (((double) (((double) (a - (5.0 / 6.0))) * 0.6666666666666666)) + ((double) (t * ((double) (((double) ((5.0 / 6.0) * (5.0 / 6.0))) - ((double) (a * a)))))))))))))) / ((double) (t * ((double) (t * ((double) (a - (5.0 / 6.0)))))))))))))));
				} else {
					tmp_3 = (x / ((double) (x + ((double) (y * ((double) pow(((double) exp(2.0)), ((double) (((double) (z * (((double) sqrt(((double) (t + a)))) / t))) + ((double) (((double) (b - c)) * ((double) (((double) log(((double) exp((2.0 / ((double) (t * 3.0))))))) - ((double) (a + (5.0 / 6.0))))))))))))))));
				}
				tmp_2 = tmp_3;
			}
			tmp_1 = tmp_2;
		}
		tmp = tmp_1;
	}
	return tmp;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Bits error versus c

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original3.9
Target3.1
Herbie4.1
\[\begin{array}{l} \mathbf{if}\;t < -2.118326644891581 \cdot 10^{-50}:\\ \;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(a \cdot c + 0.8333333333333334 \cdot c\right) - a \cdot b\right)}}\\ \mathbf{elif}\;t < 5.196588770651547 \cdot 10^{-123}:\\ \;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{\left(z \cdot \sqrt{t + a}\right) \cdot \left(\left(3 \cdot t\right) \cdot \left(a - \frac{5}{6}\right)\right) - \left(\left(\frac{5}{6} + a\right) \cdot \left(3 \cdot t\right) - 2\right) \cdot \left(\left(a - \frac{5}{6}\right) \cdot \left(\left(b - c\right) \cdot t\right)\right)}{\left(\left(t \cdot t\right) \cdot 3\right) \cdot \left(a - \frac{5}{6}\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}\\ \end{array}\]

Derivation

  1. Split input into 3 regimes
  2. if t < -1.68443357139558254e-113 or -2.683950136323593e-266 < t < -4.5952873193393448e-303

    1. Initial program Error: 4.6 bits

      \[\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}\]
    2. SimplifiedError: 4.5 bits

      \[\leadsto \color{blue}{\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + \frac{5}{6}\right)\right)\right)}}}\]
    3. Taylor expanded around 0 Error: 4.5 bits

      \[\leadsto \frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\color{blue}{\frac{0.6666666666666666}{t}} - \left(a + \frac{5}{6}\right)\right)\right)}}\]
    4. Taylor expanded around inf Error: 7.3 bits

      \[\leadsto \frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{t + a}}{t} + \color{blue}{\left(\left(a \cdot c + 0.8333333333333334 \cdot c\right) - a \cdot b\right)}\right)}}\]
    5. SimplifiedError: 7.3 bits

      \[\leadsto \frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{t + a}}{t} + \color{blue}{\left(c \cdot \left(a + 0.8333333333333334\right) - a \cdot b\right)}\right)}}\]

    if -1.68443357139558254e-113 < t < -2.683950136323593e-266 or -4.5952873193393448e-303 < t < 8.6847081753488602e-4

    1. Initial program Error: 4.9 bits

      \[\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}\]
    2. SimplifiedError: 6.2 bits

      \[\leadsto \color{blue}{\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + \frac{5}{6}\right)\right)\right)}}}\]
    3. Taylor expanded around 0 Error: 6.2 bits

      \[\leadsto \frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\color{blue}{\frac{0.6666666666666666}{t}} - \left(a + \frac{5}{6}\right)\right)\right)}}\]
    4. Using strategy rm
    5. Applied flip-+Error: 8.7 bits

      \[\leadsto \frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\frac{0.6666666666666666}{t} - \color{blue}{\frac{a \cdot a - \frac{5}{6} \cdot \frac{5}{6}}{a - \frac{5}{6}}}\right)\right)}}\]
    6. Applied frac-subError: 8.7 bits

      \[\leadsto \frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{t + a}}{t} + \left(b - c\right) \cdot \color{blue}{\frac{0.6666666666666666 \cdot \left(a - \frac{5}{6}\right) - t \cdot \left(a \cdot a - \frac{5}{6} \cdot \frac{5}{6}\right)}{t \cdot \left(a - \frac{5}{6}\right)}}\right)}}\]
    7. Applied associate-*r/Error: 8.7 bits

      \[\leadsto \frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{t + a}}{t} + \color{blue}{\frac{\left(b - c\right) \cdot \left(0.6666666666666666 \cdot \left(a - \frac{5}{6}\right) - t \cdot \left(a \cdot a - \frac{5}{6} \cdot \frac{5}{6}\right)\right)}{t \cdot \left(a - \frac{5}{6}\right)}}\right)}}\]
    8. Applied associate-*r/Error: 7.6 bits

      \[\leadsto \frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(\color{blue}{\frac{z \cdot \sqrt{t + a}}{t}} + \frac{\left(b - c\right) \cdot \left(0.6666666666666666 \cdot \left(a - \frac{5}{6}\right) - t \cdot \left(a \cdot a - \frac{5}{6} \cdot \frac{5}{6}\right)\right)}{t \cdot \left(a - \frac{5}{6}\right)}\right)}}\]
    9. Applied frac-addError: 6.3 bits

      \[\leadsto \frac{x}{x + y \cdot {\left(e^{2}\right)}^{\color{blue}{\left(\frac{\left(z \cdot \sqrt{t + a}\right) \cdot \left(t \cdot \left(a - \frac{5}{6}\right)\right) + t \cdot \left(\left(b - c\right) \cdot \left(0.6666666666666666 \cdot \left(a - \frac{5}{6}\right) - t \cdot \left(a \cdot a - \frac{5}{6} \cdot \frac{5}{6}\right)\right)\right)}{t \cdot \left(t \cdot \left(a - \frac{5}{6}\right)\right)}\right)}}}\]
    10. SimplifiedError: 7.0 bits

      \[\leadsto \frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(\frac{\color{blue}{z \cdot \left(\sqrt{t + a} \cdot \left(t \cdot \left(a - \frac{5}{6}\right)\right)\right) + t \cdot \left(\left(b - c\right) \cdot \left(0.6666666666666666 \cdot \left(a - \frac{5}{6}\right) - t \cdot \left(a \cdot a - \frac{5}{6} \cdot \frac{5}{6}\right)\right)\right)}}{t \cdot \left(t \cdot \left(a - \frac{5}{6}\right)\right)}\right)}}\]

    if 8.6847081753488602e-4 < t

    1. Initial program Error: 2.6 bits

      \[\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}\]
    2. SimplifiedError: 0.2 bits

      \[\leadsto \color{blue}{\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + \frac{5}{6}\right)\right)\right)}}}\]
    3. Using strategy rm
    4. Applied add-log-expError: 0.2 bits

      \[\leadsto \frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\color{blue}{\log \left(e^{\frac{2}{t \cdot 3}}\right)} - \left(a + \frac{5}{6}\right)\right)\right)}}\]
  3. Recombined 3 regimes into one program.
  4. Final simplificationError: 4.1 bits

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6844335713955825 \cdot 10^{-113}:\\ \;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{t + a}}{t} + \left(c \cdot \left(a + 0.8333333333333334\right) - a \cdot b\right)\right)}}\\ \mathbf{elif}\;t \leq -2.683950136323593 \cdot 10^{-266}:\\ \;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(\frac{z \cdot \left(\sqrt{t + a} \cdot \left(t \cdot \left(a - \frac{5}{6}\right)\right)\right) + t \cdot \left(\left(b - c\right) \cdot \left(\left(a - \frac{5}{6}\right) \cdot 0.6666666666666666 + t \cdot \left(\frac{5}{6} \cdot \frac{5}{6} - a \cdot a\right)\right)\right)}{t \cdot \left(t \cdot \left(a - \frac{5}{6}\right)\right)}\right)}}\\ \mathbf{elif}\;t \leq -4.595287319339345 \cdot 10^{-303}:\\ \;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{t + a}}{t} + \left(c \cdot \left(a + 0.8333333333333334\right) - a \cdot b\right)\right)}}\\ \mathbf{elif}\;t \leq 0.000868470817534886:\\ \;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(\frac{z \cdot \left(\sqrt{t + a} \cdot \left(t \cdot \left(a - \frac{5}{6}\right)\right)\right) + t \cdot \left(\left(b - c\right) \cdot \left(\left(a - \frac{5}{6}\right) \cdot 0.6666666666666666 + t \cdot \left(\frac{5}{6} \cdot \frac{5}{6} - a \cdot a\right)\right)\right)}{t \cdot \left(t \cdot \left(a - \frac{5}{6}\right)\right)}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\log \left(e^{\frac{2}{t \cdot 3}}\right) - \left(a + \frac{5}{6}\right)\right)\right)}}\\ \end{array}\]

Reproduce

herbie shell --seed 2020203 
(FPCore (x y z t a b c)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, I"
  :precision binary64

  :herbie-target
  (if (< t -2.118326644891581e-50) (/ x (+ x (* y (exp (* 2.0 (- (+ (* a c) (* 0.8333333333333334 c)) (* a b))))))) (if (< t 5.196588770651547e-123) (/ x (+ x (* y (exp (* 2.0 (/ (- (* (* z (sqrt (+ t a))) (* (* 3.0 t) (- a (/ 5.0 6.0)))) (* (- (* (+ (/ 5.0 6.0) a) (* 3.0 t)) 2.0) (* (- a (/ 5.0 6.0)) (* (- b c) t)))) (* (* (* t t) 3.0) (- a (/ 5.0 6.0))))))))) (/ x (+ x (* y (exp (* 2.0 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))))))))

  (/ x (+ x (* y (exp (* 2.0 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))