?

Average Accuracy: 54.5% → 97.8%
Time: 39.5s
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 -7.6 \cdot 10^{+45} \lor \neg \left(z \leq 1.15 \cdot 10^{+66}\right):\\ \;\;\;\;x + \left(\left(\frac{y}{z \cdot z} \cdot t + \left(y \cdot 3.13060547623 + \frac{y \cdot -36.52704169880642}{z}\right)\right) - \frac{y \cdot -457.9610022158428}{z \cdot z}\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 -7.6e+45) (not (<= z 1.15e+66)))
   (+
    x
    (-
     (+
      (* (/ y (* z z)) t)
      (+ (* y 3.13060547623) (/ (* y -36.52704169880642) z)))
     (/ (* y -457.9610022158428) (* z z))))
   (+
    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 <= -7.6e+45) || !(z <= 1.15e+66)) {
		tmp = x + ((((y / (z * z)) * t) + ((y * 3.13060547623) + ((y * -36.52704169880642) / z))) - ((y * -457.9610022158428) / (z * z)));
	} 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 <= -7.6e+45) || !(z <= 1.15e+66))
		tmp = Float64(x + Float64(Float64(Float64(Float64(y / Float64(z * z)) * t) + Float64(Float64(y * 3.13060547623) + Float64(Float64(y * -36.52704169880642) / z))) - Float64(Float64(y * -457.9610022158428) / Float64(z * z))));
	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, -7.6e+45], N[Not[LessEqual[z, 1.15e+66]], $MachinePrecision]], N[(x + N[(N[(N[(N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] + N[(N[(y * 3.13060547623), $MachinePrecision] + N[(N[(y * -36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * -457.9610022158428), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 -7.6 \cdot 10^{+45} \lor \neg \left(z \leq 1.15 \cdot 10^{+66}\right):\\
\;\;\;\;x + \left(\left(\frac{y}{z \cdot z} \cdot t + \left(y \cdot 3.13060547623 + \frac{y \cdot -36.52704169880642}{z}\right)\right) - \frac{y \cdot -457.9610022158428}{z \cdot z}\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

Original54.5%
Target98.1%
Herbie97.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 2 regimes
  2. if z < -7.6000000000000004e45 or 1.15e66 < z

    1. Initial program 3.8%

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

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

      [Start]3.8

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

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

      *-commutative [=>]5.8

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

      fma-def [=>]5.8

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

      *-commutative [=>]5.8

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

      fma-def [=>]5.8

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

      *-commutative [=>]5.8

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

      fma-def [=>]5.8

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

      *-commutative [=>]5.8

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

      fma-def [=>]5.8

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

      \[\leadsto x + \color{blue}{\left(\left(\frac{y \cdot t}{{z}^{2}} + \left(11.1667541262 \cdot \frac{y}{z} + 3.13060547623 \cdot y\right)\right) - \left(47.69379582500642 \cdot \frac{y}{z} + \left(98.5170599679272 \cdot \frac{y}{{z}^{2}} + 15.234687407 \cdot \frac{11.1667541262 \cdot y - 47.69379582500642 \cdot y}{{z}^{2}}\right)\right)\right)} \]
    4. Simplified97.5%

      \[\leadsto x + \color{blue}{\left(\left(\frac{y}{z \cdot z} \cdot t + \left(y \cdot 3.13060547623 + \frac{y \cdot -36.52704169880642}{z}\right)\right) - \mathsf{fma}\left(98.5170599679272, \frac{y}{z \cdot z}, \frac{y \cdot -556.47806218377}{z \cdot z}\right)\right)} \]
      Proof

      [Start]86.5

      \[ x + \left(\left(\frac{y \cdot t}{{z}^{2}} + \left(11.1667541262 \cdot \frac{y}{z} + 3.13060547623 \cdot y\right)\right) - \left(47.69379582500642 \cdot \frac{y}{z} + \left(98.5170599679272 \cdot \frac{y}{{z}^{2}} + 15.234687407 \cdot \frac{11.1667541262 \cdot y - 47.69379582500642 \cdot y}{{z}^{2}}\right)\right)\right) \]

      associate--r+ [=>]86.5

      \[ x + \color{blue}{\left(\left(\left(\frac{y \cdot t}{{z}^{2}} + \left(11.1667541262 \cdot \frac{y}{z} + 3.13060547623 \cdot y\right)\right) - 47.69379582500642 \cdot \frac{y}{z}\right) - \left(98.5170599679272 \cdot \frac{y}{{z}^{2}} + 15.234687407 \cdot \frac{11.1667541262 \cdot y - 47.69379582500642 \cdot y}{{z}^{2}}\right)\right)} \]
    5. Taylor expanded in y around 0 97.7%

      \[\leadsto x + \left(\left(\frac{y}{z \cdot z} \cdot t + \left(y \cdot 3.13060547623 + \frac{y \cdot -36.52704169880642}{z}\right)\right) - \color{blue}{-457.9610022158428 \cdot \frac{y}{{z}^{2}}}\right) \]
    6. Simplified97.5%

      \[\leadsto x + \left(\left(\frac{y}{z \cdot z} \cdot t + \left(y \cdot 3.13060547623 + \frac{y \cdot -36.52704169880642}{z}\right)\right) - \color{blue}{\frac{-457.9610022158428 \cdot y}{z \cdot z}}\right) \]
      Proof

      [Start]97.7

      \[ x + \left(\left(\frac{y}{z \cdot z} \cdot t + \left(y \cdot 3.13060547623 + \frac{y \cdot -36.52704169880642}{z}\right)\right) - -457.9610022158428 \cdot \frac{y}{{z}^{2}}\right) \]

      unpow2 [=>]97.7

      \[ x + \left(\left(\frac{y}{z \cdot z} \cdot t + \left(y \cdot 3.13060547623 + \frac{y \cdot -36.52704169880642}{z}\right)\right) - -457.9610022158428 \cdot \frac{y}{\color{blue}{z \cdot z}}\right) \]

      associate-*r/ [=>]97.5

      \[ x + \left(\left(\frac{y}{z \cdot z} \cdot t + \left(y \cdot 3.13060547623 + \frac{y \cdot -36.52704169880642}{z}\right)\right) - \color{blue}{\frac{-457.9610022158428 \cdot y}{z \cdot z}}\right) \]

    if -7.6000000000000004e45 < z < 1.15e66

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.6 \cdot 10^{+45} \lor \neg \left(z \leq 1.15 \cdot 10^{+66}\right):\\ \;\;\;\;x + \left(\left(\frac{y}{z \cdot z} \cdot t + \left(y \cdot 3.13060547623 + \frac{y \cdot -36.52704169880642}{z}\right)\right) - \frac{y \cdot -457.9610022158428}{z \cdot z}\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
Accuracy97.5%
Cost27721
\[\begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+45} \lor \neg \left(z \leq 6.8 \cdot 10^{+65}\right):\\ \;\;\;\;x + \left(\left(\frac{y}{z \cdot z} \cdot t + \left(y \cdot 3.13060547623 + \frac{y \cdot -36.52704169880642}{z}\right)\right) - \frac{y \cdot -457.9610022158428}{z \cdot z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)} \cdot \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)\\ \end{array} \]
Alternative 2
Accuracy96.8%
Cost2633
\[\begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{+45} \lor \neg \left(z \leq 180000000\right):\\ \;\;\;\;x + \left(\left(\frac{y}{z \cdot z} \cdot t + \left(y \cdot 3.13060547623 + \frac{y \cdot -36.52704169880642}{z}\right)\right) - \frac{y \cdot -457.9610022158428}{z \cdot z}\right)\\ \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 3
Accuracy96.1%
Cost2249
\[\begin{array}{l} \mathbf{if}\;z \leq -80 \lor \neg \left(z \leq 86\right):\\ \;\;\;\;x + \left(\left(\frac{y}{z \cdot z} \cdot t + \left(y \cdot 3.13060547623 + \frac{y \cdot -36.52704169880642}{z}\right)\right) - \frac{y \cdot -457.9610022158428}{z \cdot z}\right)\\ \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 4
Accuracy93.2%
Cost1993
\[\begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+45} \lor \neg \left(z \leq 23500\right):\\ \;\;\;\;x + \left(\left(\frac{y}{z \cdot z} \cdot t + \left(y \cdot 3.13060547623 + \frac{y \cdot -36.52704169880642}{z}\right)\right) - \frac{y \cdot -457.9610022158428}{z \cdot z}\right)\\ \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 5
Accuracy91.5%
Cost1864
\[\begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+45}:\\ \;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{t \cdot 0.10203362558171805}{z \cdot z}\right)}\\ \mathbf{elif}\;z \leq 24000:\\ \;\;\;\;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)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{t \cdot 0.10203362558171805 + 3.241970391368047}{z \cdot z}\right)}\\ \end{array} \]
Alternative 6
Accuracy91.2%
Cost1481
\[\begin{array}{l} \mathbf{if}\;z \leq -6500 \lor \neg \left(z \leq 3200\right):\\ \;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{t \cdot 0.10203362558171805}{z \cdot z}\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot a\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\ \end{array} \]
Alternative 7
Accuracy91.2%
Cost1480
\[\begin{array}{l} \mathbf{if}\;z \leq -2050:\\ \;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{t \cdot 0.10203362558171805}{z \cdot z}\right)}\\ \mathbf{elif}\;z \leq 15500:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot a\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{t \cdot 0.10203362558171805 + 3.241970391368047}{z \cdot z}\right)}\\ \end{array} \]
Alternative 8
Accuracy91.1%
Cost1353
\[\begin{array}{l} \mathbf{if}\;z \leq -42 \lor \neg \left(z \leq 3900\right):\\ \;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{t \cdot 0.10203362558171805}{z \cdot z}\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot a\right)}{0.607771387771 + z \cdot 11.9400905721}\\ \end{array} \]
Alternative 9
Accuracy90.9%
Cost1224
\[\begin{array}{l} \mathbf{if}\;z \leq -75:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq 58:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot a\right)}{0.607771387771}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{1}{0.31942702700572795 + \frac{3.7269864963038164 - \frac{3.241970391368047}{z}}{z}}\\ \end{array} \]
Alternative 10
Accuracy91.1%
Cost1224
\[\begin{array}{l} \mathbf{if}\;z \leq -42:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq 1.2:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot a\right)}{0.607771387771 + z \cdot 11.9400905721}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{1}{0.31942702700572795 + \frac{3.7269864963038164 - \frac{3.241970391368047}{z}}{z}}\\ \end{array} \]
Alternative 11
Accuracy90.9%
Cost1096
\[\begin{array}{l} \mathbf{if}\;z \leq -8500:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq 72:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot a\right)}{0.607771387771}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{0.31942702700572795 + \frac{3.7269864963038164 + \frac{-3.241970391368047}{z}}{z}}\\ \end{array} \]
Alternative 12
Accuracy85.2%
Cost968
\[\begin{array}{l} \mathbf{if}\;z \leq -7400000:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq 5800:\\ \;\;\;\;x + \frac{y \cdot b}{0.607771387771 + z \cdot 11.9400905721}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + 0.31942702700572795}\\ \end{array} \]
Alternative 13
Accuracy90.9%
Cost968
\[\begin{array}{l} \mathbf{if}\;z \leq -115:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq 2050:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot a\right)}{0.607771387771}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + 0.31942702700572795}\\ \end{array} \]
Alternative 14
Accuracy85.2%
Cost840
\[\begin{array}{l} \mathbf{if}\;z \leq -7400000:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq 960:\\ \;\;\;\;x + \left(y \cdot b\right) \cdot 1.6453555072203998\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(3.13060547623 - \frac{36.52704169880642}{z}\right)\\ \end{array} \]
Alternative 15
Accuracy85.2%
Cost840
\[\begin{array}{l} \mathbf{if}\;z \leq -7600000000:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;x + \left(y \cdot b\right) \cdot 1.6453555072203998\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + 0.31942702700572795}\\ \end{array} \]
Alternative 16
Accuracy85.2%
Cost713
\[\begin{array}{l} \mathbf{if}\;z \leq -7400000 \lor \neg \left(z \leq 350\right):\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x + \left(y \cdot b\right) \cdot 1.6453555072203998\\ \end{array} \]
Alternative 17
Accuracy70.1%
Cost585
\[\begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{-26} \lor \neg \left(z \leq 5.1 \cdot 10^{-89}\right):\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 18
Accuracy48.6%
Cost64
\[x \]

Error

Reproduce?

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