Average Error: 3.9 → 3.5
Time: 6.6s
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}\;a \le 4.1035905870621692 \cdot 10^{175}:\\ \;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{a + t}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + \frac{5}{6}\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{x + \log \left({\left(e^{{\left(e^{c \cdot 0.83333333333333337 + a \cdot \left(c - b\right)}\right)}^{2}}\right)}^{y}\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}\;a \le 4.1035905870621692 \cdot 10^{175}:\\
\;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{a + t}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + \frac{5}{6}\right)\right)\right)}}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{x + \log \left({\left(e^{{\left(e^{c \cdot 0.83333333333333337 + a \cdot \left(c - b\right)}\right)}^{2}}\right)}^{y}\right)}\\

\end{array}
double code(double x, double y, double z, double t, double a, double b, double c) {
	return ((double) (x / ((double) (x + ((double) (y * ((double) exp(((double) (2.0 * ((double) (((double) (((double) (z * ((double) sqrt(((double) (t + a)))))) / t)) - ((double) (((double) (b - c)) * ((double) (((double) (a + ((double) (5.0 / 6.0)))) - ((double) (2.0 / ((double) (t * 3.0))))))))))))))))))));
}
double code(double x, double y, double z, double t, double a, double b, double c) {
	double VAR;
	if ((a <= 4.103590587062169e+175)) {
		VAR = ((double) (x / ((double) (x + ((double) (y * ((double) pow(((double) exp(2.0)), ((double) (((double) (z * ((double) (((double) sqrt(((double) (a + t)))) / t)))) + ((double) (((double) (b - c)) * ((double) (((double) (2.0 / ((double) (t * 3.0)))) - ((double) (a + ((double) (5.0 / 6.0))))))))))))))))));
	} else {
		VAR = ((double) (x / ((double) (x + ((double) log(((double) pow(((double) exp(((double) pow(((double) exp(((double) (((double) (c * 0.8333333333333334)) + ((double) (a * ((double) (c - b)))))))), 2.0)))), y))))))));
	}
	return VAR;
}

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
Target2.9
Herbie3.5
\[\begin{array}{l} \mathbf{if}\;t \lt -2.1183266448915811 \cdot 10^{-50}:\\ \;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(a \cdot c + 0.83333333333333337 \cdot c\right) - a \cdot b\right)}}\\ \mathbf{elif}\;t \lt 5.19658877065154709 \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 2 regimes
  2. if a < 4.1035905870621692e175

    1. Initial program 2.9

      \[\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. Simplified2.1

      \[\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)}}}\]

    if 4.1035905870621692e175 < a

    1. Initial program 7.5

      \[\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. Simplified8.2

      \[\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 inf 14.5

      \[\leadsto \frac{x}{x + y \cdot {\left(e^{2}\right)}^{\color{blue}{\left(\left(a \cdot c + 0.83333333333333337 \cdot c\right) - a \cdot b\right)}}}\]
    4. Simplified14.5

      \[\leadsto \frac{x}{x + y \cdot {\left(e^{2}\right)}^{\color{blue}{\left(c \cdot \left(a + 0.83333333333333337\right) - a \cdot b\right)}}}\]
    5. Using strategy rm
    6. Applied add-log-exp14.5

      \[\leadsto \frac{x}{x + \color{blue}{\log \left(e^{y \cdot {\left(e^{2}\right)}^{\left(c \cdot \left(a + 0.83333333333333337\right) - a \cdot b\right)}}\right)}}\]
    7. Simplified8.7

      \[\leadsto \frac{x}{x + \log \color{blue}{\left({\left(e^{{\left(e^{c \cdot 0.83333333333333337 + a \cdot \left(c - b\right)}\right)}^{2}}\right)}^{y}\right)}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification3.5

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \le 4.1035905870621692 \cdot 10^{175}:\\ \;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{a + t}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + \frac{5}{6}\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{x + \log \left({\left(e^{{\left(e^{c \cdot 0.83333333333333337 + a \cdot \left(c - b\right)}\right)}^{2}}\right)}^{y}\right)}\\ \end{array}\]

Reproduce

herbie shell --seed 2020184 
(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)))))))))))