Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, D

Percentage Accurate: 58.2% → 97.0%
Time: 16.9s
Alternatives: 14
Speedup: 11.3×

Specification

?
\[\begin{array}{l} \\ 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} \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))))
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));
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = x + ((y * ((((((((z * 3.13060547623d0) + 11.1667541262d0) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407d0) * z) + 31.4690115749d0) * z) + 11.9400905721d0) * z) + 0.607771387771d0))
end function
public static 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));
}
def code(x, y, z, t, a, 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))
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 tmp = code(x, y, z, t, a, b)
	tmp = 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));
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]
\begin{array}{l}

\\
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}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 14 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 58.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ 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} \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))))
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));
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = x + ((y * ((((((((z * 3.13060547623d0) + 11.1667541262d0) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407d0) * z) + 31.4690115749d0) * z) + 11.9400905721d0) * z) + 0.607771387771d0))
end function
public static 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));
}
def code(x, y, z, t, a, 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))
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 tmp = code(x, y, z, t, a, b)
	tmp = 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));
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]
\begin{array}{l}

\\
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}
\end{array}

Alternative 1: 97.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, 3.13060547623, x\right) + \left(\mathsf{fma}\left(y, \frac{t}{z \cdot z}, 11.1667541262 \cdot \frac{y}{z}\right) - \mathsf{fma}\left(y, \frac{98.5170599679272}{z \cdot z}, \mathsf{fma}\left(y, \frac{47.69379582500642}{z}, \frac{y \cdot -556.47806218377}{z \cdot z}\right)\right)\right)\\ \mathbf{if}\;z \leq -7.4 \cdot 10^{+21}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 8500000000000:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{\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 \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1
         (+
          (fma y 3.13060547623 x)
          (-
           (fma y (/ t (* z z)) (* 11.1667541262 (/ y z)))
           (fma
            y
            (/ 98.5170599679272 (* z z))
            (fma
             y
             (/ 47.69379582500642 z)
             (/ (* y -556.47806218377) (* z z))))))))
   (if (<= z -7.4e+21)
     t_1
     (if (<= z 8500000000000.0)
       (fma
        (/
         1.0
         (fma
          z
          (fma z (fma z (+ z 15.234687407) 31.4690115749) 11.9400905721)
          0.607771387771))
        (* y (fma z (fma z t a) b))
        x)
       t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = fma(y, 3.13060547623, x) + (fma(y, (t / (z * z)), (11.1667541262 * (y / z))) - fma(y, (98.5170599679272 / (z * z)), fma(y, (47.69379582500642 / z), ((y * -556.47806218377) / (z * z)))));
	double tmp;
	if (z <= -7.4e+21) {
		tmp = t_1;
	} else if (z <= 8500000000000.0) {
		tmp = fma((1.0 / fma(z, fma(z, fma(z, (z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), (y * fma(z, fma(z, t, a), b)), x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(fma(y, 3.13060547623, x) + Float64(fma(y, Float64(t / Float64(z * z)), Float64(11.1667541262 * Float64(y / z))) - fma(y, Float64(98.5170599679272 / Float64(z * z)), fma(y, Float64(47.69379582500642 / z), Float64(Float64(y * -556.47806218377) / Float64(z * z))))))
	tmp = 0.0
	if (z <= -7.4e+21)
		tmp = t_1;
	elseif (z <= 8500000000000.0)
		tmp = fma(Float64(1.0 / fma(z, fma(z, fma(z, Float64(z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), Float64(y * fma(z, fma(z, t, a), b)), x);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * 3.13060547623 + x), $MachinePrecision] + N[(N[(y * N[(t / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(11.1667541262 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(98.5170599679272 / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(y * N[(47.69379582500642 / z), $MachinePrecision] + N[(N[(y * -556.47806218377), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.4e+21], t$95$1, If[LessEqual[z, 8500000000000.0], N[(N[(1.0 / N[(z * N[(z * N[(z * N[(z + 15.234687407), $MachinePrecision] + 31.4690115749), $MachinePrecision] + 11.9400905721), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision] * N[(y * N[(z * N[(z * t + a), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, 3.13060547623, x\right) + \left(\mathsf{fma}\left(y, \frac{t}{z \cdot z}, 11.1667541262 \cdot \frac{y}{z}\right) - \mathsf{fma}\left(y, \frac{98.5170599679272}{z \cdot z}, \mathsf{fma}\left(y, \frac{47.69379582500642}{z}, \frac{y \cdot -556.47806218377}{z \cdot z}\right)\right)\right)\\
\mathbf{if}\;z \leq -7.4 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 8500000000000:\\
\;\;\;\;\mathsf{fma}\left(\frac{1}{\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 \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right), x\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.4e21 or 8.5e12 < z

    1. Initial program 12.7%

      \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

      \[\leadsto \color{blue}{\left(x + \left(\frac{313060547623}{100000000000} \cdot y + \left(\frac{55833770631}{5000000000} \cdot \frac{y}{z} + \frac{t \cdot y}{{z}^{2}}\right)\right)\right) - \left(\frac{15234687407}{1000000000} \cdot \frac{\frac{55833770631}{5000000000} \cdot y - \frac{4769379582500641883561}{100000000000000000000} \cdot y}{{z}^{2}} + \left(\frac{4769379582500641883561}{100000000000000000000} \cdot \frac{y}{z} + \frac{98517059967927196814627}{1000000000000000000000} \cdot \frac{y}{{z}^{2}}\right)\right)} \]
    4. Simplified96.6%

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

    if -7.4e21 < z < 8.5e12

    1. Initial program 99.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. Add Preprocessing
    3. Taylor expanded in z around 0

      \[\leadsto x + \frac{y \cdot \color{blue}{\left(b + z \cdot \left(a + t \cdot z\right)\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x + \frac{y \cdot \color{blue}{\left(z \cdot \left(a + t \cdot z\right) + b\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto x + \frac{y \cdot \color{blue}{\mathsf{fma}\left(z, a + t \cdot z, b\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
      3. +-commutativeN/A

        \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \color{blue}{t \cdot z + a}, b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
      4. *-commutativeN/A

        \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \color{blue}{z \cdot t} + a, b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
      5. accelerator-lowering-fma.f6499.6

        \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, t, a\right)}, b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    5. Simplified99.6%

      \[\leadsto x + \frac{y \cdot \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right)}}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    6. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{\frac{y \cdot \left(z \cdot \left(z \cdot t + a\right) + b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} + x} \]
      2. clear-numN/A

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}}{y \cdot \left(z \cdot \left(z \cdot t + a\right) + b\right)}}} + x \]
      3. associate-/r/N/A

        \[\leadsto \color{blue}{\frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \cdot \left(y \cdot \left(z \cdot \left(z \cdot t + a\right) + b\right)\right)} + x \]
      4. distribute-lft-inN/A

        \[\leadsto \frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \cdot \color{blue}{\left(y \cdot \left(z \cdot \left(z \cdot t + a\right)\right) + y \cdot b\right)} + x \]
      5. *-commutativeN/A

        \[\leadsto \frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \cdot \left(y \cdot \color{blue}{\left(\left(z \cdot t + a\right) \cdot z\right)} + y \cdot b\right) + x \]
      6. associate-*r*N/A

        \[\leadsto \frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \cdot \left(\color{blue}{\left(y \cdot \left(z \cdot t + a\right)\right) \cdot z} + y \cdot b\right) + x \]
      7. +-commutativeN/A

        \[\leadsto \frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \cdot \left(\left(y \cdot \color{blue}{\left(a + z \cdot t\right)}\right) \cdot z + y \cdot b\right) + x \]
      8. distribute-lft-outN/A

        \[\leadsto \frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \cdot \left(\color{blue}{\left(y \cdot a + y \cdot \left(z \cdot t\right)\right)} \cdot z + y \cdot b\right) + x \]
      9. *-commutativeN/A

        \[\leadsto \frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \cdot \left(\color{blue}{z \cdot \left(y \cdot a + y \cdot \left(z \cdot t\right)\right)} + y \cdot b\right) + x \]
      10. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}}, z \cdot \left(y \cdot a + y \cdot \left(z \cdot t\right)\right) + y \cdot b, x\right)} \]
    7. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\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 \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right), x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 67.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\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)} \leq -5 \cdot 10^{+37}:\\ \;\;\;\;b \cdot \left(y \cdot 1.6453555072203998\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<=
      (/
       (*
        y
        (+
         b
         (* z (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))))
       (+
        0.607771387771
        (*
         z
         (+ 11.9400905721 (* z (+ 31.4690115749 (* z (+ z 15.234687407))))))))
      -5e+37)
   (* b (* y 1.6453555072203998))
   (fma y 3.13060547623 x)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))) <= -5e+37) {
		tmp = b * (y * 1.6453555072203998);
	} else {
		tmp = fma(y, 3.13060547623, x);
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))))) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407)))))))) <= -5e+37)
		tmp = Float64(b * Float64(y * 1.6453555072203998));
	else
		tmp = fma(y, 3.13060547623, x);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -5e+37], N[(b * N[(y * 1.6453555072203998), $MachinePrecision]), $MachinePrecision], N[(y * 3.13060547623 + x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\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)} \leq -5 \cdot 10^{+37}:\\
\;\;\;\;b \cdot \left(y \cdot 1.6453555072203998\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < -4.99999999999999989e37

    1. Initial program 85.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. Add Preprocessing
    3. Taylor expanded in z around 0

      \[\leadsto x + \frac{y \cdot \color{blue}{\left(b + z \cdot \left(a + t \cdot z\right)\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x + \frac{y \cdot \color{blue}{\left(z \cdot \left(a + t \cdot z\right) + b\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto x + \frac{y \cdot \color{blue}{\mathsf{fma}\left(z, a + t \cdot z, b\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
      3. +-commutativeN/A

        \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \color{blue}{t \cdot z + a}, b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
      4. *-commutativeN/A

        \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \color{blue}{z \cdot t} + a, b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
      5. accelerator-lowering-fma.f6485.2

        \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, t, a\right)}, b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    5. Simplified85.2%

      \[\leadsto x + \frac{y \cdot \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right)}}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    6. Taylor expanded in z around 0

      \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right)}{\color{blue}{\frac{607771387771}{1000000000000}}} \]
    7. Step-by-step derivation
      1. Simplified81.6%

        \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right)}{\color{blue}{0.607771387771}} \]
      2. Taylor expanded in b around inf

        \[\leadsto \color{blue}{\frac{1000000000000}{607771387771} \cdot \left(b \cdot y\right)} \]
      3. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \color{blue}{\left(b \cdot y\right) \cdot \frac{1000000000000}{607771387771}} \]
        2. associate-*r*N/A

          \[\leadsto \color{blue}{b \cdot \left(y \cdot \frac{1000000000000}{607771387771}\right)} \]
        3. *-commutativeN/A

          \[\leadsto b \cdot \color{blue}{\left(\frac{1000000000000}{607771387771} \cdot y\right)} \]
        4. *-lowering-*.f64N/A

          \[\leadsto \color{blue}{b \cdot \left(\frac{1000000000000}{607771387771} \cdot y\right)} \]
        5. *-commutativeN/A

          \[\leadsto b \cdot \color{blue}{\left(y \cdot \frac{1000000000000}{607771387771}\right)} \]
        6. *-lowering-*.f6452.0

          \[\leadsto b \cdot \color{blue}{\left(y \cdot 1.6453555072203998\right)} \]
      4. Simplified52.0%

        \[\leadsto \color{blue}{b \cdot \left(y \cdot 1.6453555072203998\right)} \]

      if -4.99999999999999989e37 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64)))

      1. Initial program 49.2%

        \[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. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{x + \frac{313060547623}{100000000000} \cdot y} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\frac{313060547623}{100000000000} \cdot y + x} \]
        2. *-commutativeN/A

          \[\leadsto \color{blue}{y \cdot \frac{313060547623}{100000000000}} + x \]
        3. accelerator-lowering-fma.f6472.9

          \[\leadsto \color{blue}{\mathsf{fma}\left(y, 3.13060547623, x\right)} \]
      5. Simplified72.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, 3.13060547623, x\right)} \]
    8. Recombined 2 regimes into one program.
    9. Final simplification69.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\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)} \leq -5 \cdot 10^{+37}:\\ \;\;\;\;b \cdot \left(y \cdot 1.6453555072203998\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \end{array} \]
    10. Add Preprocessing

    Alternative 3: 96.1% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+52}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \mathbf{elif}\;z \leq 9000000000000:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{\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 \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), x\right)\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+124}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right) + \frac{\frac{\mathsf{fma}\left(y, t, \mathsf{fma}\left(y, -98.5170599679272, y \cdot 556.47806218377\right)\right)}{z} - y \cdot 36.52704169880642}{z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (<= z -6e+52)
       (fma y 3.13060547623 x)
       (if (<= z 9000000000000.0)
         (fma
          (/
           1.0
           (fma
            z
            (fma z (fma z (+ z 15.234687407) 31.4690115749) 11.9400905721)
            0.607771387771))
          (* y (fma z (fma z (fma z (fma z 3.13060547623 11.1667541262) t) a) b))
          x)
         (if (<= z 4e+124)
           (+
            (fma y 3.13060547623 x)
            (/
             (-
              (/ (fma y t (fma y -98.5170599679272 (* y 556.47806218377))) z)
              (* y 36.52704169880642))
             z))
           (fma y 3.13060547623 x)))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (z <= -6e+52) {
    		tmp = fma(y, 3.13060547623, x);
    	} else if (z <= 9000000000000.0) {
    		tmp = fma((1.0 / fma(z, fma(z, fma(z, (z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), (y * fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b)), x);
    	} else if (z <= 4e+124) {
    		tmp = fma(y, 3.13060547623, x) + (((fma(y, t, fma(y, -98.5170599679272, (y * 556.47806218377))) / z) - (y * 36.52704169880642)) / z);
    	} else {
    		tmp = fma(y, 3.13060547623, x);
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if (z <= -6e+52)
    		tmp = fma(y, 3.13060547623, x);
    	elseif (z <= 9000000000000.0)
    		tmp = fma(Float64(1.0 / fma(z, fma(z, fma(z, Float64(z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), Float64(y * fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b)), x);
    	elseif (z <= 4e+124)
    		tmp = Float64(fma(y, 3.13060547623, x) + Float64(Float64(Float64(fma(y, t, fma(y, -98.5170599679272, Float64(y * 556.47806218377))) / z) - Float64(y * 36.52704169880642)) / z));
    	else
    		tmp = fma(y, 3.13060547623, x);
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -6e+52], N[(y * 3.13060547623 + x), $MachinePrecision], If[LessEqual[z, 9000000000000.0], N[(N[(1.0 / N[(z * N[(z * N[(z * N[(z + 15.234687407), $MachinePrecision] + 31.4690115749), $MachinePrecision] + 11.9400905721), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision] * N[(y * N[(z * N[(z * N[(z * N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 4e+124], N[(N[(y * 3.13060547623 + x), $MachinePrecision] + N[(N[(N[(N[(y * t + N[(y * -98.5170599679272 + N[(y * 556.47806218377), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - N[(y * 36.52704169880642), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(y * 3.13060547623 + x), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;z \leq -6 \cdot 10^{+52}:\\
    \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
    
    \mathbf{elif}\;z \leq 9000000000000:\\
    \;\;\;\;\mathsf{fma}\left(\frac{1}{\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 \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), x\right)\\
    
    \mathbf{elif}\;z \leq 4 \cdot 10^{+124}:\\
    \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right) + \frac{\frac{\mathsf{fma}\left(y, t, \mathsf{fma}\left(y, -98.5170599679272, y \cdot 556.47806218377\right)\right)}{z} - y \cdot 36.52704169880642}{z}\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if z < -6e52 or 3.99999999999999979e124 < z

      1. Initial program 3.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. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{x + \frac{313060547623}{100000000000} \cdot y} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\frac{313060547623}{100000000000} \cdot y + x} \]
        2. *-commutativeN/A

          \[\leadsto \color{blue}{y \cdot \frac{313060547623}{100000000000}} + x \]
        3. accelerator-lowering-fma.f6496.8

          \[\leadsto \color{blue}{\mathsf{fma}\left(y, 3.13060547623, x\right)} \]
      5. Simplified96.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, 3.13060547623, x\right)} \]

      if -6e52 < z < 9e12

      1. Initial program 98.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. Add Preprocessing
      3. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\frac{y \cdot \left(\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} + x} \]
        2. clear-numN/A

          \[\leadsto \color{blue}{\frac{1}{\frac{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}}{y \cdot \left(\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}}} + x \]
        3. associate-/r/N/A

          \[\leadsto \color{blue}{\frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \cdot \left(y \cdot \left(\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)\right)} + x \]
        4. accelerator-lowering-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}}, y \cdot \left(\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right), x\right)} \]
      4. Applied egg-rr99.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\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 \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), x\right)} \]

      if 9e12 < z < 3.99999999999999979e124

      1. Initial program 29.2%

        \[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. Add Preprocessing
      3. Taylor expanded in z around -inf

        \[\leadsto \color{blue}{x + \left(-1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z} + \frac{313060547623}{100000000000} \cdot y\right)} \]
      4. Simplified95.3%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+52}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \mathbf{elif}\;z \leq 9000000000000:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{\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 \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), x\right)\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+124}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right) + \frac{\frac{\mathsf{fma}\left(y, t, \mathsf{fma}\left(y, -98.5170599679272, y \cdot 556.47806218377\right)\right)}{z} - y \cdot 36.52704169880642}{z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 4: 96.5% accurate, 1.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{+63}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \mathbf{elif}\;z \leq 9500000000000:\\ \;\;\;\;\mathsf{fma}\left(\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{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)}, x\right)\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+124}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right) + \frac{\frac{\mathsf{fma}\left(y, t, \mathsf{fma}\left(y, -98.5170599679272, y \cdot 556.47806218377\right)\right)}{z} - y \cdot 36.52704169880642}{z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (<= z -4.8e+63)
       (fma y 3.13060547623 x)
       (if (<= z 9500000000000.0)
         (fma
          (fma z (fma z (fma z (fma z 3.13060547623 11.1667541262) t) a) b)
          (/
           y
           (fma
            z
            (fma z (fma z (+ z 15.234687407) 31.4690115749) 11.9400905721)
            0.607771387771))
          x)
         (if (<= z 5e+124)
           (+
            (fma y 3.13060547623 x)
            (/
             (-
              (/ (fma y t (fma y -98.5170599679272 (* y 556.47806218377))) z)
              (* y 36.52704169880642))
             z))
           (fma y 3.13060547623 x)))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (z <= -4.8e+63) {
    		tmp = fma(y, 3.13060547623, x);
    	} else if (z <= 9500000000000.0) {
    		tmp = fma(fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b), (y / fma(z, fma(z, fma(z, (z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), x);
    	} else if (z <= 5e+124) {
    		tmp = fma(y, 3.13060547623, x) + (((fma(y, t, fma(y, -98.5170599679272, (y * 556.47806218377))) / z) - (y * 36.52704169880642)) / z);
    	} else {
    		tmp = fma(y, 3.13060547623, x);
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if (z <= -4.8e+63)
    		tmp = fma(y, 3.13060547623, x);
    	elseif (z <= 9500000000000.0)
    		tmp = fma(fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b), Float64(y / fma(z, fma(z, fma(z, Float64(z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), x);
    	elseif (z <= 5e+124)
    		tmp = Float64(fma(y, 3.13060547623, x) + Float64(Float64(Float64(fma(y, t, fma(y, -98.5170599679272, Float64(y * 556.47806218377))) / z) - Float64(y * 36.52704169880642)) / z));
    	else
    		tmp = fma(y, 3.13060547623, x);
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.8e+63], N[(y * 3.13060547623 + x), $MachinePrecision], If[LessEqual[z, 9500000000000.0], N[(N[(z * N[(z * N[(z * N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + b), $MachinePrecision] * N[(y / N[(z * N[(z * N[(z * N[(z + 15.234687407), $MachinePrecision] + 31.4690115749), $MachinePrecision] + 11.9400905721), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 5e+124], N[(N[(y * 3.13060547623 + x), $MachinePrecision] + N[(N[(N[(N[(y * t + N[(y * -98.5170599679272 + N[(y * 556.47806218377), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - N[(y * 36.52704169880642), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(y * 3.13060547623 + x), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;z \leq -4.8 \cdot 10^{+63}:\\
    \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
    
    \mathbf{elif}\;z \leq 9500000000000:\\
    \;\;\;\;\mathsf{fma}\left(\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{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)}, x\right)\\
    
    \mathbf{elif}\;z \leq 5 \cdot 10^{+124}:\\
    \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right) + \frac{\frac{\mathsf{fma}\left(y, t, \mathsf{fma}\left(y, -98.5170599679272, y \cdot 556.47806218377\right)\right)}{z} - y \cdot 36.52704169880642}{z}\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if z < -4.8e63 or 4.9999999999999996e124 < z

      1. Initial program 3.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. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{x + \frac{313060547623}{100000000000} \cdot y} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\frac{313060547623}{100000000000} \cdot y + x} \]
        2. *-commutativeN/A

          \[\leadsto \color{blue}{y \cdot \frac{313060547623}{100000000000}} + x \]
        3. accelerator-lowering-fma.f6497.8

          \[\leadsto \color{blue}{\mathsf{fma}\left(y, 3.13060547623, x\right)} \]
      5. Simplified97.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, 3.13060547623, x\right)} \]

      if -4.8e63 < z < 9.5e12

      1. Initial program 96.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. Add Preprocessing
      3. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\frac{y \cdot \left(\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} + x} \]
        2. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{\left(\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right) \cdot y}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} + x \]
        3. associate-/l*N/A

          \[\leadsto \color{blue}{\left(\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right) \cdot \frac{y}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}}} + x \]
        4. accelerator-lowering-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b, \frac{y}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}}, x\right)} \]
      4. Applied egg-rr98.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\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{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)}, x\right)} \]

      if 9.5e12 < z < 4.9999999999999996e124

      1. Initial program 29.2%

        \[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. Add Preprocessing
      3. Taylor expanded in z around -inf

        \[\leadsto \color{blue}{x + \left(-1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z} + \frac{313060547623}{100000000000} \cdot y\right)} \]
      4. Simplified95.3%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{+63}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \mathbf{elif}\;z \leq 9500000000000:\\ \;\;\;\;\mathsf{fma}\left(\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{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)}, x\right)\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+124}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right) + \frac{\frac{\mathsf{fma}\left(y, t, \mathsf{fma}\left(y, -98.5170599679272, y \cdot 556.47806218377\right)\right)}{z} - y \cdot 36.52704169880642}{z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 5: 95.2% accurate, 1.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+22}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \mathbf{elif}\;z \leq 9500000000000:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{\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 \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right), x\right)\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+124}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right) + \frac{\frac{\mathsf{fma}\left(y, t, \mathsf{fma}\left(y, -98.5170599679272, y \cdot 556.47806218377\right)\right)}{z} - y \cdot 36.52704169880642}{z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (<= z -1.15e+22)
       (fma y 3.13060547623 x)
       (if (<= z 9500000000000.0)
         (fma
          (/
           1.0
           (fma
            z
            (fma z (fma z (+ z 15.234687407) 31.4690115749) 11.9400905721)
            0.607771387771))
          (* y (fma z (fma z t a) b))
          x)
         (if (<= z 6.5e+124)
           (+
            (fma y 3.13060547623 x)
            (/
             (-
              (/ (fma y t (fma y -98.5170599679272 (* y 556.47806218377))) z)
              (* y 36.52704169880642))
             z))
           (fma y 3.13060547623 x)))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (z <= -1.15e+22) {
    		tmp = fma(y, 3.13060547623, x);
    	} else if (z <= 9500000000000.0) {
    		tmp = fma((1.0 / fma(z, fma(z, fma(z, (z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), (y * fma(z, fma(z, t, a), b)), x);
    	} else if (z <= 6.5e+124) {
    		tmp = fma(y, 3.13060547623, x) + (((fma(y, t, fma(y, -98.5170599679272, (y * 556.47806218377))) / z) - (y * 36.52704169880642)) / z);
    	} else {
    		tmp = fma(y, 3.13060547623, x);
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if (z <= -1.15e+22)
    		tmp = fma(y, 3.13060547623, x);
    	elseif (z <= 9500000000000.0)
    		tmp = fma(Float64(1.0 / fma(z, fma(z, fma(z, Float64(z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), Float64(y * fma(z, fma(z, t, a), b)), x);
    	elseif (z <= 6.5e+124)
    		tmp = Float64(fma(y, 3.13060547623, x) + Float64(Float64(Float64(fma(y, t, fma(y, -98.5170599679272, Float64(y * 556.47806218377))) / z) - Float64(y * 36.52704169880642)) / z));
    	else
    		tmp = fma(y, 3.13060547623, x);
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.15e+22], N[(y * 3.13060547623 + x), $MachinePrecision], If[LessEqual[z, 9500000000000.0], N[(N[(1.0 / N[(z * N[(z * N[(z * N[(z + 15.234687407), $MachinePrecision] + 31.4690115749), $MachinePrecision] + 11.9400905721), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision] * N[(y * N[(z * N[(z * t + a), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 6.5e+124], N[(N[(y * 3.13060547623 + x), $MachinePrecision] + N[(N[(N[(N[(y * t + N[(y * -98.5170599679272 + N[(y * 556.47806218377), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - N[(y * 36.52704169880642), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(y * 3.13060547623 + x), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;z \leq -1.15 \cdot 10^{+22}:\\
    \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
    
    \mathbf{elif}\;z \leq 9500000000000:\\
    \;\;\;\;\mathsf{fma}\left(\frac{1}{\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 \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right), x\right)\\
    
    \mathbf{elif}\;z \leq 6.5 \cdot 10^{+124}:\\
    \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right) + \frac{\frac{\mathsf{fma}\left(y, t, \mathsf{fma}\left(y, -98.5170599679272, y \cdot 556.47806218377\right)\right)}{z} - y \cdot 36.52704169880642}{z}\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if z < -1.1500000000000001e22 or 6.50000000000000008e124 < z

      1. Initial program 8.2%

        \[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. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{x + \frac{313060547623}{100000000000} \cdot y} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\frac{313060547623}{100000000000} \cdot y + x} \]
        2. *-commutativeN/A

          \[\leadsto \color{blue}{y \cdot \frac{313060547623}{100000000000}} + x \]
        3. accelerator-lowering-fma.f6495.1

          \[\leadsto \color{blue}{\mathsf{fma}\left(y, 3.13060547623, x\right)} \]
      5. Simplified95.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, 3.13060547623, x\right)} \]

      if -1.1500000000000001e22 < z < 9.5e12

      1. Initial program 99.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. Add Preprocessing
      3. Taylor expanded in z around 0

        \[\leadsto x + \frac{y \cdot \color{blue}{\left(b + z \cdot \left(a + t \cdot z\right)\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto x + \frac{y \cdot \color{blue}{\left(z \cdot \left(a + t \cdot z\right) + b\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
        2. accelerator-lowering-fma.f64N/A

          \[\leadsto x + \frac{y \cdot \color{blue}{\mathsf{fma}\left(z, a + t \cdot z, b\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
        3. +-commutativeN/A

          \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \color{blue}{t \cdot z + a}, b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
        4. *-commutativeN/A

          \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \color{blue}{z \cdot t} + a, b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
        5. accelerator-lowering-fma.f6499.6

          \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, t, a\right)}, b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
      5. Simplified99.6%

        \[\leadsto x + \frac{y \cdot \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right)}}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
      6. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\frac{y \cdot \left(z \cdot \left(z \cdot t + a\right) + b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} + x} \]
        2. clear-numN/A

          \[\leadsto \color{blue}{\frac{1}{\frac{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}}{y \cdot \left(z \cdot \left(z \cdot t + a\right) + b\right)}}} + x \]
        3. associate-/r/N/A

          \[\leadsto \color{blue}{\frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \cdot \left(y \cdot \left(z \cdot \left(z \cdot t + a\right) + b\right)\right)} + x \]
        4. distribute-lft-inN/A

          \[\leadsto \frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \cdot \color{blue}{\left(y \cdot \left(z \cdot \left(z \cdot t + a\right)\right) + y \cdot b\right)} + x \]
        5. *-commutativeN/A

          \[\leadsto \frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \cdot \left(y \cdot \color{blue}{\left(\left(z \cdot t + a\right) \cdot z\right)} + y \cdot b\right) + x \]
        6. associate-*r*N/A

          \[\leadsto \frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \cdot \left(\color{blue}{\left(y \cdot \left(z \cdot t + a\right)\right) \cdot z} + y \cdot b\right) + x \]
        7. +-commutativeN/A

          \[\leadsto \frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \cdot \left(\left(y \cdot \color{blue}{\left(a + z \cdot t\right)}\right) \cdot z + y \cdot b\right) + x \]
        8. distribute-lft-outN/A

          \[\leadsto \frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \cdot \left(\color{blue}{\left(y \cdot a + y \cdot \left(z \cdot t\right)\right)} \cdot z + y \cdot b\right) + x \]
        9. *-commutativeN/A

          \[\leadsto \frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \cdot \left(\color{blue}{z \cdot \left(y \cdot a + y \cdot \left(z \cdot t\right)\right)} + y \cdot b\right) + x \]
        10. accelerator-lowering-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}}, z \cdot \left(y \cdot a + y \cdot \left(z \cdot t\right)\right) + y \cdot b, x\right)} \]
      7. Applied egg-rr99.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\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 \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right), x\right)} \]

      if 9.5e12 < z < 6.50000000000000008e124

      1. Initial program 29.2%

        \[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. Add Preprocessing
      3. Taylor expanded in z around -inf

        \[\leadsto \color{blue}{x + \left(-1 \cdot \frac{\left(\frac{-55833770631}{5000000000} \cdot y + -1 \cdot \frac{t \cdot y - \left(\frac{-15234687407}{1000000000} \cdot \left(\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y\right) + \frac{98517059967927196814627}{1000000000000000000000} \cdot y\right)}{z}\right) - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z} + \frac{313060547623}{100000000000} \cdot y\right)} \]
      4. Simplified95.3%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+22}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \mathbf{elif}\;z \leq 9500000000000:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{\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 \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right), x\right)\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+124}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right) + \frac{\frac{\mathsf{fma}\left(y, t, \mathsf{fma}\left(y, -98.5170599679272, y \cdot 556.47806218377\right)\right)}{z} - y \cdot 36.52704169880642}{z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 6: 94.9% accurate, 1.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+22}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+49}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{\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 \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (<= z -1.15e+22)
       (fma y 3.13060547623 x)
       (if (<= z 6.5e+49)
         (fma
          (/
           1.0
           (fma
            z
            (fma z (fma z (+ z 15.234687407) 31.4690115749) 11.9400905721)
            0.607771387771))
          (* y (fma z (fma z t a) b))
          x)
         (fma y 3.13060547623 x))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (z <= -1.15e+22) {
    		tmp = fma(y, 3.13060547623, x);
    	} else if (z <= 6.5e+49) {
    		tmp = fma((1.0 / fma(z, fma(z, fma(z, (z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), (y * fma(z, fma(z, t, a), b)), x);
    	} else {
    		tmp = fma(y, 3.13060547623, x);
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if (z <= -1.15e+22)
    		tmp = fma(y, 3.13060547623, x);
    	elseif (z <= 6.5e+49)
    		tmp = fma(Float64(1.0 / fma(z, fma(z, fma(z, Float64(z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), Float64(y * fma(z, fma(z, t, a), b)), x);
    	else
    		tmp = fma(y, 3.13060547623, x);
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.15e+22], N[(y * 3.13060547623 + x), $MachinePrecision], If[LessEqual[z, 6.5e+49], N[(N[(1.0 / N[(z * N[(z * N[(z * N[(z + 15.234687407), $MachinePrecision] + 31.4690115749), $MachinePrecision] + 11.9400905721), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision] * N[(y * N[(z * N[(z * t + a), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(y * 3.13060547623 + x), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;z \leq -1.15 \cdot 10^{+22}:\\
    \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
    
    \mathbf{elif}\;z \leq 6.5 \cdot 10^{+49}:\\
    \;\;\;\;\mathsf{fma}\left(\frac{1}{\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 \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right), x\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -1.1500000000000001e22 or 6.5000000000000005e49 < z

      1. Initial program 8.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. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{x + \frac{313060547623}{100000000000} \cdot y} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\frac{313060547623}{100000000000} \cdot y + x} \]
        2. *-commutativeN/A

          \[\leadsto \color{blue}{y \cdot \frac{313060547623}{100000000000}} + x \]
        3. accelerator-lowering-fma.f6492.2

          \[\leadsto \color{blue}{\mathsf{fma}\left(y, 3.13060547623, x\right)} \]
      5. Simplified92.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, 3.13060547623, x\right)} \]

      if -1.1500000000000001e22 < z < 6.5000000000000005e49

      1. Initial program 98.2%

        \[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. Add Preprocessing
      3. Taylor expanded in z around 0

        \[\leadsto x + \frac{y \cdot \color{blue}{\left(b + z \cdot \left(a + t \cdot z\right)\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto x + \frac{y \cdot \color{blue}{\left(z \cdot \left(a + t \cdot z\right) + b\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
        2. accelerator-lowering-fma.f64N/A

          \[\leadsto x + \frac{y \cdot \color{blue}{\mathsf{fma}\left(z, a + t \cdot z, b\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
        3. +-commutativeN/A

          \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \color{blue}{t \cdot z + a}, b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
        4. *-commutativeN/A

          \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \color{blue}{z \cdot t} + a, b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
        5. accelerator-lowering-fma.f6497.0

          \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, t, a\right)}, b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
      5. Simplified97.0%

        \[\leadsto x + \frac{y \cdot \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right)}}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
      6. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\frac{y \cdot \left(z \cdot \left(z \cdot t + a\right) + b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} + x} \]
        2. clear-numN/A

          \[\leadsto \color{blue}{\frac{1}{\frac{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}}{y \cdot \left(z \cdot \left(z \cdot t + a\right) + b\right)}}} + x \]
        3. associate-/r/N/A

          \[\leadsto \color{blue}{\frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \cdot \left(y \cdot \left(z \cdot \left(z \cdot t + a\right) + b\right)\right)} + x \]
        4. distribute-lft-inN/A

          \[\leadsto \frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \cdot \color{blue}{\left(y \cdot \left(z \cdot \left(z \cdot t + a\right)\right) + y \cdot b\right)} + x \]
        5. *-commutativeN/A

          \[\leadsto \frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \cdot \left(y \cdot \color{blue}{\left(\left(z \cdot t + a\right) \cdot z\right)} + y \cdot b\right) + x \]
        6. associate-*r*N/A

          \[\leadsto \frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \cdot \left(\color{blue}{\left(y \cdot \left(z \cdot t + a\right)\right) \cdot z} + y \cdot b\right) + x \]
        7. +-commutativeN/A

          \[\leadsto \frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \cdot \left(\left(y \cdot \color{blue}{\left(a + z \cdot t\right)}\right) \cdot z + y \cdot b\right) + x \]
        8. distribute-lft-outN/A

          \[\leadsto \frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \cdot \left(\color{blue}{\left(y \cdot a + y \cdot \left(z \cdot t\right)\right)} \cdot z + y \cdot b\right) + x \]
        9. *-commutativeN/A

          \[\leadsto \frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \cdot \left(\color{blue}{z \cdot \left(y \cdot a + y \cdot \left(z \cdot t\right)\right)} + y \cdot b\right) + x \]
        10. accelerator-lowering-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}}, z \cdot \left(y \cdot a + y \cdot \left(z \cdot t\right)\right) + y \cdot b, x\right)} \]
      7. Applied egg-rr97.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\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 \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right), x\right)} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 7: 95.2% accurate, 1.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+22}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \mathbf{elif}\;z \leq 1.16 \cdot 10^{+53}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right), \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)}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (<= z -1.05e+22)
       (fma y 3.13060547623 x)
       (if (<= z 1.16e+53)
         (fma
          (fma z (fma z t a) b)
          (/
           y
           (fma
            z
            (fma z (fma z (+ z 15.234687407) 31.4690115749) 11.9400905721)
            0.607771387771))
          x)
         (fma y 3.13060547623 x))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (z <= -1.05e+22) {
    		tmp = fma(y, 3.13060547623, x);
    	} else if (z <= 1.16e+53) {
    		tmp = fma(fma(z, fma(z, t, a), b), (y / fma(z, fma(z, fma(z, (z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), x);
    	} else {
    		tmp = fma(y, 3.13060547623, x);
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if (z <= -1.05e+22)
    		tmp = fma(y, 3.13060547623, x);
    	elseif (z <= 1.16e+53)
    		tmp = fma(fma(z, fma(z, t, a), b), Float64(y / fma(z, fma(z, fma(z, Float64(z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), x);
    	else
    		tmp = fma(y, 3.13060547623, x);
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.05e+22], N[(y * 3.13060547623 + x), $MachinePrecision], If[LessEqual[z, 1.16e+53], N[(N[(z * N[(z * t + a), $MachinePrecision] + b), $MachinePrecision] * N[(y / N[(z * N[(z * N[(z * N[(z + 15.234687407), $MachinePrecision] + 31.4690115749), $MachinePrecision] + 11.9400905721), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(y * 3.13060547623 + x), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;z \leq -1.05 \cdot 10^{+22}:\\
    \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
    
    \mathbf{elif}\;z \leq 1.16 \cdot 10^{+53}:\\
    \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right), \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)}, x\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -1.0499999999999999e22 or 1.16e53 < z

      1. Initial program 8.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. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{x + \frac{313060547623}{100000000000} \cdot y} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\frac{313060547623}{100000000000} \cdot y + x} \]
        2. *-commutativeN/A

          \[\leadsto \color{blue}{y \cdot \frac{313060547623}{100000000000}} + x \]
        3. accelerator-lowering-fma.f6492.2

          \[\leadsto \color{blue}{\mathsf{fma}\left(y, 3.13060547623, x\right)} \]
      5. Simplified92.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, 3.13060547623, x\right)} \]

      if -1.0499999999999999e22 < z < 1.16e53

      1. Initial program 98.2%

        \[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. Add Preprocessing
      3. Taylor expanded in z around 0

        \[\leadsto x + \frac{y \cdot \color{blue}{\left(b + z \cdot \left(a + t \cdot z\right)\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto x + \frac{y \cdot \color{blue}{\left(z \cdot \left(a + t \cdot z\right) + b\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
        2. accelerator-lowering-fma.f64N/A

          \[\leadsto x + \frac{y \cdot \color{blue}{\mathsf{fma}\left(z, a + t \cdot z, b\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
        3. +-commutativeN/A

          \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \color{blue}{t \cdot z + a}, b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
        4. *-commutativeN/A

          \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \color{blue}{z \cdot t} + a, b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
        5. accelerator-lowering-fma.f6497.0

          \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, t, a\right)}, b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
      5. Simplified97.0%

        \[\leadsto x + \frac{y \cdot \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right)}}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
      6. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\frac{y \cdot \left(z \cdot \left(z \cdot t + a\right) + b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} + x} \]
        2. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{\left(z \cdot \left(z \cdot t + a\right) + b\right) \cdot y}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} + x \]
        3. associate-/l*N/A

          \[\leadsto \color{blue}{\left(z \cdot \left(z \cdot t + a\right) + b\right) \cdot \frac{y}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}}} + x \]
        4. accelerator-lowering-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot \left(z \cdot t + a\right) + b, \frac{y}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}}, x\right)} \]
      7. Applied egg-rr97.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right), \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)}, x\right)} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 8: 93.1% accurate, 2.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{+21}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \mathbf{elif}\;z \leq 950000000:\\ \;\;\;\;\mathsf{fma}\left(y \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right), 1.6453555072203998, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{z}, -36.52704169880642, \mathsf{fma}\left(y, 3.13060547623, x\right)\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (<= z -1.9e+21)
       (fma y 3.13060547623 x)
       (if (<= z 950000000.0)
         (fma (* y (fma z (fma z t a) b)) 1.6453555072203998 x)
         (fma (/ y z) -36.52704169880642 (fma y 3.13060547623 x)))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (z <= -1.9e+21) {
    		tmp = fma(y, 3.13060547623, x);
    	} else if (z <= 950000000.0) {
    		tmp = fma((y * fma(z, fma(z, t, a), b)), 1.6453555072203998, x);
    	} else {
    		tmp = fma((y / z), -36.52704169880642, fma(y, 3.13060547623, x));
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if (z <= -1.9e+21)
    		tmp = fma(y, 3.13060547623, x);
    	elseif (z <= 950000000.0)
    		tmp = fma(Float64(y * fma(z, fma(z, t, a), b)), 1.6453555072203998, x);
    	else
    		tmp = fma(Float64(y / z), -36.52704169880642, fma(y, 3.13060547623, x));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.9e+21], N[(y * 3.13060547623 + x), $MachinePrecision], If[LessEqual[z, 950000000.0], N[(N[(y * N[(z * N[(z * t + a), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] * 1.6453555072203998 + x), $MachinePrecision], N[(N[(y / z), $MachinePrecision] * -36.52704169880642 + N[(y * 3.13060547623 + x), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;z \leq -1.9 \cdot 10^{+21}:\\
    \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
    
    \mathbf{elif}\;z \leq 950000000:\\
    \;\;\;\;\mathsf{fma}\left(y \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right), 1.6453555072203998, x\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(\frac{y}{z}, -36.52704169880642, \mathsf{fma}\left(y, 3.13060547623, x\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if z < -1.9e21

      1. Initial program 12.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. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{x + \frac{313060547623}{100000000000} \cdot y} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\frac{313060547623}{100000000000} \cdot y + x} \]
        2. *-commutativeN/A

          \[\leadsto \color{blue}{y \cdot \frac{313060547623}{100000000000}} + x \]
        3. accelerator-lowering-fma.f6492.7

          \[\leadsto \color{blue}{\mathsf{fma}\left(y, 3.13060547623, x\right)} \]
      5. Simplified92.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, 3.13060547623, x\right)} \]

      if -1.9e21 < z < 9.5e8

      1. Initial program 99.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. Add Preprocessing
      3. Taylor expanded in z around 0

        \[\leadsto x + \frac{y \cdot \color{blue}{\left(b + z \cdot \left(a + t \cdot z\right)\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto x + \frac{y \cdot \color{blue}{\left(z \cdot \left(a + t \cdot z\right) + b\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
        2. accelerator-lowering-fma.f64N/A

          \[\leadsto x + \frac{y \cdot \color{blue}{\mathsf{fma}\left(z, a + t \cdot z, b\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
        3. +-commutativeN/A

          \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \color{blue}{t \cdot z + a}, b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
        4. *-commutativeN/A

          \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \color{blue}{z \cdot t} + a, b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
        5. accelerator-lowering-fma.f6499.6

          \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, t, a\right)}, b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
      5. Simplified99.6%

        \[\leadsto x + \frac{y \cdot \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right)}}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
      6. Taylor expanded in z around 0

        \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right)}{\color{blue}{\frac{607771387771}{1000000000000}}} \]
      7. Step-by-step derivation
        1. Simplified96.5%

          \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right)}{\color{blue}{0.607771387771}} \]
        2. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \color{blue}{\frac{y \cdot \left(z \cdot \left(z \cdot t + a\right) + b\right)}{\frac{607771387771}{1000000000000}} + x} \]
          2. div-invN/A

            \[\leadsto \color{blue}{\left(y \cdot \left(z \cdot \left(z \cdot t + a\right) + b\right)\right) \cdot \frac{1}{\frac{607771387771}{1000000000000}}} + x \]
          3. metadata-evalN/A

            \[\leadsto \left(y \cdot \left(z \cdot \left(z \cdot t + a\right) + b\right)\right) \cdot \color{blue}{\frac{1000000000000}{607771387771}} + x \]
          4. accelerator-lowering-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot \left(z \cdot \left(z \cdot t + a\right) + b\right), \frac{1000000000000}{607771387771}, x\right)} \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{y \cdot \left(z \cdot \left(z \cdot t + a\right) + b\right)}, \frac{1000000000000}{607771387771}, x\right) \]
          6. accelerator-lowering-fma.f64N/A

            \[\leadsto \mathsf{fma}\left(y \cdot \color{blue}{\mathsf{fma}\left(z, z \cdot t + a, b\right)}, \frac{1000000000000}{607771387771}, x\right) \]
          7. accelerator-lowering-fma.f6496.6

            \[\leadsto \mathsf{fma}\left(y \cdot \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, t, a\right)}, b\right), 1.6453555072203998, x\right) \]
        3. Applied egg-rr96.6%

          \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right), 1.6453555072203998, x\right)} \]

        if 9.5e8 < z

        1. Initial program 13.2%

          \[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. Add Preprocessing
        3. Taylor expanded in z around inf

          \[\leadsto \color{blue}{\left(x + \left(\frac{313060547623}{100000000000} \cdot y + \frac{55833770631}{5000000000} \cdot \frac{y}{z}\right)\right) - \frac{4769379582500641883561}{100000000000000000000} \cdot \frac{y}{z}} \]
        4. Step-by-step derivation
          1. associate--l+N/A

            \[\leadsto \color{blue}{x + \left(\left(\frac{313060547623}{100000000000} \cdot y + \frac{55833770631}{5000000000} \cdot \frac{y}{z}\right) - \frac{4769379582500641883561}{100000000000000000000} \cdot \frac{y}{z}\right)} \]
          2. +-commutativeN/A

            \[\leadsto \color{blue}{\left(\left(\frac{313060547623}{100000000000} \cdot y + \frac{55833770631}{5000000000} \cdot \frac{y}{z}\right) - \frac{4769379582500641883561}{100000000000000000000} \cdot \frac{y}{z}\right) + x} \]
          3. associate--l+N/A

            \[\leadsto \color{blue}{\left(\frac{313060547623}{100000000000} \cdot y + \left(\frac{55833770631}{5000000000} \cdot \frac{y}{z} - \frac{4769379582500641883561}{100000000000000000000} \cdot \frac{y}{z}\right)\right)} + x \]
          4. +-commutativeN/A

            \[\leadsto \color{blue}{\left(\left(\frac{55833770631}{5000000000} \cdot \frac{y}{z} - \frac{4769379582500641883561}{100000000000000000000} \cdot \frac{y}{z}\right) + \frac{313060547623}{100000000000} \cdot y\right)} + x \]
          5. distribute-rgt-out--N/A

            \[\leadsto \left(\color{blue}{\frac{y}{z} \cdot \left(\frac{55833770631}{5000000000} - \frac{4769379582500641883561}{100000000000000000000}\right)} + \frac{313060547623}{100000000000} \cdot y\right) + x \]
          6. metadata-evalN/A

            \[\leadsto \left(\frac{y}{z} \cdot \color{blue}{\frac{-3652704169880641883561}{100000000000000000000}} + \frac{313060547623}{100000000000} \cdot y\right) + x \]
          7. metadata-evalN/A

            \[\leadsto \left(\frac{y}{z} \cdot \color{blue}{\frac{\frac{3652704169880641883561}{100000000000000000000}}{-1}} + \frac{313060547623}{100000000000} \cdot y\right) + x \]
          8. metadata-evalN/A

            \[\leadsto \left(\frac{y}{z} \cdot \frac{\color{blue}{\frac{-55833770631}{5000000000} - \frac{-4769379582500641883561}{100000000000000000000}}}{-1} + \frac{313060547623}{100000000000} \cdot y\right) + x \]
          9. times-fracN/A

            \[\leadsto \left(\color{blue}{\frac{y \cdot \left(\frac{-55833770631}{5000000000} - \frac{-4769379582500641883561}{100000000000000000000}\right)}{z \cdot -1}} + \frac{313060547623}{100000000000} \cdot y\right) + x \]
          10. distribute-rgt-out--N/A

            \[\leadsto \left(\frac{\color{blue}{\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}}{z \cdot -1} + \frac{313060547623}{100000000000} \cdot y\right) + x \]
          11. *-commutativeN/A

            \[\leadsto \left(\frac{\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{\color{blue}{-1 \cdot z}} + \frac{313060547623}{100000000000} \cdot y\right) + x \]
          12. mul-1-negN/A

            \[\leadsto \left(\frac{\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{\color{blue}{\mathsf{neg}\left(z\right)}} + \frac{313060547623}{100000000000} \cdot y\right) + x \]
          13. distribute-neg-frac2N/A

            \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(\frac{\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}\right)\right)} + \frac{313060547623}{100000000000} \cdot y\right) + x \]
          14. mul-1-negN/A

            \[\leadsto \left(\color{blue}{-1 \cdot \frac{\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z}} + \frac{313060547623}{100000000000} \cdot y\right) + x \]
          15. associate-+l+N/A

            \[\leadsto \color{blue}{-1 \cdot \frac{\frac{-55833770631}{5000000000} \cdot y - \frac{-4769379582500641883561}{100000000000000000000} \cdot y}{z} + \left(\frac{313060547623}{100000000000} \cdot y + x\right)} \]
        5. Simplified85.1%

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{z}, -36.52704169880642, \mathsf{fma}\left(y, 3.13060547623, x\right)\right)} \]
      8. Recombined 3 regimes into one program.
      9. Add Preprocessing

      Alternative 9: 93.1% accurate, 2.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{+21}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \mathbf{elif}\;z \leq 650000000:\\ \;\;\;\;\mathsf{fma}\left(y \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right), 1.6453555072203998, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (if (<= z -5.5e+21)
         (fma y 3.13060547623 x)
         (if (<= z 650000000.0)
           (fma (* y (fma z (fma z t a) b)) 1.6453555072203998 x)
           (fma y 3.13060547623 x))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (z <= -5.5e+21) {
      		tmp = fma(y, 3.13060547623, x);
      	} else if (z <= 650000000.0) {
      		tmp = fma((y * fma(z, fma(z, t, a), b)), 1.6453555072203998, x);
      	} else {
      		tmp = fma(y, 3.13060547623, x);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	tmp = 0.0
      	if (z <= -5.5e+21)
      		tmp = fma(y, 3.13060547623, x);
      	elseif (z <= 650000000.0)
      		tmp = fma(Float64(y * fma(z, fma(z, t, a), b)), 1.6453555072203998, x);
      	else
      		tmp = fma(y, 3.13060547623, x);
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5.5e+21], N[(y * 3.13060547623 + x), $MachinePrecision], If[LessEqual[z, 650000000.0], N[(N[(y * N[(z * N[(z * t + a), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] * 1.6453555072203998 + x), $MachinePrecision], N[(y * 3.13060547623 + x), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;z \leq -5.5 \cdot 10^{+21}:\\
      \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
      
      \mathbf{elif}\;z \leq 650000000:\\
      \;\;\;\;\mathsf{fma}\left(y \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right), 1.6453555072203998, x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -5.5e21 or 6.5e8 < z

        1. Initial program 12.7%

          \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        2. Add Preprocessing
        3. Taylor expanded in z around inf

          \[\leadsto \color{blue}{x + \frac{313060547623}{100000000000} \cdot y} \]
        4. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \color{blue}{\frac{313060547623}{100000000000} \cdot y + x} \]
          2. *-commutativeN/A

            \[\leadsto \color{blue}{y \cdot \frac{313060547623}{100000000000}} + x \]
          3. accelerator-lowering-fma.f6488.9

            \[\leadsto \color{blue}{\mathsf{fma}\left(y, 3.13060547623, x\right)} \]
        5. Simplified88.9%

          \[\leadsto \color{blue}{\mathsf{fma}\left(y, 3.13060547623, x\right)} \]

        if -5.5e21 < z < 6.5e8

        1. Initial program 99.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. Add Preprocessing
        3. Taylor expanded in z around 0

          \[\leadsto x + \frac{y \cdot \color{blue}{\left(b + z \cdot \left(a + t \cdot z\right)\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
        4. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x + \frac{y \cdot \color{blue}{\left(z \cdot \left(a + t \cdot z\right) + b\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          2. accelerator-lowering-fma.f64N/A

            \[\leadsto x + \frac{y \cdot \color{blue}{\mathsf{fma}\left(z, a + t \cdot z, b\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          3. +-commutativeN/A

            \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \color{blue}{t \cdot z + a}, b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          4. *-commutativeN/A

            \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \color{blue}{z \cdot t} + a, b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          5. accelerator-lowering-fma.f6499.6

            \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, t, a\right)}, b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        5. Simplified99.6%

          \[\leadsto x + \frac{y \cdot \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right)}}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        6. Taylor expanded in z around 0

          \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right)}{\color{blue}{\frac{607771387771}{1000000000000}}} \]
        7. Step-by-step derivation
          1. Simplified96.5%

            \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right)}{\color{blue}{0.607771387771}} \]
          2. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{\frac{y \cdot \left(z \cdot \left(z \cdot t + a\right) + b\right)}{\frac{607771387771}{1000000000000}} + x} \]
            2. div-invN/A

              \[\leadsto \color{blue}{\left(y \cdot \left(z \cdot \left(z \cdot t + a\right) + b\right)\right) \cdot \frac{1}{\frac{607771387771}{1000000000000}}} + x \]
            3. metadata-evalN/A

              \[\leadsto \left(y \cdot \left(z \cdot \left(z \cdot t + a\right) + b\right)\right) \cdot \color{blue}{\frac{1000000000000}{607771387771}} + x \]
            4. accelerator-lowering-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot \left(z \cdot \left(z \cdot t + a\right) + b\right), \frac{1000000000000}{607771387771}, x\right)} \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fma}\left(\color{blue}{y \cdot \left(z \cdot \left(z \cdot t + a\right) + b\right)}, \frac{1000000000000}{607771387771}, x\right) \]
            6. accelerator-lowering-fma.f64N/A

              \[\leadsto \mathsf{fma}\left(y \cdot \color{blue}{\mathsf{fma}\left(z, z \cdot t + a, b\right)}, \frac{1000000000000}{607771387771}, x\right) \]
            7. accelerator-lowering-fma.f6496.6

              \[\leadsto \mathsf{fma}\left(y \cdot \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, t, a\right)}, b\right), 1.6453555072203998, x\right) \]
          3. Applied egg-rr96.6%

            \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right), 1.6453555072203998, x\right)} \]
        8. Recombined 2 regimes into one program.
        9. Add Preprocessing

        Alternative 10: 90.3% accurate, 2.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+21}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \mathbf{elif}\;z \leq 95000000000:\\ \;\;\;\;\mathsf{fma}\left(y \cdot 1.6453555072203998, \mathsf{fma}\left(z, a, b\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (if (<= z -6.8e+21)
           (fma y 3.13060547623 x)
           (if (<= z 95000000000.0)
             (fma (* y 1.6453555072203998) (fma z a b) x)
             (fma y 3.13060547623 x))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double tmp;
        	if (z <= -6.8e+21) {
        		tmp = fma(y, 3.13060547623, x);
        	} else if (z <= 95000000000.0) {
        		tmp = fma((y * 1.6453555072203998), fma(z, a, b), x);
        	} else {
        		tmp = fma(y, 3.13060547623, x);
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	tmp = 0.0
        	if (z <= -6.8e+21)
        		tmp = fma(y, 3.13060547623, x);
        	elseif (z <= 95000000000.0)
        		tmp = fma(Float64(y * 1.6453555072203998), fma(z, a, b), x);
        	else
        		tmp = fma(y, 3.13060547623, x);
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -6.8e+21], N[(y * 3.13060547623 + x), $MachinePrecision], If[LessEqual[z, 95000000000.0], N[(N[(y * 1.6453555072203998), $MachinePrecision] * N[(z * a + b), $MachinePrecision] + x), $MachinePrecision], N[(y * 3.13060547623 + x), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;z \leq -6.8 \cdot 10^{+21}:\\
        \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
        
        \mathbf{elif}\;z \leq 95000000000:\\
        \;\;\;\;\mathsf{fma}\left(y \cdot 1.6453555072203998, \mathsf{fma}\left(z, a, b\right), x\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -6.8e21 or 9.5e10 < z

          1. Initial program 12.7%

            \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
          2. Add Preprocessing
          3. Taylor expanded in z around inf

            \[\leadsto \color{blue}{x + \frac{313060547623}{100000000000} \cdot y} \]
          4. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{\frac{313060547623}{100000000000} \cdot y + x} \]
            2. *-commutativeN/A

              \[\leadsto \color{blue}{y \cdot \frac{313060547623}{100000000000}} + x \]
            3. accelerator-lowering-fma.f6488.9

              \[\leadsto \color{blue}{\mathsf{fma}\left(y, 3.13060547623, x\right)} \]
          5. Simplified88.9%

            \[\leadsto \color{blue}{\mathsf{fma}\left(y, 3.13060547623, x\right)} \]

          if -6.8e21 < z < 9.5e10

          1. Initial program 99.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. Add Preprocessing
          3. Taylor expanded in z around 0

            \[\leadsto x + \frac{y \cdot \color{blue}{\left(b + z \cdot \left(a + t \cdot z\right)\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
          4. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto x + \frac{y \cdot \color{blue}{\left(z \cdot \left(a + t \cdot z\right) + b\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
            2. accelerator-lowering-fma.f64N/A

              \[\leadsto x + \frac{y \cdot \color{blue}{\mathsf{fma}\left(z, a + t \cdot z, b\right)}}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
            3. +-commutativeN/A

              \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \color{blue}{t \cdot z + a}, b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
            4. *-commutativeN/A

              \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \color{blue}{z \cdot t} + a, b\right)}{\left(\left(\left(z + \frac{15234687407}{1000000000}\right) \cdot z + \frac{314690115749}{10000000000}\right) \cdot z + \frac{119400905721}{10000000000}\right) \cdot z + \frac{607771387771}{1000000000000}} \]
            5. accelerator-lowering-fma.f6499.6

              \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, t, a\right)}, b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
          5. Simplified99.6%

            \[\leadsto x + \frac{y \cdot \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right)}}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
          6. Taylor expanded in z around 0

            \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right)}{\color{blue}{\frac{607771387771}{1000000000000}}} \]
          7. Step-by-step derivation
            1. Simplified96.5%

              \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right)}{\color{blue}{0.607771387771}} \]
            2. Taylor expanded in z around 0

              \[\leadsto \color{blue}{x + \left(\frac{1000000000000}{607771387771} \cdot \left(a \cdot \left(y \cdot z\right)\right) + \frac{1000000000000}{607771387771} \cdot \left(b \cdot y\right)\right)} \]
            3. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto \color{blue}{\left(\frac{1000000000000}{607771387771} \cdot \left(a \cdot \left(y \cdot z\right)\right) + \frac{1000000000000}{607771387771} \cdot \left(b \cdot y\right)\right) + x} \]
              2. *-commutativeN/A

                \[\leadsto \left(\frac{1000000000000}{607771387771} \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot a\right)} + \frac{1000000000000}{607771387771} \cdot \left(b \cdot y\right)\right) + x \]
              3. associate-*r*N/A

                \[\leadsto \left(\color{blue}{\left(\frac{1000000000000}{607771387771} \cdot \left(y \cdot z\right)\right) \cdot a} + \frac{1000000000000}{607771387771} \cdot \left(b \cdot y\right)\right) + x \]
              4. associate-*r*N/A

                \[\leadsto \left(\color{blue}{\left(\left(\frac{1000000000000}{607771387771} \cdot y\right) \cdot z\right)} \cdot a + \frac{1000000000000}{607771387771} \cdot \left(b \cdot y\right)\right) + x \]
              5. associate-*l*N/A

                \[\leadsto \left(\color{blue}{\left(\frac{1000000000000}{607771387771} \cdot y\right) \cdot \left(z \cdot a\right)} + \frac{1000000000000}{607771387771} \cdot \left(b \cdot y\right)\right) + x \]
              6. *-commutativeN/A

                \[\leadsto \left(\left(\frac{1000000000000}{607771387771} \cdot y\right) \cdot \color{blue}{\left(a \cdot z\right)} + \frac{1000000000000}{607771387771} \cdot \left(b \cdot y\right)\right) + x \]
              7. *-commutativeN/A

                \[\leadsto \left(\left(\frac{1000000000000}{607771387771} \cdot y\right) \cdot \left(a \cdot z\right) + \frac{1000000000000}{607771387771} \cdot \color{blue}{\left(y \cdot b\right)}\right) + x \]
              8. associate-*r*N/A

                \[\leadsto \left(\left(\frac{1000000000000}{607771387771} \cdot y\right) \cdot \left(a \cdot z\right) + \color{blue}{\left(\frac{1000000000000}{607771387771} \cdot y\right) \cdot b}\right) + x \]
              9. distribute-lft-inN/A

                \[\leadsto \color{blue}{\left(\frac{1000000000000}{607771387771} \cdot y\right) \cdot \left(a \cdot z + b\right)} + x \]
              10. +-commutativeN/A

                \[\leadsto \left(\frac{1000000000000}{607771387771} \cdot y\right) \cdot \color{blue}{\left(b + a \cdot z\right)} + x \]
              11. accelerator-lowering-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1000000000000}{607771387771} \cdot y, b + a \cdot z, x\right)} \]
              12. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(\color{blue}{y \cdot \frac{1000000000000}{607771387771}}, b + a \cdot z, x\right) \]
              13. *-lowering-*.f64N/A

                \[\leadsto \mathsf{fma}\left(\color{blue}{y \cdot \frac{1000000000000}{607771387771}}, b + a \cdot z, x\right) \]
              14. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(y \cdot \frac{1000000000000}{607771387771}, \color{blue}{a \cdot z + b}, x\right) \]
              15. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(y \cdot \frac{1000000000000}{607771387771}, \color{blue}{z \cdot a} + b, x\right) \]
              16. accelerator-lowering-fma.f6491.7

                \[\leadsto \mathsf{fma}\left(y \cdot 1.6453555072203998, \color{blue}{\mathsf{fma}\left(z, a, b\right)}, x\right) \]
            4. Simplified91.7%

              \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot 1.6453555072203998, \mathsf{fma}\left(z, a, b\right), x\right)} \]
          8. Recombined 2 regimes into one program.
          9. Add Preprocessing

          Alternative 11: 83.6% accurate, 3.3× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+19}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \mathbf{elif}\;z \leq 230000000000:\\ \;\;\;\;\mathsf{fma}\left(y, b \cdot 1.6453555072203998, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (if (<= z -8.5e+19)
             (fma y 3.13060547623 x)
             (if (<= z 230000000000.0)
               (fma y (* b 1.6453555072203998) x)
               (fma y 3.13060547623 x))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double tmp;
          	if (z <= -8.5e+19) {
          		tmp = fma(y, 3.13060547623, x);
          	} else if (z <= 230000000000.0) {
          		tmp = fma(y, (b * 1.6453555072203998), x);
          	} else {
          		tmp = fma(y, 3.13060547623, x);
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b)
          	tmp = 0.0
          	if (z <= -8.5e+19)
          		tmp = fma(y, 3.13060547623, x);
          	elseif (z <= 230000000000.0)
          		tmp = fma(y, Float64(b * 1.6453555072203998), x);
          	else
          		tmp = fma(y, 3.13060547623, x);
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -8.5e+19], N[(y * 3.13060547623 + x), $MachinePrecision], If[LessEqual[z, 230000000000.0], N[(y * N[(b * 1.6453555072203998), $MachinePrecision] + x), $MachinePrecision], N[(y * 3.13060547623 + x), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq -8.5 \cdot 10^{+19}:\\
          \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
          
          \mathbf{elif}\;z \leq 230000000000:\\
          \;\;\;\;\mathsf{fma}\left(y, b \cdot 1.6453555072203998, x\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -8.5e19 or 2.3e11 < z

            1. Initial program 13.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. Add Preprocessing
            3. Taylor expanded in z around inf

              \[\leadsto \color{blue}{x + \frac{313060547623}{100000000000} \cdot y} \]
            4. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto \color{blue}{\frac{313060547623}{100000000000} \cdot y + x} \]
              2. *-commutativeN/A

                \[\leadsto \color{blue}{y \cdot \frac{313060547623}{100000000000}} + x \]
              3. accelerator-lowering-fma.f6488.3

                \[\leadsto \color{blue}{\mathsf{fma}\left(y, 3.13060547623, x\right)} \]
            5. Simplified88.3%

              \[\leadsto \color{blue}{\mathsf{fma}\left(y, 3.13060547623, x\right)} \]

            if -8.5e19 < z < 2.3e11

            1. Initial program 99.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. Add Preprocessing
            3. Taylor expanded in z around 0

              \[\leadsto \color{blue}{x + \frac{1000000000000}{607771387771} \cdot \left(b \cdot y\right)} \]
            4. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto \color{blue}{\frac{1000000000000}{607771387771} \cdot \left(b \cdot y\right) + x} \]
              2. associate-*r*N/A

                \[\leadsto \color{blue}{\left(\frac{1000000000000}{607771387771} \cdot b\right) \cdot y} + x \]
              3. *-commutativeN/A

                \[\leadsto \color{blue}{y \cdot \left(\frac{1000000000000}{607771387771} \cdot b\right)} + x \]
              4. accelerator-lowering-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{1000000000000}{607771387771} \cdot b, x\right)} \]
              5. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(y, \color{blue}{b \cdot \frac{1000000000000}{607771387771}}, x\right) \]
              6. *-lowering-*.f6475.5

                \[\leadsto \mathsf{fma}\left(y, \color{blue}{b \cdot 1.6453555072203998}, x\right) \]
            5. Simplified75.5%

              \[\leadsto \color{blue}{\mathsf{fma}\left(y, b \cdot 1.6453555072203998, x\right)} \]
          3. Recombined 2 regimes into one program.
          4. Add Preprocessing

          Alternative 12: 52.0% accurate, 4.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.1 \cdot 10^{-31}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 9 \cdot 10^{-114}:\\ \;\;\;\;y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (if (<= x -2.1e-31) x (if (<= x 9e-114) (* y 3.13060547623) x)))
          double code(double x, double y, double z, double t, double a, double b) {
          	double tmp;
          	if (x <= -2.1e-31) {
          		tmp = x;
          	} else if (x <= 9e-114) {
          		tmp = y * 3.13060547623;
          	} else {
          		tmp = x;
          	}
          	return tmp;
          }
          
          real(8) function code(x, y, z, t, a, b)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8), intent (in) :: a
              real(8), intent (in) :: b
              real(8) :: tmp
              if (x <= (-2.1d-31)) then
                  tmp = x
              else if (x <= 9d-114) then
                  tmp = y * 3.13060547623d0
              else
                  tmp = x
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t, double a, double b) {
          	double tmp;
          	if (x <= -2.1e-31) {
          		tmp = x;
          	} else if (x <= 9e-114) {
          		tmp = y * 3.13060547623;
          	} else {
          		tmp = x;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b):
          	tmp = 0
          	if x <= -2.1e-31:
          		tmp = x
          	elif x <= 9e-114:
          		tmp = y * 3.13060547623
          	else:
          		tmp = x
          	return tmp
          
          function code(x, y, z, t, a, b)
          	tmp = 0.0
          	if (x <= -2.1e-31)
          		tmp = x;
          	elseif (x <= 9e-114)
          		tmp = Float64(y * 3.13060547623);
          	else
          		tmp = x;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a, b)
          	tmp = 0.0;
          	if (x <= -2.1e-31)
          		tmp = x;
          	elseif (x <= 9e-114)
          		tmp = y * 3.13060547623;
          	else
          		tmp = x;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.1e-31], x, If[LessEqual[x, 9e-114], N[(y * 3.13060547623), $MachinePrecision], x]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;x \leq -2.1 \cdot 10^{-31}:\\
          \;\;\;\;x\\
          
          \mathbf{elif}\;x \leq 9 \cdot 10^{-114}:\\
          \;\;\;\;y \cdot 3.13060547623\\
          
          \mathbf{else}:\\
          \;\;\;\;x\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if x < -2.09999999999999991e-31 or 8.99999999999999937e-114 < x

            1. Initial program 58.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. Add Preprocessing
            3. Taylor expanded in x around inf

              \[\leadsto \color{blue}{x} \]
            4. Step-by-step derivation
              1. Simplified59.8%

                \[\leadsto \color{blue}{x} \]

              if -2.09999999999999991e-31 < x < 8.99999999999999937e-114

              1. Initial program 51.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. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto x + \color{blue}{\frac{313060547623}{100000000000} \cdot y} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto x + \color{blue}{y \cdot \frac{313060547623}{100000000000}} \]
                2. *-lowering-*.f6450.8

                  \[\leadsto x + \color{blue}{y \cdot 3.13060547623} \]
              5. Simplified50.8%

                \[\leadsto x + \color{blue}{y \cdot 3.13060547623} \]
              6. Taylor expanded in x around 0

                \[\leadsto \color{blue}{\frac{313060547623}{100000000000} \cdot y} \]
              7. Step-by-step derivation
                1. *-lowering-*.f6442.1

                  \[\leadsto \color{blue}{3.13060547623 \cdot y} \]
              8. Simplified42.1%

                \[\leadsto \color{blue}{3.13060547623 \cdot y} \]
            5. Recombined 2 regimes into one program.
            6. Final simplification52.8%

              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.1 \cdot 10^{-31}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 9 \cdot 10^{-114}:\\ \;\;\;\;y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
            7. Add Preprocessing

            Alternative 13: 63.1% accurate, 11.3× speedup?

            \[\begin{array}{l} \\ \mathsf{fma}\left(y, 3.13060547623, x\right) \end{array} \]
            (FPCore (x y z t a b) :precision binary64 (fma y 3.13060547623 x))
            double code(double x, double y, double z, double t, double a, double b) {
            	return fma(y, 3.13060547623, x);
            }
            
            function code(x, y, z, t, a, b)
            	return fma(y, 3.13060547623, x)
            end
            
            code[x_, y_, z_, t_, a_, b_] := N[(y * 3.13060547623 + x), $MachinePrecision]
            
            \begin{array}{l}
            
            \\
            \mathsf{fma}\left(y, 3.13060547623, x\right)
            \end{array}
            
            Derivation
            1. Initial program 55.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. Add Preprocessing
            3. Taylor expanded in z around inf

              \[\leadsto \color{blue}{x + \frac{313060547623}{100000000000} \cdot y} \]
            4. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto \color{blue}{\frac{313060547623}{100000000000} \cdot y + x} \]
              2. *-commutativeN/A

                \[\leadsto \color{blue}{y \cdot \frac{313060547623}{100000000000}} + x \]
              3. accelerator-lowering-fma.f6461.7

                \[\leadsto \color{blue}{\mathsf{fma}\left(y, 3.13060547623, x\right)} \]
            5. Simplified61.7%

              \[\leadsto \color{blue}{\mathsf{fma}\left(y, 3.13060547623, x\right)} \]
            6. Add Preprocessing

            Alternative 14: 45.8% accurate, 79.0× speedup?

            \[\begin{array}{l} \\ x \end{array} \]
            (FPCore (x y z t a b) :precision binary64 x)
            double code(double x, double y, double z, double t, double a, double b) {
            	return x;
            }
            
            real(8) function code(x, y, z, t, a, b)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8), intent (in) :: a
                real(8), intent (in) :: b
                code = x
            end function
            
            public static double code(double x, double y, double z, double t, double a, double b) {
            	return x;
            }
            
            def code(x, y, z, t, a, b):
            	return x
            
            function code(x, y, z, t, a, b)
            	return x
            end
            
            function tmp = code(x, y, z, t, a, b)
            	tmp = x;
            end
            
            code[x_, y_, z_, t_, a_, b_] := x
            
            \begin{array}{l}
            
            \\
            x
            \end{array}
            
            Derivation
            1. Initial program 55.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. Add Preprocessing
            3. Taylor expanded in x around inf

              \[\leadsto \color{blue}{x} \]
            4. Step-by-step derivation
              1. Simplified42.1%

                \[\leadsto \color{blue}{x} \]
              2. Add Preprocessing

              Developer Target 1: 98.5% accurate, 0.8× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(\left(3.13060547623 - \frac{36.527041698806414}{z}\right) + \frac{t}{z \cdot z}\right) \cdot \frac{y}{1}\\ \mathbf{if}\;z < -6.499344996252632 \cdot 10^{+53}:\\ \;\;\;\;t\_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}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
              (FPCore (x y z t a b)
               :precision binary64
               (let* ((t_1
                       (+
                        x
                        (*
                         (+ (- 3.13060547623 (/ 36.527041698806414 z)) (/ t (* z z)))
                         (/ y 1.0)))))
                 (if (< z -6.499344996252632e+53)
                   t_1
                   (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))))
                     t_1))))
              double code(double x, double y, double z, double t, double a, double b) {
              	double t_1 = x + (((3.13060547623 - (36.527041698806414 / z)) + (t / (z * z))) * (y / 1.0));
              	double tmp;
              	if (z < -6.499344996252632e+53) {
              		tmp = t_1;
              	} else if (z < 7.066965436914287e+59) {
              		tmp = 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)));
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              real(8) function code(x, y, z, t, a, b)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  real(8), intent (in) :: a
                  real(8), intent (in) :: b
                  real(8) :: t_1
                  real(8) :: tmp
                  t_1 = x + (((3.13060547623d0 - (36.527041698806414d0 / z)) + (t / (z * z))) * (y / 1.0d0))
                  if (z < (-6.499344996252632d+53)) then
                      tmp = t_1
                  else if (z < 7.066965436914287d+59) then
                      tmp = x + (y / ((((((((z + 15.234687407d0) * z) + 31.4690115749d0) * z) + 11.9400905721d0) * z) + 0.607771387771d0) / ((((((((z * 3.13060547623d0) + 11.1667541262d0) * z) + t) * z) + a) * z) + b)))
                  else
                      tmp = t_1
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t, double a, double b) {
              	double t_1 = x + (((3.13060547623 - (36.527041698806414 / z)) + (t / (z * z))) * (y / 1.0));
              	double tmp;
              	if (z < -6.499344996252632e+53) {
              		tmp = t_1;
              	} else if (z < 7.066965436914287e+59) {
              		tmp = 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)));
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a, b):
              	t_1 = x + (((3.13060547623 - (36.527041698806414 / z)) + (t / (z * z))) * (y / 1.0))
              	tmp = 0
              	if z < -6.499344996252632e+53:
              		tmp = t_1
              	elif z < 7.066965436914287e+59:
              		tmp = 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)))
              	else:
              		tmp = t_1
              	return tmp
              
              function code(x, y, z, t, a, b)
              	t_1 = Float64(x + Float64(Float64(Float64(3.13060547623 - Float64(36.527041698806414 / z)) + Float64(t / Float64(z * z))) * Float64(y / 1.0)))
              	tmp = 0.0
              	if (z < -6.499344996252632e+53)
              		tmp = t_1;
              	elseif (z < 7.066965436914287e+59)
              		tmp = Float64(x + Float64(y / Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b))));
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a, b)
              	t_1 = x + (((3.13060547623 - (36.527041698806414 / z)) + (t / (z * z))) * (y / 1.0));
              	tmp = 0.0;
              	if (z < -6.499344996252632e+53)
              		tmp = t_1;
              	elseif (z < 7.066965436914287e+59)
              		tmp = 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)));
              	else
              		tmp = t_1;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(N[(3.13060547623 - N[(36.527041698806414 / z), $MachinePrecision]), $MachinePrecision] + N[(t / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -6.499344996252632e+53], t$95$1, If[Less[z, 7.066965436914287e+59], N[(x + N[(y / N[(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] / 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]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := x + \left(\left(3.13060547623 - \frac{36.527041698806414}{z}\right) + \frac{t}{z \cdot z}\right) \cdot \frac{y}{1}\\
              \mathbf{if}\;z < -6.499344996252632 \cdot 10^{+53}:\\
              \;\;\;\;t\_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}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              

              Reproduce

              ?
              herbie shell --seed 2024204 
              (FPCore (x y z t a b)
                :name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, D"
                :precision binary64
              
                :alt
                (! :herbie-platform default (if (< z -649934499625263200000000000000000000000000000000000000) (+ x (* (+ (- 313060547623/100000000000 (/ 18263520849403207/500000000000000 z)) (/ t (* z z))) (/ y 1))) (if (< z 706696543691428700000000000000000000000000000000000000000000) (+ x (/ y (/ (+ (* (+ (* (+ (* (+ z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000) (+ (* (+ (* (+ (* (+ (* z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)))) (+ x (* (+ (- 313060547623/100000000000 (/ 18263520849403207/500000000000000 z)) (/ t (* z z))) (/ y 1))))))
              
                (+ 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))))