Average Error: 1.8 → 0.9
Time: 44.8s
Precision: binary64
Cost: 84288
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
\[{\left(\frac{\sqrt[3]{-x} \cdot {\left(\sqrt[3]{\sqrt{e^{\mathsf{fma}\left(t + -1, \log a, \mathsf{fma}\left(y, \log z, -b\right)\right)}}}\right)}^{2}}{{\left(\sqrt[3]{\sqrt[3]{-y}}\right)}^{3}}\right)}^{3} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
(FPCore (x y z t a b)
 :precision binary64
 (pow
  (/
   (*
    (cbrt (- x))
    (pow
     (cbrt (sqrt (exp (fma (+ t -1.0) (log a) (fma y (log z) (- b))))))
     2.0))
   (pow (cbrt (cbrt (- y))) 3.0))
  3.0))
double code(double x, double y, double z, double t, double a, double b) {
	return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
double code(double x, double y, double z, double t, double a, double b) {
	return pow(((cbrt(-x) * pow(cbrt(sqrt(exp(fma((t + -1.0), log(a), fma(y, log(z), -b))))), 2.0)) / pow(cbrt(cbrt(-y)), 3.0)), 3.0);
}
function code(x, y, z, t, a, b)
	return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y)
end
function code(x, y, z, t, a, b)
	return Float64(Float64(cbrt(Float64(-x)) * (cbrt(sqrt(exp(fma(Float64(t + -1.0), log(a), fma(y, log(z), Float64(-b)))))) ^ 2.0)) / (cbrt(cbrt(Float64(-y))) ^ 3.0)) ^ 3.0
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
code[x_, y_, z_, t_, a_, b_] := N[Power[N[(N[(N[Power[(-x), 1/3], $MachinePrecision] * N[Power[N[Power[N[Sqrt[N[Exp[N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision] + N[(y * N[Log[z], $MachinePrecision] + (-b)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[Power[N[Power[(-y), 1/3], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
{\left(\frac{\sqrt[3]{-x} \cdot {\left(\sqrt[3]{\sqrt{e^{\mathsf{fma}\left(t + -1, \log a, \mathsf{fma}\left(y, \log z, -b\right)\right)}}}\right)}^{2}}{{\left(\sqrt[3]{\sqrt[3]{-y}}\right)}^{3}}\right)}^{3}

Error

Target

Original1.8
Target11.0
Herbie0.9
\[\begin{array}{l} \mathbf{if}\;t < -0.8845848504127471:\\ \;\;\;\;\frac{x \cdot \frac{{a}^{\left(t - 1\right)}}{y}}{\left(b + 1\right) - y \cdot \log z}\\ \mathbf{elif}\;t < 852031.2288374073:\\ \;\;\;\;\frac{\frac{x}{y} \cdot {a}^{\left(t - 1\right)}}{e^{b - \log z \cdot y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \frac{{a}^{\left(t - 1\right)}}{y}}{\left(b + 1\right) - y \cdot \log z}\\ \end{array} \]

Derivation

  1. Initial program 1.8

    \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
  2. Simplified7.6

    \[\leadsto \color{blue}{e^{\mathsf{fma}\left(t + -1, \log a, \mathsf{fma}\left(y, \log z, -b\right)\right)} \cdot \frac{x}{y}} \]
    Proof
  3. Applied egg-rr7.6

    \[\leadsto \color{blue}{{\left(\sqrt[3]{e^{\mathsf{fma}\left(t + -1, \log a, \mathsf{fma}\left(y, \log z, -b\right)\right)} \cdot \frac{x}{y}}\right)}^{3}} \]
  4. Applied egg-rr0.9

    \[\leadsto {\color{blue}{\left(\frac{\sqrt[3]{-x} \cdot \sqrt[3]{e^{\mathsf{fma}\left(t + -1, \log a, \mathsf{fma}\left(y, \log z, -b\right)\right)}}}{\sqrt[3]{-y}}\right)}}^{3} \]
  5. Applied egg-rr0.9

    \[\leadsto {\left(\frac{\sqrt[3]{-x} \cdot \color{blue}{{\left(\sqrt[3]{\sqrt{e^{\mathsf{fma}\left(t + -1, \log a, \mathsf{fma}\left(y, \log z, -b\right)\right)}}}\right)}^{2}}}{\sqrt[3]{-y}}\right)}^{3} \]
  6. Applied egg-rr0.9

    \[\leadsto {\left(\frac{\sqrt[3]{-x} \cdot {\left(\sqrt[3]{\sqrt{e^{\mathsf{fma}\left(t + -1, \log a, \mathsf{fma}\left(y, \log z, -b\right)\right)}}}\right)}^{2}}{\color{blue}{{\left(\sqrt[3]{\sqrt[3]{-y}}\right)}^{3}}}\right)}^{3} \]

Alternatives

Alternative 1
Error0.9
Cost71680
\[{\left(\frac{\sqrt[3]{-x} \cdot {\left(\sqrt[3]{\sqrt{\frac{1}{\frac{1}{e^{\mathsf{fma}\left(t + -1, \log a, \mathsf{fma}\left(y, \log z, -b\right)\right)}}}}}\right)}^{2}}{\sqrt[3]{-y}}\right)}^{3} \]
Alternative 2
Error0.9
Cost71424
\[{\left(\frac{\sqrt[3]{-x} \cdot {\left(\sqrt[3]{\sqrt[3]{e^{\mathsf{fma}\left(t + -1, \log a, \mathsf{fma}\left(y, \log z, -b\right)\right)}}}\right)}^{3}}{\sqrt[3]{-y}}\right)}^{3} \]
Alternative 3
Error0.9
Cost71424
\[{\left(\frac{\sqrt[3]{-x} \cdot {\left(\sqrt[3]{\sqrt{e^{\mathsf{fma}\left(t + -1, \log a, \mathsf{fma}\left(y, \log z, -b\right)\right)}}}\right)}^{2}}{\sqrt[3]{-y}}\right)}^{3} \]
Alternative 4
Error0.9
Cost58816
\[{\left(\frac{\sqrt[3]{-x} \cdot \sqrt[3]{\frac{1}{\frac{1}{e^{\mathsf{fma}\left(t + -1, \log a, \mathsf{fma}\left(y, \log z, -b\right)\right)}}}}}{\sqrt[3]{-y}}\right)}^{3} \]
Alternative 5
Error0.9
Cost58560
\[{\left(\frac{\sqrt[3]{-x} \cdot \sqrt[3]{e^{\mathsf{fma}\left(t + -1, \log a, \mathsf{fma}\left(y, \log z, -b\right)\right)}}}{\sqrt[3]{-y}}\right)}^{3} \]
Alternative 6
Error1.0
Cost52288
\[{\left(\frac{\sqrt[3]{-x} \cdot e^{\mathsf{fma}\left(t + -1, \log a, \mathsf{fma}\left(y, \log z, -b\right)\right) \cdot 0.3333333333333333}}{\sqrt[3]{-y}}\right)}^{3} \]
Alternative 7
Error1.8
Cost52032
\[{\left(\frac{\sqrt[3]{e^{\mathsf{fma}\left(t + -1, \log a, \mathsf{fma}\left(y, \log z, -b\right)\right)} \cdot x}}{\sqrt[3]{y}}\right)}^{3} \]
Alternative 8
Error1.8
Cost32896
\[\frac{1}{y} \cdot \left(e^{\mathsf{fma}\left(t + -1, \log a, \mathsf{fma}\left(y, \log z, -b\right)\right)} \cdot x\right) \]
Alternative 9
Error2.0
Cost26820
\[\begin{array}{l} \mathbf{if}\;\left(t - 1\right) \cdot \log a \leq -2000:\\ \;\;\;\;\frac{{a}^{t} \cdot x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{e^{\left(y \cdot \log z + -1 \cdot \log a\right) - b} \cdot x}{y}\\ \end{array} \]
Alternative 10
Error1.8
Cost20160
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
Alternative 11
Error7.2
Cost20040
\[\begin{array}{l} \mathbf{if}\;y \leq -9.5 \cdot 10^{+166}:\\ \;\;\;\;\frac{t + 1}{\sqrt[3]{y \cdot y}} \cdot \frac{x}{\sqrt[3]{y}}\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{+57}:\\ \;\;\;\;\frac{e^{\left(t - 1\right) \cdot \log a - b} \cdot x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \sqrt[3]{e^{3 \cdot \left(y \cdot \log z\right)}}}{y}\\ \end{array} \]
Alternative 12
Error13.1
Cost13768
\[\begin{array}{l} \mathbf{if}\;b \leq -1100000000:\\ \;\;\;\;\frac{{a}^{t} \cdot x}{y}\\ \mathbf{elif}\;b \leq 760:\\ \;\;\;\;e^{\left(t - 1\right) \cdot \log a - b} \cdot \frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \sqrt[3]{e^{-3 \cdot b}}}{y}\\ \end{array} \]
Alternative 13
Error12.4
Cost13768
\[\begin{array}{l} t_1 := \frac{t + 1}{\sqrt[3]{y \cdot y}} \cdot \frac{x}{\sqrt[3]{y}}\\ \mathbf{if}\;y \leq -9.5 \cdot 10^{+166}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{+142}:\\ \;\;\;\;e^{\left(t - 1\right) \cdot \log a - b} \cdot \frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 14
Error6.7
Cost13768
\[\begin{array}{l} t_1 := \frac{t + 1}{\sqrt[3]{y \cdot y}} \cdot \frac{x}{\sqrt[3]{y}}\\ \mathbf{if}\;y \leq -9.5 \cdot 10^{+166}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{+142}:\\ \;\;\;\;\frac{e^{\left(t - 1\right) \cdot \log a - b} \cdot x}{y}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 15
Error19.5
Cost13380
\[\begin{array}{l} \mathbf{if}\;b \leq 250:\\ \;\;\;\;\frac{{a}^{t} \cdot x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \sqrt[3]{e^{-3 \cdot b}}}{y}\\ \end{array} \]
Alternative 16
Error29.5
Cost7048
\[\begin{array}{l} t_1 := \frac{{a}^{t} \cdot x}{y}\\ \mathbf{if}\;t \leq -4800000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-16}:\\ \;\;\;\;\frac{t \cdot x}{y}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 17
Error49.1
Cost584
\[\begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-47}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-16}:\\ \;\;\;\;\frac{t \cdot x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \]
Alternative 18
Error54.6
Cost192
\[\frac{x}{y} \]

Error

Reproduce

herbie shell --seed 2023010 
(FPCore (x y z t a b)
  :name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
  :precision binary64

  :herbie-target
  (if (< t -0.8845848504127471) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z)))) (if (< t 852031.2288374073) (/ (* (/ x y) (pow a (- t 1.0))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z))))))

  (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))