?

Average Accuracy: 53.6% → 98.1%
Time: 34.8s
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 -1.7 \cdot 10^{+38}:\\ \;\;\;\;\mathsf{fma}\left(-36.52704169880642, \frac{y}{z}, \mathsf{fma}\left(3.13060547623, y, x + \frac{y}{\frac{z \cdot z}{t + 457.9610022158428}}\right)\right)\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+45}:\\ \;\;\;\;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(-36.52704169880642, \frac{y}{z}, \mathsf{fma}\left(3.13060547623, y, x\right)\right) + \frac{y}{z} \cdot \frac{t + 457.9610022158428}{z}\\ \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 -1.7e+38)
   (fma
    -36.52704169880642
    (/ y z)
    (fma 3.13060547623 y (+ x (/ y (/ (* z z) (+ t 457.9610022158428))))))
   (if (<= z 2.8e+45)
     (+
      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 -36.52704169880642 (/ y z) (fma 3.13060547623 y x))
      (* (/ y z) (/ (+ t 457.9610022158428) z))))))
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 <= -1.7e+38) {
		tmp = fma(-36.52704169880642, (y / z), fma(3.13060547623, y, (x + (y / ((z * z) / (t + 457.9610022158428))))));
	} else if (z <= 2.8e+45) {
		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(-36.52704169880642, (y / z), fma(3.13060547623, y, x)) + ((y / z) * ((t + 457.9610022158428) / z));
	}
	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 <= -1.7e+38)
		tmp = fma(-36.52704169880642, Float64(y / z), fma(3.13060547623, y, Float64(x + Float64(y / Float64(Float64(z * z) / Float64(t + 457.9610022158428))))));
	elseif (z <= 2.8e+45)
		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 = Float64(fma(-36.52704169880642, Float64(y / z), fma(3.13060547623, y, x)) + Float64(Float64(y / z) * Float64(Float64(t + 457.9610022158428) / z)));
	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, -1.7e+38], N[(-36.52704169880642 * N[(y / z), $MachinePrecision] + N[(3.13060547623 * y + N[(x + N[(y / N[(N[(z * z), $MachinePrecision] / N[(t + 457.9610022158428), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e+45], 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[(N[(-36.52704169880642 * N[(y / z), $MachinePrecision] + N[(3.13060547623 * y + x), $MachinePrecision]), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] * N[(N[(t + 457.9610022158428), $MachinePrecision] / z), $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 -1.7 \cdot 10^{+38}:\\
\;\;\;\;\mathsf{fma}\left(-36.52704169880642, \frac{y}{z}, \mathsf{fma}\left(3.13060547623, y, x + \frac{y}{\frac{z \cdot z}{t + 457.9610022158428}}\right)\right)\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{+45}:\\
\;\;\;\;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(-36.52704169880642, \frac{y}{z}, \mathsf{fma}\left(3.13060547623, y, x\right)\right) + \frac{y}{z} \cdot \frac{t + 457.9610022158428}{z}\\


\end{array}

Error?

Target

Original53.6%
Target98.4%
Herbie98.1%
\[\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 < -1.69999999999999998e38

    1. Initial program 6.5%

      \[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. Simplified10.5%

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

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

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

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

      \[ \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 86.3%

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

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

      [Start]86.3

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

      fma-def [=>]86.3

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

      fma-def [=>]86.3

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

      +-commutative [=>]86.3

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

      associate-/l* [=>]97.3

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

      unpow2 [=>]97.3

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

      +-commutative [=>]97.3

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

    if -1.69999999999999998e38 < z < 2.7999999999999999e45

    1. Initial program 97.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. Simplified98.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]97.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} \]

      *-commutative [=>]97.0

      \[ 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* [=>]98.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 2.7999999999999999e45 < z

    1. Initial program 5.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. Simplified8.0%

      \[\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]5.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 [=>]5.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/ [<=]8.0

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

      \[ \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 86.7%

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

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

      [Start]86.7

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

      +-commutative [=>]86.7

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

      associate-+r+ [=>]86.7

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

      associate-+r+ [=>]86.7

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

      fma-def [=>]86.7

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

      fma-def [=>]86.8

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

      unpow2 [=>]86.8

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

      times-frac [=>]98.4

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

      +-commutative [=>]98.4

      \[ \mathsf{fma}\left(-36.52704169880642, \frac{y}{z}, \mathsf{fma}\left(3.13060547623, y, x\right)\right) + \frac{y}{z} \cdot \frac{\color{blue}{t + 457.9610022158428}}{z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification98.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+38}:\\ \;\;\;\;\mathsf{fma}\left(-36.52704169880642, \frac{y}{z}, \mathsf{fma}\left(3.13060547623, y, x + \frac{y}{\frac{z \cdot z}{t + 457.9610022158428}}\right)\right)\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+45}:\\ \;\;\;\;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(-36.52704169880642, \frac{y}{z}, \mathsf{fma}\left(3.13060547623, y, x\right)\right) + \frac{y}{z} \cdot \frac{t + 457.9610022158428}{z}\\ \end{array} \]

Alternatives

Alternative 1
Accuracy98.4%
Cost16196
\[\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)\\ t_2 := \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)}{t_1}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(-36.52704169880642, \frac{y}{z}, \mathsf{fma}\left(3.13060547623, y, x\right)\right) + \frac{y}{z} \cdot \frac{t + 457.9610022158428}{z}\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{+299}:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + \frac{z \cdot \left(\left(z \cdot z\right) \cdot 9.800690647801265 + -124.69639771500472\right)}{z \cdot 3.13060547623 + -11.1667541262}\right)\right)\right)}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \left(\left(3.13060547623 + \frac{457.9610022158428}{z \cdot z}\right) + \frac{t}{z \cdot z}\right) + \frac{-36.52704169880642}{z}, x\right)\\ \end{array} \]
Alternative 2
Accuracy97.5%
Cost14152
\[\begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+33}:\\ \;\;\;\;\mathsf{fma}\left(-36.52704169880642, \frac{y}{z}, \mathsf{fma}\left(3.13060547623, y, x + \frac{y}{\frac{z \cdot z}{t + 457.9610022158428}}\right)\right)\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{+45}:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + \frac{z \cdot \left(\left(z \cdot z\right) \cdot 9.800690647801265 + -124.69639771500472\right)}{z \cdot 3.13060547623 + -11.1667541262}\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(-36.52704169880642, \frac{y}{z}, \mathsf{fma}\left(3.13060547623, y, x\right)\right) + \frac{y}{z} \cdot \frac{t + 457.9610022158428}{z}\\ \end{array} \]
Alternative 3
Accuracy98.5%
Cost12233
\[\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)\\ t_2 := \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)}{t_1}\\ \mathbf{if}\;t_2 \leq -\infty \lor \neg \left(t_2 \leq 5 \cdot 10^{+299}\right):\\ \;\;\;\;\mathsf{fma}\left(y, \left(\left(3.13060547623 + \frac{457.9610022158428}{z \cdot z}\right) + \frac{t}{z \cdot z}\right) + \frac{-36.52704169880642}{z}, x\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + \frac{z \cdot \left(\left(z \cdot z\right) \cdot 9.800690647801265 + -124.69639771500472\right)}{z \cdot 3.13060547623 + -11.1667541262}\right)\right)\right)}{t_1}\\ \end{array} \]
Alternative 4
Accuracy96.5%
Cost11208
\[\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)\\ t_2 := \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)}{t_1}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{+299}:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + \frac{z \cdot \left(\left(z \cdot z\right) \cdot 9.800690647801265 + -124.69639771500472\right)}{z \cdot 3.13060547623 + -11.1667541262}\right)\right)\right)}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \end{array} \]
Alternative 5
Accuracy96.5%
Cost7497
\[\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)\\ t_2 := \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)}{t_1}\\ \mathbf{if}\;t_2 \leq -\infty \lor \neg \left(t_2 \leq 5 \cdot 10^{+299}\right):\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + \frac{z \cdot \left(\left(z \cdot z\right) \cdot 9.800690647801265 + -124.69639771500472\right)}{z \cdot 3.13060547623 + -11.1667541262}\right)\right)\right)}{t_1}\\ \end{array} \]
Alternative 6
Accuracy96.5%
Cost6985
\[\begin{array}{l} t_1 := \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{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 5 \cdot 10^{+299}\right):\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x + t_1\\ \end{array} \]
Alternative 7
Accuracy94.7%
Cost2376
\[\begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+18}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq 105:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\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}:\\ \;\;\;\;x + \frac{y}{0.31942702700572795 + \frac{3.7269864963038164 + \frac{-3.241970391368047}{z}}{z}}\\ \end{array} \]
Alternative 8
Accuracy94.0%
Cost1736
\[\begin{array}{l} \mathbf{if}\;z \leq -122:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq 105:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\right)}{0.607771387771 + z \cdot 11.9400905721}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{0.31942702700572795 + \frac{3.7269864963038164 + \frac{-3.241970391368047}{z}}{z}}\\ \end{array} \]
Alternative 9
Accuracy91.3%
Cost1480
\[\begin{array}{l} \mathbf{if}\;z \leq -420:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq 4.7:\\ \;\;\;\;y \cdot \left(z \cdot \left(a \cdot 1.6453555072203998 + b \cdot -32.324150453290734\right)\right) + \left(x + 1.6453555072203998 \cdot \left(y \cdot b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{0.31942702700572795 + \frac{3.7269864963038164 + \frac{-3.241970391368047}{z}}{z}}\\ \end{array} \]
Alternative 10
Accuracy91.3%
Cost1224
\[\begin{array}{l} \mathbf{if}\;z \leq -150:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq 21.5:\\ \;\;\;\;\left(x + 1.6453555072203998 \cdot \left(y \cdot b\right)\right) + 1.6453555072203998 \cdot \left(y \cdot \left(z \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{0.31942702700572795 + \frac{3.7269864963038164 + \frac{-3.241970391368047}{z}}{z}}\\ \end{array} \]
Alternative 11
Accuracy85.5%
Cost1096
\[\begin{array}{l} \mathbf{if}\;z \leq -0.00106:\\ \;\;\;\;x + \frac{y}{0.31942702700572795 + \frac{3.7269864963038164}{z}}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-27}:\\ \;\;\;\;x + 1.6453555072203998 \cdot \left(y \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{0.31942702700572795 + \frac{3.7269864963038164 + \frac{-3.241970391368047}{z}}{z}}\\ \end{array} \]
Alternative 12
Accuracy85.5%
Cost841
\[\begin{array}{l} \mathbf{if}\;z \leq -0.0009 \lor \neg \left(z \leq 3.5 \cdot 10^{-27}\right):\\ \;\;\;\;x + \frac{y}{0.31942702700572795 + \frac{3.7269864963038164}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + 1.6453555072203998 \cdot \left(y \cdot b\right)\\ \end{array} \]
Alternative 13
Accuracy55.2%
Cost720
\[\begin{array}{l} \mathbf{if}\;y \leq -1.26 \cdot 10^{+66}:\\ \;\;\;\;y \cdot 3.13060547623\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-11}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{+74}:\\ \;\;\;\;y \cdot 3.13060547623\\ \mathbf{elif}\;y \leq 9.2 \cdot 10^{+153}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot 3.13060547623\\ \end{array} \]
Alternative 14
Accuracy85.5%
Cost713
\[\begin{array}{l} \mathbf{if}\;z \leq -0.00115 \lor \neg \left(z \leq 3.5 \cdot 10^{-27}\right):\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(y \cdot 1.6453555072203998\right)\\ \end{array} \]
Alternative 15
Accuracy85.5%
Cost713
\[\begin{array}{l} \mathbf{if}\;z \leq -0.00115 \lor \neg \left(z \leq 3.5 \cdot 10^{-27}\right):\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\ \end{array} \]
Alternative 16
Accuracy85.5%
Cost713
\[\begin{array}{l} \mathbf{if}\;z \leq -0.00115 \lor \neg \left(z \leq 3.5 \cdot 10^{-27}\right):\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x + 1.6453555072203998 \cdot \left(y \cdot b\right)\\ \end{array} \]
Alternative 17
Accuracy71.7%
Cost585
\[\begin{array}{l} \mathbf{if}\;z \leq -6.2 \cdot 10^{-161} \lor \neg \left(z \leq 3.8 \cdot 10^{-81}\right):\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 18
Accuracy49.9%
Cost64
\[x \]

Error

Reproduce?

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