?

Average Error: 29.6 → 1.8
Time: 34.1s
Precision: binary64
Cost: 46536

?

\[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 -2.8 \cdot 10^{+19}:\\ \;\;\;\;3.13060547623 \cdot y + x\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+19}:\\ \;\;\;\;x + \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)}{\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}{y}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \left(\frac{457.9610022158428}{z \cdot z} + \left(\left(\frac{t}{z \cdot z} + \frac{a + \left(-5864.8025282699045 + t \cdot -15.234687407\right)}{{z}^{3}}\right) + \frac{-36.52704169880642}{z}\right)\right), x\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 (<= z -2.8e+19)
   (+ (* 3.13060547623 y) x)
   (if (<= z 1.8e+19)
     (+
      x
      (/
       (fma z (fma z (fma z (fma z 3.13060547623 11.1667541262) t) a) b)
       (/
        (fma
         z
         (fma z (fma z (+ z 15.234687407) 31.4690115749) 11.9400905721)
         0.607771387771)
        y)))
     (fma
      y
      (+
       3.13060547623
       (+
        (/ 457.9610022158428 (* z z))
        (+
         (+
          (/ t (* z z))
          (/ (+ a (+ -5864.8025282699045 (* t -15.234687407))) (pow z 3.0)))
         (/ -36.52704169880642 z))))
      x))))
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 <= -2.8e+19) {
		tmp = (3.13060547623 * y) + x;
	} else if (z <= 1.8e+19) {
		tmp = x + (fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b) / (fma(z, fma(z, fma(z, (z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771) / y));
	} else {
		tmp = fma(y, (3.13060547623 + ((457.9610022158428 / (z * z)) + (((t / (z * z)) + ((a + (-5864.8025282699045 + (t * -15.234687407))) / pow(z, 3.0))) + (-36.52704169880642 / z)))), x);
	}
	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 <= -2.8e+19)
		tmp = Float64(Float64(3.13060547623 * y) + x);
	elseif (z <= 1.8e+19)
		tmp = Float64(x + Float64(fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b) / Float64(fma(z, fma(z, fma(z, Float64(z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771) / y)));
	else
		tmp = fma(y, Float64(3.13060547623 + Float64(Float64(457.9610022158428 / Float64(z * z)) + Float64(Float64(Float64(t / Float64(z * z)) + Float64(Float64(a + Float64(-5864.8025282699045 + Float64(t * -15.234687407))) / (z ^ 3.0))) + Float64(-36.52704169880642 / z)))), x);
	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[LessEqual[z, -2.8e+19], N[(N[(3.13060547623 * y), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 1.8e+19], N[(x + N[(N[(z * N[(z * N[(z * N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + b), $MachinePrecision] / N[(N[(z * N[(z * N[(z * N[(z + 15.234687407), $MachinePrecision] + 31.4690115749), $MachinePrecision] + 11.9400905721), $MachinePrecision] + 0.607771387771), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(3.13060547623 + N[(N[(457.9610022158428 / N[(z * z), $MachinePrecision]), $MachinePrecision] + 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[(-36.52704169880642 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $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 -2.8 \cdot 10^{+19}:\\
\;\;\;\;3.13060547623 \cdot y + x\\

\mathbf{elif}\;z \leq 1.8 \cdot 10^{+19}:\\
\;\;\;\;x + \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)}{\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}{y}}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \left(\frac{457.9610022158428}{z \cdot z} + \left(\left(\frac{t}{z \cdot z} + \frac{a + \left(-5864.8025282699045 + t \cdot -15.234687407\right)}{{z}^{3}}\right) + \frac{-36.52704169880642}{z}\right)\right), x\right)\\


\end{array}

Error?

Target

Original29.6
Target1.1
Herbie1.8
\[\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 3 regimes
  2. if z < -2.8e19

    1. Initial program 57.7

      \[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. Simplified54.9

      \[\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]57.7

      \[ 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 [=>]57.7

      \[ \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/ [<=]54.9

      \[ \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 [=>]54.9

      \[ \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 5.3

      \[\leadsto \color{blue}{3.13060547623 \cdot y + x} \]

    if -2.8e19 < z < 1.8e19

    1. Initial program 0.7

      \[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{\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)}{\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}{y}}} \]
      Proof

      [Start]0.7

      \[ 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 [=>]0.7

      \[ x + \frac{\color{blue}{\left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right) \cdot y}}{\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{\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}{\frac{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}{y}}} \]

    if 1.8e19 < z

    1. Initial program 58.1

      \[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. Simplified55.3

      \[\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]58.1

      \[ 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 [=>]58.1

      \[ \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/ [<=]55.3

      \[ \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 [=>]55.3

      \[ \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 0.8

      \[\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. Simplified0.8

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

      [Start]0.8

      \[ \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+ [=>]0.8

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

      associate--l+ [=>]0.8

      \[ \mathsf{fma}\left(y, 3.13060547623 + \color{blue}{\left(457.9610022158428 \cdot \frac{1}{{z}^{2}} + \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) - 36.52704169880642 \cdot \frac{1}{z}\right)\right)}, x\right) \]

      associate-*r/ [=>]0.8

      \[ \mathsf{fma}\left(y, 3.13060547623 + \left(\color{blue}{\frac{457.9610022158428 \cdot 1}{{z}^{2}}} + \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) - 36.52704169880642 \cdot \frac{1}{z}\right)\right), x\right) \]

      metadata-eval [=>]0.8

      \[ \mathsf{fma}\left(y, 3.13060547623 + \left(\frac{\color{blue}{457.9610022158428}}{{z}^{2}} + \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) - 36.52704169880642 \cdot \frac{1}{z}\right)\right), x\right) \]

      unpow2 [=>]0.8

      \[ \mathsf{fma}\left(y, 3.13060547623 + \left(\frac{457.9610022158428}{\color{blue}{z \cdot z}} + \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) - 36.52704169880642 \cdot \frac{1}{z}\right)\right), x\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification1.8

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+19}:\\ \;\;\;\;3.13060547623 \cdot y + x\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+19}:\\ \;\;\;\;x + \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)}{\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}{y}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \left(\frac{457.9610022158428}{z \cdot z} + \left(\left(\frac{t}{z \cdot z} + \frac{a + \left(-5864.8025282699045 + t \cdot -15.234687407\right)}{{z}^{3}}\right) + \frac{-36.52704169880642}{z}\right)\right), x\right)\\ \end{array} \]

Alternatives

Alternative 1
Error1.7
Cost46536
\[\begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+19}:\\ \;\;\;\;3.13060547623 \cdot y + x\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{+43}:\\ \;\;\;\;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)}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \left(\frac{457.9610022158428}{z \cdot z} + \left(\left(\frac{t}{z \cdot z} + \frac{a + \left(-5864.8025282699045 + t \cdot -15.234687407\right)}{{z}^{3}}\right) + \frac{-36.52704169880642}{z}\right)\right), x\right)\\ \end{array} \]
Alternative 2
Error1.9
Cost14984
\[\begin{array}{l} t_1 := 0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)\\ \mathbf{if}\;z \leq -2.8 \cdot 10^{+19}:\\ \;\;\;\;3.13060547623 \cdot y + x\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+16}:\\ \;\;\;\;\frac{y \cdot b}{t_1} + \left(x + \frac{y \cdot \left(z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{t_1}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \left(\frac{457.9610022158428}{z \cdot z} + \left(\left(\frac{t}{z \cdot z} + \frac{a + \left(-5864.8025282699045 + t \cdot -15.234687407\right)}{{z}^{3}}\right) + \frac{-36.52704169880642}{z}\right)\right), x\right)\\ \end{array} \]
Alternative 3
Error2.2
Cost7880
\[\begin{array}{l} t_1 := 0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)\\ \mathbf{if}\;z \leq -1.2 \cdot 10^{+19}:\\ \;\;\;\;3.13060547623 \cdot y + x\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{+20}:\\ \;\;\;\;\frac{y \cdot b}{t_1} + \left(x + \frac{y \cdot \left(z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{t_1}\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 4
Error3.0
Cost3785
\[\begin{array}{l} t_1 := 0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)\\ \mathbf{if}\;z \leq -2.8 \cdot 10^{+19} \lor \neg \left(z \leq 1.65 \cdot 10^{+41}\right):\\ \;\;\;\;3.13060547623 \cdot y + x\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot b}{t_1} + \left(x + \frac{y \cdot \left(z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{t_1}\right)\\ \end{array} \]
Alternative 5
Error3.0
Cost2633
\[\begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+19} \lor \neg \left(z \leq 5.2 \cdot 10^{+43}\right):\\ \;\;\;\;3.13060547623 \cdot y + x\\ \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 \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\ \end{array} \]
Alternative 6
Error4.0
Cost1992
\[\begin{array}{l} \mathbf{if}\;z \leq -160:\\ \;\;\;\;x + \frac{y}{0.31942702700572795 + \frac{3.7269864963038164}{z}}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+20}:\\ \;\;\;\;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 11.9400905721}\\ \mathbf{else}:\\ \;\;\;\;3.13060547623 \cdot y + x\\ \end{array} \]
Alternative 7
Error5.6
Cost1865
\[\begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+19} \lor \neg \left(z \leq 4 \cdot 10^{+22}\right):\\ \;\;\;\;3.13060547623 \cdot y + x\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot a\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 8
Error6.1
Cost1480
\[\begin{array}{l} \mathbf{if}\;z \leq -160:\\ \;\;\;\;x + \frac{y}{0.31942702700572795 + \frac{3.7269864963038164}{z}}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+20}:\\ \;\;\;\;y \cdot \left(z \cdot \left(a \cdot 1.6453555072203998 + b \cdot -32.324150453290734\right)\right) + \left(x - \left(y \cdot b\right) \cdot -1.6453555072203998\right)\\ \mathbf{else}:\\ \;\;\;\;3.13060547623 \cdot y + x\\ \end{array} \]
Alternative 9
Error8.4
Cost1352
\[\begin{array}{l} \mathbf{if}\;z \leq -11000:\\ \;\;\;\;x + \frac{y}{0.31942702700572795 + \frac{3.7269864963038164}{z}}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+20}:\\ \;\;\;\;\left(y \cdot b\right) \cdot 1.6453555072203998 + \left(x + 1.6453555072203998 \cdot \left(y \cdot \left(t \cdot \left(z \cdot z\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;3.13060547623 \cdot y + x\\ \end{array} \]
Alternative 10
Error32.9
Cost984
\[\begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+196}:\\ \;\;\;\;3.13060547623 \cdot y\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{+175}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3 \cdot 10^{+127}:\\ \;\;\;\;3.13060547623 \cdot y\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+95}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+156}:\\ \;\;\;\;3.13060547623 \cdot y\\ \mathbf{elif}\;z \leq 4.9 \cdot 10^{+218}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;3.13060547623 \cdot y\\ \end{array} \]
Alternative 11
Error9.9
Cost713
\[\begin{array}{l} \mathbf{if}\;z \leq -39000 \lor \neg \left(z \leq 9 \cdot 10^{+20}\right):\\ \;\;\;\;3.13060547623 \cdot y + x\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(y \cdot 1.6453555072203998\right)\\ \end{array} \]
Alternative 12
Error9.8
Cost712
\[\begin{array}{l} \mathbf{if}\;z \leq -430:\\ \;\;\;\;x + \frac{y}{0.31942702700572795 + \frac{3.7269864963038164}{z}}\\ \mathbf{elif}\;z \leq 9.6 \cdot 10^{+20}:\\ \;\;\;\;x + b \cdot \left(y \cdot 1.6453555072203998\right)\\ \mathbf{else}:\\ \;\;\;\;3.13060547623 \cdot y + x\\ \end{array} \]
Alternative 13
Error19.3
Cost585
\[\begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{-90} \lor \neg \left(z \leq 1.5 \cdot 10^{-128}\right):\\ \;\;\;\;3.13060547623 \cdot y + x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 14
Error32.5
Cost64
\[x \]

Error

Reproduce?

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