?

Average Error: 45.28% → 1.93%
Time: 34.2s
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 -3.5 \cdot 10^{+72}:\\ \;\;\;\;\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}\;z \leq 6.8 \cdot 10^{+49}:\\ \;\;\;\;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(\left(\frac{457.9610022158428}{z \cdot z} + \frac{t}{z \cdot z}\right) + \frac{-36.52704169880642}{z}\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 -3.5e+72)
   (+
    (fma -36.52704169880642 (/ y z) (fma 3.13060547623 y x))
    (* (/ y z) (/ (+ t 457.9610022158428) z)))
   (if (<= z 6.8e+49)
     (+
      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))))
     (fma
      y
      (+
       3.13060547623
       (+
        (+ (/ 457.9610022158428 (* z z)) (/ t (* z z)))
        (/ -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 <= -3.5e+72) {
		tmp = fma(-36.52704169880642, (y / z), fma(3.13060547623, y, x)) + ((y / z) * ((t + 457.9610022158428) / z));
	} else if (z <= 6.8e+49) {
		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)));
	} else {
		tmp = fma(y, (3.13060547623 + (((457.9610022158428 / (z * z)) + (t / (z * z))) + (-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 <= -3.5e+72)
		tmp = Float64(fma(-36.52704169880642, Float64(y / z), fma(3.13060547623, y, x)) + Float64(Float64(y / z) * Float64(Float64(t + 457.9610022158428) / z)));
	elseif (z <= 6.8e+49)
		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))));
	else
		tmp = fma(y, Float64(3.13060547623 + Float64(Float64(Float64(457.9610022158428 / Float64(z * z)) + Float64(t / Float64(z * z))) + 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, -3.5e+72], 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], If[LessEqual[z, 6.8e+49], 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], 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]]]
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 -3.5 \cdot 10^{+72}:\\
\;\;\;\;\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}\;z \leq 6.8 \cdot 10^{+49}:\\
\;\;\;\;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(\left(\frac{457.9610022158428}{z \cdot z} + \frac{t}{z \cdot z}\right) + \frac{-36.52704169880642}{z}\right), x\right)\\


\end{array}

Error?

Target

Original45.28%
Target1.82%
Herbie1.93%
\[\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 < -3.5000000000000001e72

    1. Initial program 99.27

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.5000000000000001e72 < z < 6.8000000000000001e49

    1. Initial program 5.4

      \[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. Simplified2.43

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

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

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

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

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

      \[ 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 [=>]2.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)}{\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 [=>]2.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(\color{blue}{\mathsf{fma}\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t, z, a\right)}, z, b\right)}} \]

      fma-def [=>]2.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(\color{blue}{\mathsf{fma}\left(z \cdot 3.13060547623 + 11.1667541262, z, t\right)}, z, a\right), z, b\right)}} \]

      fma-def [=>]2.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(\color{blue}{\mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right)}, z, t\right), z, a\right), z, b\right)}} \]

    if 6.8000000000000001e49 < z

    1. Initial program 95.26

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

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

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

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

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

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

      \[\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. Simplified1.91

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

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

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

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

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

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

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

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

      \[ \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) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification1.93

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+72}:\\ \;\;\;\;\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}\;z \leq 6.8 \cdot 10^{+49}:\\ \;\;\;\;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(\left(\frac{457.9610022158428}{z \cdot z} + \frac{t}{z \cdot z}\right) + \frac{-36.52704169880642}{z}\right), x\right)\\ \end{array} \]

Alternatives

Alternative 1
Error1.52%
Cost18504
\[\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:\\ \;\;\;\;\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{elif}\;t_1 \leq 10^{+307}:\\ \;\;\;\;x + t_1\\ \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 2
Error1.51%
Cost12233
\[\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 10^{+307}\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 + t_1\\ \end{array} \]
Alternative 3
Error3.93%
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 := z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\\ t_3 := \frac{y \cdot \left(b + t_2\right)}{t_1}\\ \mathbf{if}\;t_3 \leq -1 \cdot 10^{+193}:\\ \;\;\;\;y \cdot \left(\frac{b}{t_1} + \frac{t_2}{t_1}\right)\\ \mathbf{elif}\;t_3 \leq 10^{+307}:\\ \;\;\;\;x + t_3\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \end{array} \]
Alternative 4
Error3.34%
Cost6984
\[\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:\\ \;\;\;\;y \cdot \left(3.13060547623 + \left(\left(\frac{457.9610022158428}{z \cdot z} + \frac{t}{z \cdot z}\right) + \frac{-36.52704169880642}{z}\right)\right)\\ \mathbf{elif}\;t_1 \leq 10^{+307}:\\ \;\;\;\;x + t_1\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \end{array} \]
Alternative 5
Error3.93%
Cost6984
\[\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 := z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\\ t_3 := \frac{y \cdot \left(b + t_2\right)}{t_1}\\ \mathbf{if}\;t_3 \leq -1 \cdot 10^{+193}:\\ \;\;\;\;y \cdot \left(\frac{b}{t_1} + \frac{t_2}{t_1}\right)\\ \mathbf{elif}\;t_3 \leq 10^{+307}:\\ \;\;\;\;x + t_3\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \end{array} \]
Alternative 6
Error4.57%
Cost2377
\[\begin{array}{l} \mathbf{if}\;z \leq -3.9 \cdot 10^{+32} \lor \neg \left(z \leq 2.75 \cdot 10^{+23}\right):\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;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)}\\ \end{array} \]
Alternative 7
Error5.75%
Cost1992
\[\begin{array}{l} \mathbf{if}\;z \leq -122000000000:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq 32:\\ \;\;\;\;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 + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 + \frac{-3.241970391368047 + t \cdot -0.10203362558171805}{z \cdot z}\right)}\\ \end{array} \]
Alternative 8
Error8.41%
Cost1480
\[\begin{array}{l} \mathbf{if}\;z \leq -60000000000000:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq 0.14:\\ \;\;\;\;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}{\frac{3.7269864963038164}{z} + 0.31942702700572795}\\ \end{array} \]
Alternative 9
Error8.42%
Cost1480
\[\begin{array}{l} \mathbf{if}\;z \leq -64000000000000:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq 7.6:\\ \;\;\;\;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}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 + \frac{-3.241970391368047 + t \cdot -0.10203362558171805}{z \cdot z}\right)}\\ \end{array} \]
Alternative 10
Error8.41%
Cost1224
\[\begin{array}{l} \mathbf{if}\;z \leq -60000000000000:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq 0.35:\\ \;\;\;\;\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}{\frac{3.7269864963038164}{z} + 0.31942702700572795}\\ \end{array} \]
Alternative 11
Error14.12%
Cost840
\[\begin{array}{l} \mathbf{if}\;z \leq -60000000000000:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq 0.335:\\ \;\;\;\;x + b \cdot \left(y \cdot 1.6453555072203998\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + 0.31942702700572795}\\ \end{array} \]
Alternative 12
Error14.14%
Cost713
\[\begin{array}{l} \mathbf{if}\;z \leq -60000000000000 \lor \neg \left(z \leq 0.33\right):\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(y \cdot 1.6453555072203998\right)\\ \end{array} \]
Alternative 13
Error29.18%
Cost585
\[\begin{array}{l} \mathbf{if}\;z \leq -7.3 \cdot 10^{-252} \lor \neg \left(z \leq 3.3 \cdot 10^{-11}\right):\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 14
Error43.15%
Cost456
\[\begin{array}{l} \mathbf{if}\;x \leq -2.5 \cdot 10^{-55}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{-179}:\\ \;\;\;\;y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 15
Error49.37%
Cost64
\[x \]

Error

Reproduce?

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