?

Average Error: 29.0 → 1.4
Time: 34.0s
Precision: binary64
Cost: 46537

?

\[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
\[\begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+31} \lor \neg \left(z \leq 2.1 \cdot 10^{-13}\right):\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \left(\left(\frac{t}{z \cdot z} + \frac{a + \left(-5864.8025282699045 + t \cdot -15.234687407\right)}{{z}^{3}}\right) + \left(\frac{457.9610022158428}{z \cdot z} + \frac{-36.52704169880642}{z}\right)\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z + 15.234687407, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), z, t\right), z, a\right), z, b\right)}}\\ \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+
  x
  (/
   (*
    y
    (+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b))
   (+
    (* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z)
    0.607771387771))))
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= z -5.8e+31) (not (<= z 2.1e-13)))
   (fma
    y
    (+
     3.13060547623
     (+
      (+
       (/ t (* z z))
       (/ (+ a (+ -5864.8025282699045 (* t -15.234687407))) (pow z 3.0)))
      (+ (/ 457.9610022158428 (* z z)) (/ -36.52704169880642 z))))
    x)
   (+
    x
    (/
     y
     (/
      (fma
       (fma (fma (+ z 15.234687407) z 31.4690115749) z 11.9400905721)
       z
       0.607771387771)
      (fma (fma (fma (fma z 3.13060547623 11.1667541262) z t) z a) z b))))))
double code(double x, double y, double z, double t, double a, double b) {
	return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((z <= -5.8e+31) || !(z <= 2.1e-13)) {
		tmp = fma(y, (3.13060547623 + (((t / (z * z)) + ((a + (-5864.8025282699045 + (t * -15.234687407))) / pow(z, 3.0))) + ((457.9610022158428 / (z * z)) + (-36.52704169880642 / z)))), x);
	} else {
		tmp = x + (y / (fma(fma(fma((z + 15.234687407), z, 31.4690115749), z, 11.9400905721), z, 0.607771387771) / fma(fma(fma(fma(z, 3.13060547623, 11.1667541262), z, t), z, a), z, b)));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)))
end
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((z <= -5.8e+31) || !(z <= 2.1e-13))
		tmp = fma(y, Float64(3.13060547623 + Float64(Float64(Float64(t / Float64(z * z)) + Float64(Float64(a + Float64(-5864.8025282699045 + Float64(t * -15.234687407))) / (z ^ 3.0))) + Float64(Float64(457.9610022158428 / Float64(z * z)) + Float64(-36.52704169880642 / z)))), x);
	else
		tmp = Float64(x + Float64(y / Float64(fma(fma(fma(Float64(z + 15.234687407), z, 31.4690115749), z, 11.9400905721), z, 0.607771387771) / fma(fma(fma(fma(z, 3.13060547623, 11.1667541262), z, t), z, a), z, b))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.8e+31], N[Not[LessEqual[z, 2.1e-13]], $MachinePrecision]], N[(y * N[(3.13060547623 + N[(N[(N[(t / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(N[(a + N[(-5864.8025282699045 + N[(t * -15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[z, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(457.9610022158428 / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(-36.52704169880642 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(y / N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z + 31.4690115749), $MachinePrecision] * z + 11.9400905721), $MachinePrecision] * z + 0.607771387771), $MachinePrecision] / N[(N[(N[(N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] * z + t), $MachinePrecision] * z + a), $MachinePrecision] * z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+31} \lor \neg \left(z \leq 2.1 \cdot 10^{-13}\right):\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \left(\left(\frac{t}{z \cdot z} + \frac{a + \left(-5864.8025282699045 + t \cdot -15.234687407\right)}{{z}^{3}}\right) + \left(\frac{457.9610022158428}{z \cdot z} + \frac{-36.52704169880642}{z}\right)\right), x\right)\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z + 15.234687407, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), z, t\right), z, a\right), z, b\right)}}\\


\end{array}

Error?

Target

Original29.0
Target1.1
Herbie1.4
\[\begin{array}{l} \mathbf{if}\;z < -6.499344996252632 \cdot 10^{+53}:\\ \;\;\;\;x + \left(\left(3.13060547623 - \frac{36.527041698806414}{z}\right) + \frac{t}{z \cdot z}\right) \cdot \frac{y}{1}\\ \mathbf{elif}\;z < 7.066965436914287 \cdot 10^{+59}:\\ \;\;\;\;x + \frac{y}{\frac{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}{\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(\left(3.13060547623 - \frac{36.527041698806414}{z}\right) + \frac{t}{z \cdot z}\right) \cdot \frac{y}{1}\\ \end{array} \]

Derivation?

  1. Split input into 2 regimes
  2. if z < -5.8000000000000001e31 or 2.09999999999999989e-13 < z

    1. Initial program 55.6

      \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    2. Simplified52.6

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), t\right), a\right), b\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}, x\right)} \]
      Proof

      [Start]55.6

      \[ x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]

      +-commutative [=>]55.6

      \[ \color{blue}{\frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} + x} \]

      associate-*r/ [<=]52.6

      \[ \color{blue}{y \cdot \frac{\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}} + x \]

      fma-def [=>]52.6

      \[ \color{blue}{\mathsf{fma}\left(y, \frac{\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}, x\right)} \]
    3. Taylor expanded in z around -inf 2.3

      \[\leadsto \mathsf{fma}\left(y, \color{blue}{\left(3.13060547623 + \left(457.9610022158428 \cdot \frac{1}{{z}^{2}} + \left(\frac{t}{{z}^{2}} + -1 \cdot \frac{-1 \cdot a - \left(1112.0901850848957 + -15.234687407 \cdot \left(457.9610022158428 + t\right)\right)}{{z}^{3}}\right)\right)\right) - 36.52704169880642 \cdot \frac{1}{z}}, x\right) \]
    4. Simplified2.3

      \[\leadsto \mathsf{fma}\left(y, \color{blue}{3.13060547623 + \left(\left(\frac{t}{z \cdot z} - \frac{\left(-a\right) - \left(-5864.8025282699045 + t \cdot -15.234687407\right)}{{z}^{3}}\right) + \left(\frac{457.9610022158428}{z \cdot z} - \frac{36.52704169880642}{z}\right)\right)}, x\right) \]
      Proof

      [Start]2.3

      \[ \mathsf{fma}\left(y, \left(3.13060547623 + \left(457.9610022158428 \cdot \frac{1}{{z}^{2}} + \left(\frac{t}{{z}^{2}} + -1 \cdot \frac{-1 \cdot a - \left(1112.0901850848957 + -15.234687407 \cdot \left(457.9610022158428 + t\right)\right)}{{z}^{3}}\right)\right)\right) - 36.52704169880642 \cdot \frac{1}{z}, x\right) \]

      associate--l+ [=>]2.3

      \[ \mathsf{fma}\left(y, \color{blue}{3.13060547623 + \left(\left(457.9610022158428 \cdot \frac{1}{{z}^{2}} + \left(\frac{t}{{z}^{2}} + -1 \cdot \frac{-1 \cdot a - \left(1112.0901850848957 + -15.234687407 \cdot \left(457.9610022158428 + t\right)\right)}{{z}^{3}}\right)\right) - 36.52704169880642 \cdot \frac{1}{z}\right)}, x\right) \]

      +-commutative [=>]2.3

      \[ \mathsf{fma}\left(y, 3.13060547623 + \left(\color{blue}{\left(\left(\frac{t}{{z}^{2}} + -1 \cdot \frac{-1 \cdot a - \left(1112.0901850848957 + -15.234687407 \cdot \left(457.9610022158428 + t\right)\right)}{{z}^{3}}\right) + 457.9610022158428 \cdot \frac{1}{{z}^{2}}\right)} - 36.52704169880642 \cdot \frac{1}{z}\right), x\right) \]

      associate--l+ [=>]2.3

      \[ \mathsf{fma}\left(y, 3.13060547623 + \color{blue}{\left(\left(\frac{t}{{z}^{2}} + -1 \cdot \frac{-1 \cdot a - \left(1112.0901850848957 + -15.234687407 \cdot \left(457.9610022158428 + t\right)\right)}{{z}^{3}}\right) + \left(457.9610022158428 \cdot \frac{1}{{z}^{2}} - 36.52704169880642 \cdot \frac{1}{z}\right)\right)}, x\right) \]

    if -5.8000000000000001e31 < z < 2.09999999999999989e-13

    1. Initial program 0.6

      \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    2. Simplified0.4

      \[\leadsto \color{blue}{x + \frac{y}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z + 15.234687407, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), z, t\right), z, a\right), z, b\right)}}} \]
      Proof

      [Start]0.6

      \[ x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]

      associate-/l* [=>]0.4

      \[ x + \color{blue}{\frac{y}{\frac{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}{\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}} \]

      fma-def [=>]0.4

      \[ x + \frac{y}{\frac{\color{blue}{\mathsf{fma}\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721, z, 0.607771387771\right)}}{\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}} \]

      fma-def [=>]0.4

      \[ x + \frac{y}{\frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749, z, 11.9400905721\right)}, z, 0.607771387771\right)}{\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}} \]

      fma-def [=>]0.4

      \[ x + \frac{y}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z + 15.234687407, z, 31.4690115749\right)}, z, 11.9400905721\right), z, 0.607771387771\right)}{\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}} \]

      fma-def [=>]0.4

      \[ x + \frac{y}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z + 15.234687407, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right)}{\color{blue}{\mathsf{fma}\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a, z, b\right)}}} \]

      fma-def [=>]0.4

      \[ x + \frac{y}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z + 15.234687407, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right)}{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t, z, a\right)}, z, b\right)}} \]

      fma-def [=>]0.4

      \[ x + \frac{y}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z + 15.234687407, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z \cdot 3.13060547623 + 11.1667541262, z, t\right)}, z, a\right), z, b\right)}} \]

      fma-def [=>]0.4

      \[ x + \frac{y}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z + 15.234687407, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right)}, z, t\right), z, a\right), z, b\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification1.4

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+31} \lor \neg \left(z \leq 2.1 \cdot 10^{-13}\right):\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \left(\left(\frac{t}{z \cdot z} + \frac{a + \left(-5864.8025282699045 + t \cdot -15.234687407\right)}{{z}^{3}}\right) + \left(\frac{457.9610022158428}{z \cdot z} + \frac{-36.52704169880642}{z}\right)\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z + 15.234687407, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), z, t\right), z, a\right), z, b\right)}}\\ \end{array} \]

Alternatives

Alternative 1
Error1.5
Cost14985
\[\begin{array}{l} \mathbf{if}\;z \leq -3.85 \cdot 10^{+31} \lor \neg \left(z \leq 2.1 \cdot 10^{-13}\right):\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \left(\left(\frac{t}{z \cdot z} + \frac{a + \left(-5864.8025282699045 + t \cdot -15.234687407\right)}{{z}^{3}}\right) + \left(\frac{457.9610022158428}{z \cdot z} + \frac{-36.52704169880642}{z}\right)\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot b + y \cdot \left(z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\ \end{array} \]
Alternative 2
Error2.9
Cost7880
\[\begin{array}{l} \mathbf{if}\;z \leq -1.82 \cdot 10^{+74}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-13}:\\ \;\;\;\;x + \frac{y \cdot b + y \cdot \left(z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \left(\frac{t}{z \cdot z} + \left(3.13060547623 + \frac{457.9610022158428}{z \cdot z}\right)\right) + \frac{-36.52704169880642}{z}, x\right)\\ \end{array} \]
Alternative 3
Error3.8
Cost2760
\[\begin{array}{l} t_1 := x + y \cdot 3.13060547623\\ \mathbf{if}\;z \leq -1.82 \cdot 10^{+74}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-13}:\\ \;\;\;\;x + \frac{y \cdot b + y \cdot \left(z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1 + -36.52704169880642 \cdot \frac{y}{z}\\ \end{array} \]
Alternative 4
Error3.8
Cost2632
\[\begin{array}{l} t_1 := x + y \cdot 3.13060547623\\ \mathbf{if}\;z \leq -1.82 \cdot 10^{+74}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-13}:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1 + -36.52704169880642 \cdot \frac{y}{z}\\ \end{array} \]
Alternative 5
Error3.7
Cost2504
\[\begin{array}{l} t_1 := z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\\ t_2 := x + y \cdot 3.13060547623\\ \mathbf{if}\;z \leq -1.82 \cdot 10^{+74}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-23}:\\ \;\;\;\;x + \frac{y}{\frac{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}{t_1}}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-13}:\\ \;\;\;\;x + \frac{y \cdot \left(b + t_1\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\ \mathbf{else}:\\ \;\;\;\;t_2 + -36.52704169880642 \cdot \frac{y}{z}\\ \end{array} \]
Alternative 6
Error4.0
Cost2249
\[\begin{array}{l} \mathbf{if}\;z \leq -31000 \lor \neg \left(z \leq 2.1 \cdot 10^{-13}\right):\\ \;\;\;\;\left(x + y \cdot 3.13060547623\right) + -36.52704169880642 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\ \end{array} \]
Alternative 7
Error5.6
Cost1481
\[\begin{array}{l} \mathbf{if}\;z \leq -3600 \lor \neg \left(z \leq 2.1 \cdot 10^{-13}\right):\\ \;\;\;\;\left(x + y \cdot 3.13060547623\right) + -36.52704169880642 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;\left(x + \left(y \cdot b\right) \cdot 1.6453555072203998\right) - y \cdot \left(z \cdot \left(b \cdot 32.324150453290734 + a \cdot -1.6453555072203998\right)\right)\\ \end{array} \]
Alternative 8
Error30.1
Cost981
\[\begin{array}{l} \mathbf{if}\;x \leq -8 \cdot 10^{-78}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -3.6 \cdot 10^{-297}:\\ \;\;\;\;y \cdot 3.13060547623\\ \mathbf{elif}\;x \leq 1.4 \cdot 10^{-204} \lor \neg \left(x \leq 5.5 \cdot 10^{-137}\right) \land x \leq 6.5 \cdot 10^{-53}:\\ \;\;\;\;y \cdot \left(b \cdot 1.6453555072203998\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 9
Error30.1
Cost980
\[\begin{array}{l} \mathbf{if}\;x \leq -8 \cdot 10^{-79}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -5 \cdot 10^{-297}:\\ \;\;\;\;y \cdot 3.13060547623\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{-204}:\\ \;\;\;\;y \cdot \left(b \cdot 1.6453555072203998\right)\\ \mathbf{elif}\;x \leq 10^{-137}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{-53}:\\ \;\;\;\;b \cdot \left(y \cdot 1.6453555072203998\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 10
Error10.1
Cost968
\[\begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{-23}:\\ \;\;\;\;x + \frac{y}{0.31942702700572795 + \frac{3.7269864963038164}{z}}\\ \mathbf{elif}\;z \leq 9.6 \cdot 10^{-55}:\\ \;\;\;\;x + b \cdot \left(y \cdot 1.6453555072203998\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + y \cdot 3.13060547623\right) + -36.52704169880642 \cdot \frac{y}{z}\\ \end{array} \]
Alternative 11
Error21.4
Cost849
\[\begin{array}{l} t_1 := x + y \cdot 3.13060547623\\ \mathbf{if}\;x \leq -5.2 \cdot 10^{-297}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.4 \cdot 10^{-261}:\\ \;\;\;\;y \cdot \left(b \cdot 1.6453555072203998\right)\\ \mathbf{elif}\;x \leq 3.7 \cdot 10^{-65} \lor \neg \left(x \leq 6.5 \cdot 10^{-53}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(y \cdot 1.6453555072203998\right)\\ \end{array} \]
Alternative 12
Error10.2
Cost713
\[\begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{-38} \lor \neg \left(z \leq 9.6 \cdot 10^{-55}\right):\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\ \end{array} \]
Alternative 13
Error10.2
Cost713
\[\begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{-38} \lor \neg \left(z \leq 9.6 \cdot 10^{-55}\right):\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(y \cdot 1.6453555072203998\right)\\ \end{array} \]
Alternative 14
Error10.1
Cost712
\[\begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{-23}:\\ \;\;\;\;x + \frac{y}{0.31942702700572795 + \frac{3.7269864963038164}{z}}\\ \mathbf{elif}\;z \leq 9.6 \cdot 10^{-55}:\\ \;\;\;\;x + b \cdot \left(y \cdot 1.6453555072203998\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \end{array} \]
Alternative 15
Error28.4
Cost456
\[\begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{+120}:\\ \;\;\;\;y \cdot 3.13060547623\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{+111}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot 3.13060547623\\ \end{array} \]
Alternative 16
Error32.3
Cost64
\[x \]

Error

Reproduce?

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

  :herbie-target
  (if (< z -6.499344996252632e+53) (+ x (* (+ (- 3.13060547623 (/ 36.527041698806414 z)) (/ t (* z z))) (/ y 1.0))) (if (< z 7.066965436914287e+59) (+ x (/ y (/ (+ (* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z) 0.607771387771) (+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b)))) (+ x (* (+ (- 3.13060547623 (/ 36.527041698806414 z)) (/ t (* z z))) (/ y 1.0)))))

  (+ x (/ (* y (+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b)) (+ (* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z) 0.607771387771))))