?

Average Error: 29.8 → 1.8
Time: 29.9s
Precision: binary64
Cost: 52809

?

\[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.45 \cdot 10^{+33} \lor \neg \left(z \leq 2.6 \cdot 10^{-9}\right):\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \left(\left(\frac{457.9610022158428}{z \cdot z} + \frac{t}{z \cdot z}\right) + \frac{-36.52704169880642}{z}\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;\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)\\ \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 -1.45e+33) (not (<= z 2.6e-9)))
   (fma
    y
    (+
     3.13060547623
     (+
      (+ (/ 457.9610022158428 (* z z)) (/ t (* z z)))
      (/ -36.52704169880642 z)))
    x)
   (fma
    y
    (/
     (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))
    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 <= -1.45e+33) || !(z <= 2.6e-9)) {
		tmp = fma(y, (3.13060547623 + (((457.9610022158428 / (z * z)) + (t / (z * z))) + (-36.52704169880642 / z))), x);
	} else {
		tmp = fma(y, (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)), 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 <= -1.45e+33) || !(z <= 2.6e-9))
		tmp = fma(y, Float64(3.13060547623 + Float64(Float64(Float64(457.9610022158428 / Float64(z * z)) + Float64(t / Float64(z * z))) + Float64(-36.52704169880642 / z))), x);
	else
		tmp = fma(y, Float64(fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b) / fma(z, fma(z, fma(z, Float64(z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), 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[Or[LessEqual[z, -1.45e+33], N[Not[LessEqual[z, 2.6e-9]], $MachinePrecision]], N[(y * N[(3.13060547623 + N[(N[(N[(457.9610022158428 / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(t / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-36.52704169880642 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(y * N[(N[(z * N[(z * N[(z * N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + b), $MachinePrecision] / N[(z * N[(z * N[(z * N[(z + 15.234687407), $MachinePrecision] + 31.4690115749), $MachinePrecision] + 11.9400905721), $MachinePrecision] + 0.607771387771), $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 -1.45 \cdot 10^{+33} \lor \neg \left(z \leq 2.6 \cdot 10^{-9}\right):\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \left(\left(\frac{457.9610022158428}{z \cdot z} + \frac{t}{z \cdot z}\right) + \frac{-36.52704169880642}{z}\right), x\right)\\

\mathbf{else}:\\
\;\;\;\;\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)\\


\end{array}

Error?

Target

Original29.8
Target1.2
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 2 regimes
  2. if z < -1.45000000000000012e33 or 2.6000000000000001e-9 < z

    1. Initial program 56.3

      \[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. Simplified53.2

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

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

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

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

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

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

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

      [Start]3.1

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

      associate--l+ [=>]3.1

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

      associate-*r/ [=>]3.1

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

      metadata-eval [=>]3.1

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

      unpow2 [=>]3.1

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

      unpow2 [=>]3.1

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

      associate-*r/ [=>]3.1

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

      metadata-eval [=>]3.1

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

    if -1.45000000000000012e33 < z < 2.6000000000000001e-9

    1. Initial program 0.9

      \[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}{\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]0.9

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

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

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

      \[ \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. Recombined 2 regimes into one program.
  4. Final simplification1.8

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+33} \lor \neg \left(z \leq 2.6 \cdot 10^{-9}\right):\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \left(\left(\frac{457.9610022158428}{z \cdot z} + \frac{t}{z \cdot z}\right) + \frac{-36.52704169880642}{z}\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;\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)\\ \end{array} \]

Alternatives

Alternative 1
Error1.9
Cost7881
\[\begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{+35} \lor \neg \left(z \leq 2.6 \cdot 10^{-9}\right):\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \left(\left(\frac{457.9610022158428}{z \cdot z} + \frac{t}{z \cdot z}\right) + \frac{-36.52704169880642}{z}\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)}{\frac{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}{y}}\\ \end{array} \]
Alternative 2
Error1.9
Cost2761
\[\begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+63} \lor \neg \left(z \leq 1.35 \cdot 10^{+52}\right):\\ \;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{\frac{t \cdot 0.10203362558171805}{z}}{z}\right)}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(\left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right) \cdot \frac{1}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\right)\\ \end{array} \]
Alternative 3
Error2.2
Cost2633
\[\begin{array}{l} \mathbf{if}\;z \leq -8.2 \cdot 10^{+49} \lor \neg \left(z \leq 8.6 \cdot 10^{+52}\right):\\ \;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{\frac{t \cdot 0.10203362558171805}{z}}{z}\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)}{\frac{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}{y}}\\ \end{array} \]
Alternative 4
Error2.9
Cost2377
\[\begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+50} \lor \neg \left(z \leq 3.7 \cdot 10^{+50}\right):\\ \;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{\frac{t \cdot 0.10203362558171805}{z}}{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 \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\right)\\ \end{array} \]
Alternative 5
Error3.9
Cost2120
\[\begin{array}{l} \mathbf{if}\;z \leq -34:\\ \;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{\frac{t \cdot 0.10203362558171805}{z}}{z}\right)}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-9}:\\ \;\;\;\;x + \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right) \cdot \left(-32.324150453290734 \cdot \left(z \cdot y\right) + y \cdot 1.6453555072203998\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \end{array} \]
Alternative 6
Error3.9
Cost1992
\[\begin{array}{l} \mathbf{if}\;z \leq -0.41:\\ \;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{\frac{t \cdot 0.10203362558171805}{z}}{z}\right)}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-9}:\\ \;\;\;\;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}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \end{array} \]
Alternative 7
Error3.9
Cost1736
\[\begin{array}{l} \mathbf{if}\;z \leq -105:\\ \;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{\frac{t \cdot 0.10203362558171805}{z}}{z}\right)}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-9}:\\ \;\;\;\;x + \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right) \cdot \left(y \cdot 1.6453555072203998\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \end{array} \]
Alternative 8
Error9.0
Cost1360
\[\begin{array}{l} t_1 := x + b \cdot \left(-32.324150453290734 \cdot \left(z \cdot y\right) + y \cdot 1.6453555072203998\right)\\ t_2 := x + y \cdot 3.13060547623\\ \mathbf{if}\;z \leq -360000000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-90}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-13}:\\ \;\;\;\;x + a \cdot \left(z \cdot \left(y \cdot \left(1.6453555072203998 + z \cdot -32.324150453290734\right)\right)\right)\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-9}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Error5.2
Cost1353
\[\begin{array}{l} \mathbf{if}\;z \leq -1.9 \lor \neg \left(z \leq 2.6 \cdot 10^{-9}\right):\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(z \cdot \left(a \cdot 1.6453555072203998 + b \cdot -32.324150453290734\right) + b \cdot 1.6453555072203998\right)\\ \end{array} \]
Alternative 10
Error5.2
Cost1352
\[\begin{array}{l} \mathbf{if}\;z \leq -15:\\ \;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{\frac{t \cdot 0.10203362558171805}{z}}{z}\right)}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-9}:\\ \;\;\;\;x + y \cdot \left(z \cdot \left(a \cdot 1.6453555072203998 + b \cdot -32.324150453290734\right) + b \cdot 1.6453555072203998\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \end{array} \]
Alternative 11
Error9.0
Cost1228
\[\begin{array}{l} t_1 := x + y \cdot 3.13060547623\\ \mathbf{if}\;z \leq -1400:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{-90}:\\ \;\;\;\;x + b \cdot \left(y \cdot 1.6453555072203998\right)\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-15}:\\ \;\;\;\;x + a \cdot \left(z \cdot \left(y \cdot \left(1.6453555072203998 + z \cdot -32.324150453290734\right)\right)\right)\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-9}:\\ \;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 12
Error7.1
Cost1225
\[\begin{array}{l} \mathbf{if}\;z \leq -240 \lor \neg \left(z \leq 2.6 \cdot 10^{-9}\right):\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x + \left(z \cdot \left(y \cdot \left(a \cdot 1.6453555072203998\right)\right) + 1.6453555072203998 \cdot \left(y \cdot b\right)\right)\\ \end{array} \]
Alternative 13
Error8.6
Cost713
\[\begin{array}{l} \mathbf{if}\;z \leq -2050 \lor \neg \left(z \leq 2.6 \cdot 10^{-9}\right):\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\ \end{array} \]
Alternative 14
Error8.6
Cost713
\[\begin{array}{l} \mathbf{if}\;z \leq -6500000 \lor \neg \left(z \leq 2.6 \cdot 10^{-9}\right):\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(y \cdot 1.6453555072203998\right)\\ \end{array} \]
Alternative 15
Error18.4
Cost585
\[\begin{array}{l} \mathbf{if}\;z \leq -8.3 \cdot 10^{-44} \lor \neg \left(z \leq 2.7 \cdot 10^{-228}\right):\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 16
Error31.8
Cost64
\[x \]

Error

Reproduce?

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