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

Percentage Accurate: 58.7% → 97.0%
Time: 17.4s
Alternatives: 15
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 15 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.7% 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.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} \leq \infty:\\ \;\;\;\;x + \frac{y}{\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}{\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)}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{0.31942702700572795 + \frac{\frac{\mathsf{fma}\left(\frac{t}{z}, -1.1905002162048226, \mathsf{fma}\left(-0.10203362558171805, \frac{a}{z}, \mathsf{fma}\left(3.5669630718360112, \frac{\mathsf{fma}\left(t, 0.10203362558171805, 3.241970391368047\right)}{z}, \frac{3.8139876336250245}{z}\right)\right)\right) - \mathsf{fma}\left(t, 0.10203362558171805, 3.241970391368047\right)}{z} - -3.7269864963038164}{z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<=
      (/
       (*
        y
        (+
         (* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
         b))
       (+
        (*
         z
         (+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
        0.607771387771))
      INFINITY)
   (+
    x
    (/
     y
     (/
      (fma
       z
       (fma z (fma z (+ z 15.234687407) 31.4690115749) 11.9400905721)
       0.607771387771)
      (fma z (fma z (fma z (fma z 3.13060547623 11.1667541262) t) a) b))))
   (+
    x
    (/
     y
     (+
      0.31942702700572795
      (/
       (-
        (/
         (-
          (fma
           (/ t z)
           -1.1905002162048226
           (fma
            -0.10203362558171805
            (/ a z)
            (fma
             3.5669630718360112
             (/ (fma t 0.10203362558171805 3.241970391368047) z)
             (/ 3.8139876336250245 z))))
          (fma t 0.10203362558171805 3.241970391368047))
         z)
        -3.7269864963038164)
       z))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) <= ((double) INFINITY)) {
		tmp = x + (y / (fma(z, fma(z, fma(z, (z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771) / fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b)));
	} else {
		tmp = x + (y / (0.31942702700572795 + ((((fma((t / z), -1.1905002162048226, fma(-0.10203362558171805, (a / z), fma(3.5669630718360112, (fma(t, 0.10203362558171805, 3.241970391368047) / z), (3.8139876336250245 / z)))) - fma(t, 0.10203362558171805, 3.241970391368047)) / z) - -3.7269864963038164) / z)));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) <= Inf)
		tmp = Float64(x + Float64(y / Float64(fma(z, fma(z, fma(z, Float64(z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771) / fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b))));
	else
		tmp = Float64(x + Float64(y / Float64(0.31942702700572795 + Float64(Float64(Float64(Float64(fma(Float64(t / z), -1.1905002162048226, fma(-0.10203362558171805, Float64(a / z), fma(3.5669630718360112, Float64(fma(t, 0.10203362558171805, 3.241970391368047) / z), Float64(3.8139876336250245 / z)))) - fma(t, 0.10203362558171805, 3.241970391368047)) / z) - -3.7269864963038164) / z))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(y * N[(N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(N[(z * N[(N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision], Infinity], N[(x + N[(y / N[(N[(z * N[(z * N[(z * N[(z + 15.234687407), $MachinePrecision] + 31.4690115749), $MachinePrecision] + 11.9400905721), $MachinePrecision] + 0.607771387771), $MachinePrecision] / N[(z * N[(z * N[(z * N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(0.31942702700572795 + N[(N[(N[(N[(N[(N[(t / z), $MachinePrecision] * -1.1905002162048226 + N[(-0.10203362558171805 * N[(a / z), $MachinePrecision] + N[(3.5669630718360112 * N[(N[(t * 0.10203362558171805 + 3.241970391368047), $MachinePrecision] / z), $MachinePrecision] + N[(3.8139876336250245 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * 0.10203362558171805 + 3.241970391368047), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - -3.7269864963038164), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} \leq \infty:\\
\;\;\;\;x + \frac{y}{\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}{\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)}}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y}{0.31942702700572795 + \frac{\frac{\mathsf{fma}\left(\frac{t}{z}, -1.1905002162048226, \mathsf{fma}\left(-0.10203362558171805, \frac{a}{z}, \mathsf{fma}\left(3.5669630718360112, \frac{\mathsf{fma}\left(t, 0.10203362558171805, 3.241970391368047\right)}{z}, \frac{3.8139876336250245}{z}\right)\right)\right) - \mathsf{fma}\left(t, 0.10203362558171805, 3.241970391368047\right)}{z} - -3.7269864963038164}{z}}\\


\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))) < +inf.0

    1. Initial program 92.5%

      \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto x + \color{blue}{y \cdot \frac{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}{\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. clear-numN/A

        \[\leadsto x + y \cdot \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}}{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}} \]
      3. un-div-invN/A

        \[\leadsto x + \color{blue}{\frac{y}{\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}}{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto x + \color{blue}{\frac{y}{\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}}{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto x + \frac{y}{\color{blue}{\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}}{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}} \]
    4. Applied egg-rr96.6%

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

    if +inf.0 < (/.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 0.0%

      \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto x + \color{blue}{y \cdot \frac{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}{\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. clear-numN/A

        \[\leadsto x + y \cdot \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}}{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}} \]
      3. un-div-invN/A

        \[\leadsto x + \color{blue}{\frac{y}{\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}}{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto x + \color{blue}{\frac{y}{\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}}{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto x + \frac{y}{\color{blue}{\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}}{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}} \]
    4. Applied egg-rr0.0%

      \[\leadsto x + \color{blue}{\frac{y}{\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}{\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)}}} \]
    5. Taylor expanded in z around -inf

      \[\leadsto x + \frac{y}{\color{blue}{\frac{100000000000}{313060547623} + -1 \cdot \frac{-1 \cdot \frac{\left(\frac{-36527041698806418835610000000000000}{30682095812842786715169336002493367} \cdot \frac{t}{z} + \left(\frac{-10000000000000000000000}{98006906478012650950129} \cdot \frac{a}{z} + \left(\frac{1116675412620}{313060547623} \cdot \frac{\frac{99470446170353844637769068629165790}{30682095812842786715169336002493367} + \frac{10000000000000000000000}{98006906478012650950129} \cdot t}{z} + \frac{1194009057210}{313060547623} \cdot \frac{1}{z}\right)\right)\right) - \left(\frac{99470446170353844637769068629165790}{30682095812842786715169336002493367} + \frac{10000000000000000000000}{98006906478012650950129} \cdot t\right)}{z} - \frac{365270416988064188356100}{98006906478012650950129}}{z}}} \]
    6. Simplified99.9%

      \[\leadsto x + \frac{y}{\color{blue}{0.31942702700572795 - \frac{\frac{\mathsf{fma}\left(\frac{t}{z}, -1.1905002162048226, \mathsf{fma}\left(-0.10203362558171805, \frac{a}{z}, \mathsf{fma}\left(3.5669630718360112, \frac{\mathsf{fma}\left(t, 0.10203362558171805, 3.241970391368047\right)}{z}, \frac{3.8139876336250245}{z}\right)\right)\right) - \mathsf{fma}\left(t, 0.10203362558171805, 3.241970391368047\right)}{-z} + -3.7269864963038164}{z}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification97.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} \leq \infty:\\ \;\;\;\;x + \frac{y}{\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}{\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)}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{0.31942702700572795 + \frac{\frac{\mathsf{fma}\left(\frac{t}{z}, -1.1905002162048226, \mathsf{fma}\left(-0.10203362558171805, \frac{a}{z}, \mathsf{fma}\left(3.5669630718360112, \frac{\mathsf{fma}\left(t, 0.10203362558171805, 3.241970391368047\right)}{z}, \frac{3.8139876336250245}{z}\right)\right)\right) - \mathsf{fma}\left(t, 0.10203362558171805, 3.241970391368047\right)}{z} - -3.7269864963038164}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 97.9% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} \leq \infty:\\
\;\;\;\;x + \frac{y}{\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}{\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)}}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623 - \left(\frac{36.52704169880642}{z} - \frac{t + 457.9610022158428}{z \cdot z}\right), 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))) < +inf.0

    1. Initial program 92.5%

      \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto x + \color{blue}{y \cdot \frac{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}{\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. clear-numN/A

        \[\leadsto x + y \cdot \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}}{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}} \]
      3. un-div-invN/A

        \[\leadsto x + \color{blue}{\frac{y}{\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}}{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto x + \color{blue}{\frac{y}{\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}}{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto x + \frac{y}{\color{blue}{\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}}{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}} \]
    4. Applied egg-rr96.6%

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

    if +inf.0 < (/.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 0.0%

      \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    2. 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. Simplified87.2%

      \[\leadsto \color{blue}{\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}} \]
    5. Taylor expanded in y around 0

      \[\leadsto \color{blue}{x + y \cdot \left(\frac{313060547623}{100000000000} - \left(-1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}} + \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right)\right)} \]
    6. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{y \cdot \left(\frac{313060547623}{100000000000} - \left(-1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}} + \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right)\right) + x} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(-1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}} + \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right), x\right)} \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{313060547623}{100000000000} - \left(-1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}} + \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right)}, x\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \color{blue}{\left(\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z} + -1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right)}, x\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right)\right)}\right), x\right) \]
      6. unsub-negN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \color{blue}{\left(\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right)}, x\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \color{blue}{\left(\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right)}, x\right) \]
      8. associate-*r/N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\color{blue}{\frac{\frac{3652704169880641883561}{100000000000000000000} \cdot 1}{z}} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right), x\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{\color{blue}{\frac{3652704169880641883561}{100000000000000000000}}}{z} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right), x\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\color{blue}{\frac{\frac{3652704169880641883561}{100000000000000000000}}{z}} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right), x\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{\frac{3652704169880641883561}{100000000000000000000}}{z} - \color{blue}{\frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}}\right), x\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{\frac{3652704169880641883561}{100000000000000000000}}{z} - \frac{\color{blue}{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}}{{z}^{2}}\right), x\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{\frac{3652704169880641883561}{100000000000000000000}}{z} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{\color{blue}{z \cdot z}}\right), x\right) \]
      14. *-lowering-*.f6499.8

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} \leq \infty:\\ \;\;\;\;x + \frac{y}{\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}{\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)}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623 - \left(\frac{36.52704169880642}{z} - \frac{t + 457.9610022158428}{z \cdot z}\right), x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 97.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} \leq \infty:\\
\;\;\;\;\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{else}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623 - \left(\frac{36.52704169880642}{z} - \frac{t + 457.9610022158428}{z \cdot z}\right), 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))) < +inf.0

    1. Initial program 92.5%

      \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    2. 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-rr96.0%

      \[\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 +inf.0 < (/.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 0.0%

      \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    2. 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. Simplified87.2%

      \[\leadsto \color{blue}{\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}} \]
    5. Taylor expanded in y around 0

      \[\leadsto \color{blue}{x + y \cdot \left(\frac{313060547623}{100000000000} - \left(-1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}} + \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right)\right)} \]
    6. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{y \cdot \left(\frac{313060547623}{100000000000} - \left(-1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}} + \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right)\right) + x} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(-1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}} + \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right), x\right)} \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{313060547623}{100000000000} - \left(-1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}} + \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right)}, x\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \color{blue}{\left(\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z} + -1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right)}, x\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right)\right)}\right), x\right) \]
      6. unsub-negN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \color{blue}{\left(\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right)}, x\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \color{blue}{\left(\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right)}, x\right) \]
      8. associate-*r/N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\color{blue}{\frac{\frac{3652704169880641883561}{100000000000000000000} \cdot 1}{z}} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right), x\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{\color{blue}{\frac{3652704169880641883561}{100000000000000000000}}}{z} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right), x\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\color{blue}{\frac{\frac{3652704169880641883561}{100000000000000000000}}{z}} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right), x\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{\frac{3652704169880641883561}{100000000000000000000}}{z} - \color{blue}{\frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}}\right), x\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{\frac{3652704169880641883561}{100000000000000000000}}{z} - \frac{\color{blue}{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}}{{z}^{2}}\right), x\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{\frac{3652704169880641883561}{100000000000000000000}}{z} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{\color{blue}{z \cdot z}}\right), x\right) \]
      14. *-lowering-*.f6499.8

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} \leq \infty:\\ \;\;\;\;\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{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623 - \left(\frac{36.52704169880642}{z} - \frac{t + 457.9610022158428}{z \cdot z}\right), x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 97.2% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, 3.13060547623 - \left(\frac{36.52704169880642}{z} - \frac{t + 457.9610022158428}{z \cdot z}\right), x\right)\\ \mathbf{if}\;z \leq -8.8 \cdot 10^{+24}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 32500000000:\\ \;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1
         (fma
          y
          (-
           3.13060547623
           (- (/ 36.52704169880642 z) (/ (+ t 457.9610022158428) (* z z))))
          x)))
   (if (<= z -8.8e+24)
     t_1
     (if (<= z 32500000000.0)
       (+
        x
        (/
         (* y (fma z (fma z t a) b))
         (+
          (*
           z
           (+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
          0.607771387771)))
       t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = fma(y, (3.13060547623 - ((36.52704169880642 / z) - ((t + 457.9610022158428) / (z * z)))), x);
	double tmp;
	if (z <= -8.8e+24) {
		tmp = t_1;
	} else if (z <= 32500000000.0) {
		tmp = x + ((y * fma(z, fma(z, t, a), b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = fma(y, Float64(3.13060547623 - Float64(Float64(36.52704169880642 / z) - Float64(Float64(t + 457.9610022158428) / Float64(z * z)))), x)
	tmp = 0.0
	if (z <= -8.8e+24)
		tmp = t_1;
	elseif (z <= 32500000000.0)
		tmp = Float64(x + Float64(Float64(y * fma(z, fma(z, t, a), b)) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(3.13060547623 - N[(N[(36.52704169880642 / z), $MachinePrecision] - N[(N[(t + 457.9610022158428), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -8.8e+24], t$95$1, If[LessEqual[z, 32500000000.0], N[(x + N[(N[(y * N[(z * N[(z * t + a), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(N[(z * N[(N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, 3.13060547623 - \left(\frac{36.52704169880642}{z} - \frac{t + 457.9610022158428}{z \cdot z}\right), x\right)\\
\mathbf{if}\;z \leq -8.8 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 32500000000:\\
\;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.80000000000000007e24 or 3.25e10 < z

    1. Initial program 11.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 + \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. Simplified86.3%

      \[\leadsto \color{blue}{\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}} \]
    5. Taylor expanded in y around 0

      \[\leadsto \color{blue}{x + y \cdot \left(\frac{313060547623}{100000000000} - \left(-1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}} + \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right)\right)} \]
    6. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{y \cdot \left(\frac{313060547623}{100000000000} - \left(-1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}} + \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right)\right) + x} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(-1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}} + \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right), x\right)} \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{313060547623}{100000000000} - \left(-1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}} + \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right)}, x\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \color{blue}{\left(\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z} + -1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right)}, x\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right)\right)}\right), x\right) \]
      6. unsub-negN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \color{blue}{\left(\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right)}, x\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \color{blue}{\left(\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right)}, x\right) \]
      8. associate-*r/N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\color{blue}{\frac{\frac{3652704169880641883561}{100000000000000000000} \cdot 1}{z}} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right), x\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{\color{blue}{\frac{3652704169880641883561}{100000000000000000000}}}{z} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right), x\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\color{blue}{\frac{\frac{3652704169880641883561}{100000000000000000000}}{z}} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right), x\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{\frac{3652704169880641883561}{100000000000000000000}}{z} - \color{blue}{\frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}}\right), x\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{\frac{3652704169880641883561}{100000000000000000000}}{z} - \frac{\color{blue}{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}}{{z}^{2}}\right), x\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{\frac{3652704169880641883561}{100000000000000000000}}{z} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{\color{blue}{z \cdot z}}\right), x\right) \]
      14. *-lowering-*.f6496.3

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

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

    if -8.80000000000000007e24 < z < 3.25e10

    1. Initial program 99.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 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.3

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

      \[\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} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification97.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.8 \cdot 10^{+24}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623 - \left(\frac{36.52704169880642}{z} - \frac{t + 457.9610022158428}{z \cdot z}\right), x\right)\\ \mathbf{elif}\;z \leq 32500000000:\\ \;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, t, a\right), b\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623 - \left(\frac{36.52704169880642}{z} - \frac{t + 457.9610022158428}{z \cdot z}\right), x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 96.0% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, 3.13060547623 - \left(\frac{36.52704169880642}{z} - \frac{t + 457.9610022158428}{z \cdot z}\right), x\right)\\
\mathbf{if}\;z \leq -3.9 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4000000:\\
\;\;\;\;x + \frac{y}{\frac{0.607771387771}{\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)}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.9e23 or 4e6 < z

    1. Initial program 11.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 + \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. Simplified86.3%

      \[\leadsto \color{blue}{\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}} \]
    5. Taylor expanded in y around 0

      \[\leadsto \color{blue}{x + y \cdot \left(\frac{313060547623}{100000000000} - \left(-1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}} + \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right)\right)} \]
    6. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{y \cdot \left(\frac{313060547623}{100000000000} - \left(-1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}} + \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right)\right) + x} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(-1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}} + \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right), x\right)} \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{313060547623}{100000000000} - \left(-1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}} + \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right)}, x\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \color{blue}{\left(\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z} + -1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right)}, x\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right)\right)}\right), x\right) \]
      6. unsub-negN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \color{blue}{\left(\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right)}, x\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \color{blue}{\left(\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right)}, x\right) \]
      8. associate-*r/N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\color{blue}{\frac{\frac{3652704169880641883561}{100000000000000000000} \cdot 1}{z}} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right), x\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{\color{blue}{\frac{3652704169880641883561}{100000000000000000000}}}{z} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right), x\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\color{blue}{\frac{\frac{3652704169880641883561}{100000000000000000000}}{z}} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right), x\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{\frac{3652704169880641883561}{100000000000000000000}}{z} - \color{blue}{\frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}}\right), x\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{\frac{3652704169880641883561}{100000000000000000000}}{z} - \frac{\color{blue}{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}}{{z}^{2}}\right), x\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{\frac{3652704169880641883561}{100000000000000000000}}{z} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{\color{blue}{z \cdot z}}\right), x\right) \]
      14. *-lowering-*.f6496.3

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

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

    if -3.9e23 < z < 4e6

    1. Initial program 99.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. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto x + \color{blue}{y \cdot \frac{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}{\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. clear-numN/A

        \[\leadsto x + y \cdot \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}}{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}} \]
      3. un-div-invN/A

        \[\leadsto x + \color{blue}{\frac{y}{\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}}{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto x + \color{blue}{\frac{y}{\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}}{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto x + \frac{y}{\color{blue}{\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}}{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}} \]
    4. Applied egg-rr99.6%

      \[\leadsto x + \color{blue}{\frac{y}{\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}{\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)}}} \]
    5. Taylor expanded in z around 0

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

        \[\leadsto x + \frac{y}{\frac{\color{blue}{0.607771387771}}{\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)}} \]
    7. Recombined 2 regimes into one program.
    8. Final simplification96.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.9 \cdot 10^{+23}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623 - \left(\frac{36.52704169880642}{z} - \frac{t + 457.9610022158428}{z \cdot z}\right), x\right)\\ \mathbf{elif}\;z \leq 4000000:\\ \;\;\;\;x + \frac{y}{\frac{0.607771387771}{\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)}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623 - \left(\frac{36.52704169880642}{z} - \frac{t + 457.9610022158428}{z \cdot z}\right), x\right)\\ \end{array} \]
    9. Add Preprocessing

    Alternative 6: 91.2% accurate, 1.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+24}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \mathbf{elif}\;z \leq 118:\\ \;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(z, a, b\right)}{0.607771387771}\\ \mathbf{elif}\;z \leq 10^{+71}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right) + \frac{\frac{y \cdot t}{z}}{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.45e+24)
       (fma y 3.13060547623 x)
       (if (<= z 118.0)
         (+ x (/ (* y (fma z a b)) 0.607771387771))
         (if (<= z 1e+71)
           (+ (fma y 3.13060547623 x) (/ (/ (* y t) z) 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.45e+24) {
    		tmp = fma(y, 3.13060547623, x);
    	} else if (z <= 118.0) {
    		tmp = x + ((y * fma(z, a, b)) / 0.607771387771);
    	} else if (z <= 1e+71) {
    		tmp = fma(y, 3.13060547623, x) + (((y * t) / z) / z);
    	} else {
    		tmp = fma(y, 3.13060547623, x);
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if (z <= -1.45e+24)
    		tmp = fma(y, 3.13060547623, x);
    	elseif (z <= 118.0)
    		tmp = Float64(x + Float64(Float64(y * fma(z, a, b)) / 0.607771387771));
    	elseif (z <= 1e+71)
    		tmp = Float64(fma(y, 3.13060547623, x) + Float64(Float64(Float64(y * t) / z) / z));
    	else
    		tmp = fma(y, 3.13060547623, x);
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.45e+24], N[(y * 3.13060547623 + x), $MachinePrecision], If[LessEqual[z, 118.0], N[(x + N[(N[(y * N[(z * a + b), $MachinePrecision]), $MachinePrecision] / 0.607771387771), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e+71], N[(N[(y * 3.13060547623 + x), $MachinePrecision] + N[(N[(N[(y * t), $MachinePrecision] / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(y * 3.13060547623 + x), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;z \leq -1.45 \cdot 10^{+24}:\\
    \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
    
    \mathbf{elif}\;z \leq 118:\\
    \;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(z, a, b\right)}{0.607771387771}\\
    
    \mathbf{elif}\;z \leq 10^{+71}:\\
    \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right) + \frac{\frac{y \cdot t}{z}}{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.4499999999999999e24 or 1e71 < 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.f6497.6

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

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

      if -1.4499999999999999e24 < z < 118

      1. Initial program 99.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 0

        \[\leadsto x + \frac{y \cdot \color{blue}{\left(b + a \cdot z\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(a \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}} \]
        2. *-commutativeN/A

          \[\leadsto x + \frac{y \cdot \left(\color{blue}{z \cdot 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}} \]
        3. accelerator-lowering-fma.f6493.2

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

        \[\leadsto x + \frac{y \cdot \color{blue}{\mathsf{fma}\left(z, a, 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, a, b\right)}{\color{blue}{\frac{607771387771}{1000000000000}}} \]
      7. Step-by-step derivation
        1. Simplified92.1%

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

        if 118 < z < 1e71

        1. Initial program 49.1%

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

          \[\leadsto \color{blue}{\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}} \]
        5. Taylor expanded in t around inf

          \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000}, x\right) - \frac{\color{blue}{-1 \cdot \frac{t \cdot y}{z}}}{z} \]
        6. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000}, x\right) - \frac{\color{blue}{\mathsf{neg}\left(\frac{t \cdot y}{z}\right)}}{z} \]
          2. distribute-neg-frac2N/A

            \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000}, x\right) - \frac{\color{blue}{\frac{t \cdot y}{\mathsf{neg}\left(z\right)}}}{z} \]
          3. neg-mul-1N/A

            \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000}, x\right) - \frac{\frac{t \cdot y}{\color{blue}{-1 \cdot z}}}{z} \]
          4. /-lowering-/.f64N/A

            \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000}, x\right) - \frac{\color{blue}{\frac{t \cdot y}{-1 \cdot z}}}{z} \]
          5. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000}, x\right) - \frac{\frac{\color{blue}{y \cdot t}}{-1 \cdot z}}{z} \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000}, x\right) - \frac{\frac{\color{blue}{y \cdot t}}{-1 \cdot z}}{z} \]
          7. neg-mul-1N/A

            \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000}, x\right) - \frac{\frac{y \cdot t}{\color{blue}{\mathsf{neg}\left(z\right)}}}{z} \]
          8. neg-lowering-neg.f6465.5

            \[\leadsto \mathsf{fma}\left(y, 3.13060547623, x\right) - \frac{\frac{y \cdot t}{\color{blue}{-z}}}{z} \]
        7. Simplified65.5%

          \[\leadsto \mathsf{fma}\left(y, 3.13060547623, x\right) - \frac{\color{blue}{\frac{y \cdot t}{-z}}}{z} \]
      8. Recombined 3 regimes into one program.
      9. Final simplification93.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+24}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \mathbf{elif}\;z \leq 118:\\ \;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(z, a, b\right)}{0.607771387771}\\ \mathbf{elif}\;z \leq 10^{+71}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right) + \frac{\frac{y \cdot t}{z}}{z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \end{array} \]
      10. Add Preprocessing

      Alternative 7: 93.2% accurate, 1.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, 3.13060547623 - \left(\frac{36.52704169880642}{z} - \frac{t + 457.9610022158428}{z \cdot z}\right), x\right)\\ \mathbf{if}\;z \leq -4 \cdot 10^{+23}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 118:\\ \;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(z, a, b\right)}{0.607771387771}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1
               (fma
                y
                (-
                 3.13060547623
                 (- (/ 36.52704169880642 z) (/ (+ t 457.9610022158428) (* z z))))
                x)))
         (if (<= z -4e+23)
           t_1
           (if (<= z 118.0) (+ x (/ (* y (fma z a b)) 0.607771387771)) t_1))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = fma(y, (3.13060547623 - ((36.52704169880642 / z) - ((t + 457.9610022158428) / (z * z)))), x);
      	double tmp;
      	if (z <= -4e+23) {
      		tmp = t_1;
      	} else if (z <= 118.0) {
      		tmp = x + ((y * fma(z, a, b)) / 0.607771387771);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	t_1 = fma(y, Float64(3.13060547623 - Float64(Float64(36.52704169880642 / z) - Float64(Float64(t + 457.9610022158428) / Float64(z * z)))), x)
      	tmp = 0.0
      	if (z <= -4e+23)
      		tmp = t_1;
      	elseif (z <= 118.0)
      		tmp = Float64(x + Float64(Float64(y * fma(z, a, b)) / 0.607771387771));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(3.13060547623 - N[(N[(36.52704169880642 / z), $MachinePrecision] - N[(N[(t + 457.9610022158428), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -4e+23], t$95$1, If[LessEqual[z, 118.0], N[(x + N[(N[(y * N[(z * a + b), $MachinePrecision]), $MachinePrecision] / 0.607771387771), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \mathsf{fma}\left(y, 3.13060547623 - \left(\frac{36.52704169880642}{z} - \frac{t + 457.9610022158428}{z \cdot z}\right), x\right)\\
      \mathbf{if}\;z \leq -4 \cdot 10^{+23}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 118:\\
      \;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(z, a, b\right)}{0.607771387771}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -3.9999999999999997e23 or 118 < z

        1. Initial program 13.0%

          \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
        2. 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. Simplified85.8%

          \[\leadsto \color{blue}{\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}} \]
        5. Taylor expanded in y around 0

          \[\leadsto \color{blue}{x + y \cdot \left(\frac{313060547623}{100000000000} - \left(-1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}} + \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right)\right)} \]
        6. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \color{blue}{y \cdot \left(\frac{313060547623}{100000000000} - \left(-1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}} + \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right)\right) + x} \]
          2. accelerator-lowering-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(-1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}} + \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right), x\right)} \]
          3. --lowering--.f64N/A

            \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{313060547623}{100000000000} - \left(-1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}} + \frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z}\right)}, x\right) \]
          4. +-commutativeN/A

            \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \color{blue}{\left(\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z} + -1 \cdot \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right)}, x\right) \]
          5. mul-1-negN/A

            \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right)\right)}\right), x\right) \]
          6. unsub-negN/A

            \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \color{blue}{\left(\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right)}, x\right) \]
          7. --lowering--.f64N/A

            \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \color{blue}{\left(\frac{3652704169880641883561}{100000000000000000000} \cdot \frac{1}{z} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right)}, x\right) \]
          8. associate-*r/N/A

            \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\color{blue}{\frac{\frac{3652704169880641883561}{100000000000000000000} \cdot 1}{z}} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right), x\right) \]
          9. metadata-evalN/A

            \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{\color{blue}{\frac{3652704169880641883561}{100000000000000000000}}}{z} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right), x\right) \]
          10. /-lowering-/.f64N/A

            \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\color{blue}{\frac{\frac{3652704169880641883561}{100000000000000000000}}{z}} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}\right), x\right) \]
          11. /-lowering-/.f64N/A

            \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{\frac{3652704169880641883561}{100000000000000000000}}{z} - \color{blue}{\frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{{z}^{2}}}\right), x\right) \]
          12. +-lowering-+.f64N/A

            \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{\frac{3652704169880641883561}{100000000000000000000}}{z} - \frac{\color{blue}{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}}{{z}^{2}}\right), x\right) \]
          13. unpow2N/A

            \[\leadsto \mathsf{fma}\left(y, \frac{313060547623}{100000000000} - \left(\frac{\frac{3652704169880641883561}{100000000000000000000}}{z} - \frac{\frac{45796100221584283915100827016327}{100000000000000000000000000000} + t}{\color{blue}{z \cdot z}}\right), x\right) \]
          14. *-lowering-*.f6495.6

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

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

        if -3.9999999999999997e23 < z < 118

        1. Initial program 99.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 0

          \[\leadsto x + \frac{y \cdot \color{blue}{\left(b + a \cdot z\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(a \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}} \]
          2. *-commutativeN/A

            \[\leadsto x + \frac{y \cdot \left(\color{blue}{z \cdot 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}} \]
          3. accelerator-lowering-fma.f6493.2

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

          \[\leadsto x + \frac{y \cdot \color{blue}{\mathsf{fma}\left(z, a, 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, a, b\right)}{\color{blue}{\frac{607771387771}{1000000000000}}} \]
        7. Step-by-step derivation
          1. Simplified92.1%

            \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(z, a, b\right)}{\color{blue}{0.607771387771}} \]
        8. Recombined 2 regimes into one program.
        9. Final simplification93.8%

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+23}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623 - \left(\frac{36.52704169880642}{z} - \frac{t + 457.9610022158428}{z \cdot z}\right), x\right)\\ \mathbf{elif}\;z \leq 118:\\ \;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(z, a, b\right)}{0.607771387771}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623 - \left(\frac{36.52704169880642}{z} - \frac{t + 457.9610022158428}{z \cdot z}\right), x\right)\\ \end{array} \]
        10. Add Preprocessing

        Alternative 8: 90.3% accurate, 2.1× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+24}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+36}:\\ \;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(z, a, b\right)}{0.607771387771}\\ \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 -3e+24)
           (fma y 3.13060547623 x)
           (if (<= z 2.8e+36)
             (+ x (/ (* y (fma z a b)) 0.607771387771))
             (fma y 3.13060547623 x))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double tmp;
        	if (z <= -3e+24) {
        		tmp = fma(y, 3.13060547623, x);
        	} else if (z <= 2.8e+36) {
        		tmp = x + ((y * fma(z, a, b)) / 0.607771387771);
        	} else {
        		tmp = fma(y, 3.13060547623, x);
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	tmp = 0.0
        	if (z <= -3e+24)
        		tmp = fma(y, 3.13060547623, x);
        	elseif (z <= 2.8e+36)
        		tmp = Float64(x + Float64(Float64(y * fma(z, a, b)) / 0.607771387771));
        	else
        		tmp = fma(y, 3.13060547623, x);
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3e+24], N[(y * 3.13060547623 + x), $MachinePrecision], If[LessEqual[z, 2.8e+36], N[(x + N[(N[(y * N[(z * a + b), $MachinePrecision]), $MachinePrecision] / 0.607771387771), $MachinePrecision]), $MachinePrecision], N[(y * 3.13060547623 + x), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;z \leq -3 \cdot 10^{+24}:\\
        \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
        
        \mathbf{elif}\;z \leq 2.8 \cdot 10^{+36}:\\
        \;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(z, a, b\right)}{0.607771387771}\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -2.99999999999999995e24 or 2.8000000000000001e36 < z

          1. Initial program 10.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.1

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

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

          if -2.99999999999999995e24 < z < 2.8000000000000001e36

          1. Initial program 96.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 + a \cdot z\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(a \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}} \]
            2. *-commutativeN/A

              \[\leadsto x + \frac{y \cdot \left(\color{blue}{z \cdot 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}} \]
            3. accelerator-lowering-fma.f6488.8

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

            \[\leadsto x + \frac{y \cdot \color{blue}{\mathsf{fma}\left(z, a, 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, a, b\right)}{\color{blue}{\frac{607771387771}{1000000000000}}} \]
          7. Step-by-step derivation
            1. Simplified87.2%

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

          Alternative 9: 83.6% accurate, 2.2× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+35}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \mathbf{elif}\;z \leq 0.034:\\ \;\;\;\;\mathsf{fma}\left(b, y \cdot \mathsf{fma}\left(z, -32.324150453290734, 1.6453555072203998\right), 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 -7e+35)
             (fma y 3.13060547623 x)
             (if (<= z 0.034)
               (fma b (* y (fma z -32.324150453290734 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 <= -7e+35) {
          		tmp = fma(y, 3.13060547623, x);
          	} else if (z <= 0.034) {
          		tmp = fma(b, (y * fma(z, -32.324150453290734, 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 <= -7e+35)
          		tmp = fma(y, 3.13060547623, x);
          	elseif (z <= 0.034)
          		tmp = fma(b, Float64(y * fma(z, -32.324150453290734, 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, -7e+35], N[(y * 3.13060547623 + x), $MachinePrecision], If[LessEqual[z, 0.034], N[(b * N[(y * N[(z * -32.324150453290734 + 1.6453555072203998), $MachinePrecision]), $MachinePrecision] + 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 -7 \cdot 10^{+35}:\\
          \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
          
          \mathbf{elif}\;z \leq 0.034:\\
          \;\;\;\;\mathsf{fma}\left(b, y \cdot \mathsf{fma}\left(z, -32.324150453290734, 1.6453555072203998\right), 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 < -7.0000000000000001e35

            1. Initial program 9.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.f6497.3

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

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

            if -7.0000000000000001e35 < z < 0.034000000000000002

            1. Initial program 99.0%

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

              \[\leadsto x + \frac{y \cdot \color{blue}{\left(b + a \cdot z\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(a \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}} \]
              2. *-commutativeN/A

                \[\leadsto x + \frac{y \cdot \left(\color{blue}{z \cdot 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}} \]
              3. accelerator-lowering-fma.f6492.6

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

              \[\leadsto x + \frac{y \cdot \color{blue}{\mathsf{fma}\left(z, a, 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 a around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\mathsf{fma}\left(b, \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)} \]
            9. Taylor expanded in z around 0

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

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

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

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

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

                \[\leadsto \left(\left(\frac{-11940090572100000000000000}{369386059793087248348441} \cdot \left(y \cdot z\right)\right) \cdot b + \color{blue}{\left(\frac{1000000000000}{607771387771} \cdot y\right) \cdot b}\right) + x \]
              6. distribute-rgt-outN/A

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

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

                \[\leadsto \mathsf{fma}\left(b, \color{blue}{\left(y \cdot z\right) \cdot \frac{-11940090572100000000000000}{369386059793087248348441}} + \frac{1000000000000}{607771387771} \cdot y, x\right) \]
              9. associate-*l*N/A

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

                \[\leadsto \mathsf{fma}\left(b, y \cdot \left(z \cdot \frac{-11940090572100000000000000}{369386059793087248348441}\right) + \color{blue}{y \cdot \frac{1000000000000}{607771387771}}, x\right) \]
              11. distribute-lft-outN/A

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

                \[\leadsto \mathsf{fma}\left(b, \color{blue}{y \cdot \left(z \cdot \frac{-11940090572100000000000000}{369386059793087248348441} + \frac{1000000000000}{607771387771}\right)}, x\right) \]
              13. accelerator-lowering-fma.f6473.1

                \[\leadsto \mathsf{fma}\left(b, y \cdot \color{blue}{\mathsf{fma}\left(z, -32.324150453290734, 1.6453555072203998\right)}, x\right) \]
            11. Simplified73.1%

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

            if 0.034000000000000002 < z

            1. Initial program 15.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}{\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. Simplified82.7%

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

          Alternative 10: 83.6% accurate, 2.4× speedup?

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

            1. Initial program 9.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.f6497.3

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

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

            if -1.85000000000000004e34 < z < 0.034000000000000002

            1. Initial program 99.0%

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

              \[\leadsto x + \frac{y \cdot \color{blue}{\left(b + a \cdot z\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(a \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}} \]
              2. *-commutativeN/A

                \[\leadsto x + \frac{y \cdot \left(\color{blue}{z \cdot 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}} \]
              3. accelerator-lowering-fma.f6492.6

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

              \[\leadsto x + \frac{y \cdot \color{blue}{\mathsf{fma}\left(z, a, 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 a around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\mathsf{fma}\left(b, \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)} \]
            9. Taylor expanded in z around 0

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

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

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

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

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

                \[\leadsto \left(\left(\frac{-11940090572100000000000000}{369386059793087248348441} \cdot \left(y \cdot z\right)\right) \cdot b + \color{blue}{\left(\frac{1000000000000}{607771387771} \cdot y\right) \cdot b}\right) + x \]
              6. distribute-rgt-outN/A

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

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

                \[\leadsto \mathsf{fma}\left(b, \color{blue}{\left(y \cdot z\right) \cdot \frac{-11940090572100000000000000}{369386059793087248348441}} + \frac{1000000000000}{607771387771} \cdot y, x\right) \]
              9. associate-*l*N/A

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

                \[\leadsto \mathsf{fma}\left(b, y \cdot \left(z \cdot \frac{-11940090572100000000000000}{369386059793087248348441}\right) + \color{blue}{y \cdot \frac{1000000000000}{607771387771}}, x\right) \]
              11. distribute-lft-outN/A

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

                \[\leadsto \mathsf{fma}\left(b, \color{blue}{y \cdot \left(z \cdot \frac{-11940090572100000000000000}{369386059793087248348441} + \frac{1000000000000}{607771387771}\right)}, x\right) \]
              13. accelerator-lowering-fma.f6473.1

                \[\leadsto \mathsf{fma}\left(b, y \cdot \color{blue}{\mathsf{fma}\left(z, -32.324150453290734, 1.6453555072203998\right)}, x\right) \]
            11. Simplified73.1%

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

            if 0.034000000000000002 < z

            1. Initial program 15.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. Step-by-step derivation
              1. associate-/l*N/A

                \[\leadsto x + \color{blue}{y \cdot \frac{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}{\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. clear-numN/A

                \[\leadsto x + y \cdot \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}}{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}} \]
              3. un-div-invN/A

                \[\leadsto x + \color{blue}{\frac{y}{\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}}{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}} \]
              4. /-lowering-/.f64N/A

                \[\leadsto x + \color{blue}{\frac{y}{\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}}{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}} \]
              5. /-lowering-/.f64N/A

                \[\leadsto x + \frac{y}{\color{blue}{\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}}{\left(\left(\left(z \cdot \frac{313060547623}{100000000000} + \frac{55833770631}{5000000000}\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}} \]
            4. Applied egg-rr21.4%

              \[\leadsto x + \color{blue}{\frac{y}{\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}{\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)}}} \]
            5. Taylor expanded in z around inf

              \[\leadsto x + \frac{y}{\color{blue}{\frac{100000000000}{313060547623} + \frac{365270416988064188356100}{98006906478012650950129} \cdot \frac{1}{z}}} \]
            6. Step-by-step derivation
              1. +-lowering-+.f64N/A

                \[\leadsto x + \frac{y}{\color{blue}{\frac{100000000000}{313060547623} + \frac{365270416988064188356100}{98006906478012650950129} \cdot \frac{1}{z}}} \]
              2. associate-*r/N/A

                \[\leadsto x + \frac{y}{\frac{100000000000}{313060547623} + \color{blue}{\frac{\frac{365270416988064188356100}{98006906478012650950129} \cdot 1}{z}}} \]
              3. metadata-evalN/A

                \[\leadsto x + \frac{y}{\frac{100000000000}{313060547623} + \frac{\color{blue}{\frac{365270416988064188356100}{98006906478012650950129}}}{z}} \]
              4. /-lowering-/.f6482.6

                \[\leadsto x + \frac{y}{0.31942702700572795 + \color{blue}{\frac{3.7269864963038164}{z}}} \]
            7. Simplified82.6%

              \[\leadsto x + \frac{y}{\color{blue}{0.31942702700572795 + \frac{3.7269864963038164}{z}}} \]
            8. Step-by-step derivation
              1. clear-numN/A

                \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{100000000000}{313060547623} + \frac{\frac{365270416988064188356100}{98006906478012650950129}}{z}}{y}}} \]
              2. /-lowering-/.f64N/A

                \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{100000000000}{313060547623} + \frac{\frac{365270416988064188356100}{98006906478012650950129}}{z}}{y}}} \]
              3. /-lowering-/.f64N/A

                \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{100000000000}{313060547623} + \frac{\frac{365270416988064188356100}{98006906478012650950129}}{z}}{y}}} \]
              4. +-lowering-+.f64N/A

                \[\leadsto x + \frac{1}{\frac{\color{blue}{\frac{100000000000}{313060547623} + \frac{\frac{365270416988064188356100}{98006906478012650950129}}{z}}}{y}} \]
              5. /-lowering-/.f6482.4

                \[\leadsto x + \frac{1}{\frac{0.31942702700572795 + \color{blue}{\frac{3.7269864963038164}{z}}}{y}} \]
            9. Applied egg-rr82.4%

              \[\leadsto x + \color{blue}{\frac{1}{\frac{0.31942702700572795 + \frac{3.7269864963038164}{z}}{y}}} \]
            10. Taylor expanded in z around inf

              \[\leadsto \color{blue}{x + \left(\frac{-3652704169880641883561}{100000000000000000000} \cdot \frac{y}{z} + \frac{313060547623}{100000000000} \cdot y\right)} \]
            11. Step-by-step derivation
              1. +-commutativeN/A

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

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

                \[\leadsto \left(\color{blue}{y \cdot \frac{313060547623}{100000000000}} + \frac{-3652704169880641883561}{100000000000000000000} \cdot \frac{y}{z}\right) + x \]
              4. associate-*r/N/A

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

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

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

                \[\leadsto \color{blue}{y \cdot \left(\frac{313060547623}{100000000000} + \frac{\frac{-3652704169880641883561}{100000000000000000000}}{z}\right)} + x \]
              8. accelerator-lowering-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{313060547623}{100000000000} + \frac{\frac{-3652704169880641883561}{100000000000000000000}}{z}, x\right)} \]
              9. +-lowering-+.f64N/A

                \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{313060547623}{100000000000} + \frac{\frac{-3652704169880641883561}{100000000000000000000}}{z}}, x\right) \]
              10. /-lowering-/.f6482.6

                \[\leadsto \mathsf{fma}\left(y, 3.13060547623 + \color{blue}{\frac{-36.52704169880642}{z}}, x\right) \]
            12. Simplified82.6%

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

          Alternative 11: 83.6% accurate, 3.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.15 \cdot 10^{+24}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+27}:\\ \;\;\;\;x + 1.6453555072203998 \cdot \left(y \cdot b\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 -2.15e+24)
             (fma y 3.13060547623 x)
             (if (<= z 6.2e+27)
               (+ x (* 1.6453555072203998 (* y b)))
               (fma y 3.13060547623 x))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double tmp;
          	if (z <= -2.15e+24) {
          		tmp = fma(y, 3.13060547623, x);
          	} else if (z <= 6.2e+27) {
          		tmp = x + (1.6453555072203998 * (y * b));
          	} else {
          		tmp = fma(y, 3.13060547623, x);
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b)
          	tmp = 0.0
          	if (z <= -2.15e+24)
          		tmp = fma(y, 3.13060547623, x);
          	elseif (z <= 6.2e+27)
          		tmp = Float64(x + Float64(1.6453555072203998 * Float64(y * b)));
          	else
          		tmp = fma(y, 3.13060547623, x);
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.15e+24], N[(y * 3.13060547623 + x), $MachinePrecision], If[LessEqual[z, 6.2e+27], N[(x + N[(1.6453555072203998 * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * 3.13060547623 + x), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq -2.15 \cdot 10^{+24}:\\
          \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
          
          \mathbf{elif}\;z \leq 6.2 \cdot 10^{+27}:\\
          \;\;\;\;x + 1.6453555072203998 \cdot \left(y \cdot b\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 < -2.14999999999999994e24 or 6.19999999999999992e27 < z

            1. Initial program 10.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.f6494.5

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

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

            if -2.14999999999999994e24 < z < 6.19999999999999992e27

            1. Initial program 97.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 + \color{blue}{\frac{1000000000000}{607771387771} \cdot \left(b \cdot y\right)} \]
            4. Step-by-step derivation
              1. *-lowering-*.f64N/A

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

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

                \[\leadsto x + 1.6453555072203998 \cdot \color{blue}{\left(y \cdot b\right)} \]
            5. Simplified69.7%

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

          Alternative 12: 83.6% accurate, 3.3× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+24}:\\ \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+28}:\\ \;\;\;\;\mathsf{fma}\left(1.6453555072203998, y \cdot b, 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 -2e+24)
             (fma y 3.13060547623 x)
             (if (<= z 3.1e+28)
               (fma 1.6453555072203998 (* y 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 <= -2e+24) {
          		tmp = fma(y, 3.13060547623, x);
          	} else if (z <= 3.1e+28) {
          		tmp = fma(1.6453555072203998, (y * b), x);
          	} else {
          		tmp = fma(y, 3.13060547623, x);
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b)
          	tmp = 0.0
          	if (z <= -2e+24)
          		tmp = fma(y, 3.13060547623, x);
          	elseif (z <= 3.1e+28)
          		tmp = fma(1.6453555072203998, Float64(y * b), x);
          	else
          		tmp = fma(y, 3.13060547623, x);
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2e+24], N[(y * 3.13060547623 + x), $MachinePrecision], If[LessEqual[z, 3.1e+28], N[(1.6453555072203998 * N[(y * b), $MachinePrecision] + x), $MachinePrecision], N[(y * 3.13060547623 + x), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq -2 \cdot 10^{+24}:\\
          \;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
          
          \mathbf{elif}\;z \leq 3.1 \cdot 10^{+28}:\\
          \;\;\;\;\mathsf{fma}\left(1.6453555072203998, y \cdot b, 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 < -2e24 or 3.1000000000000001e28 < z

            1. Initial program 10.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.f6494.5

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

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

            if -2e24 < z < 3.1000000000000001e28

            1. Initial program 97.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 + a \cdot z\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(a \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}} \]
              2. *-commutativeN/A

                \[\leadsto x + \frac{y \cdot \left(\color{blue}{z \cdot 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}} \]
              3. accelerator-lowering-fma.f6490.0

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

              \[\leadsto x + \frac{y \cdot \color{blue}{\mathsf{fma}\left(z, a, 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 \color{blue}{x + \frac{1000000000000}{607771387771} \cdot \left(b \cdot y\right)} \]
            7. Step-by-step derivation
              1. +-commutativeN/A

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

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

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

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

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

          Alternative 13: 50.6% accurate, 4.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.1 \cdot 10^{+75}:\\ \;\;\;\;y \cdot 3.13060547623\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{+52}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot 3.13060547623\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (if (<= y -3.1e+75)
             (* y 3.13060547623)
             (if (<= y 1.1e+52) x (* y 3.13060547623))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double tmp;
          	if (y <= -3.1e+75) {
          		tmp = y * 3.13060547623;
          	} else if (y <= 1.1e+52) {
          		tmp = x;
          	} else {
          		tmp = y * 3.13060547623;
          	}
          	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 (y <= (-3.1d+75)) then
                  tmp = y * 3.13060547623d0
              else if (y <= 1.1d+52) then
                  tmp = x
              else
                  tmp = y * 3.13060547623d0
              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 (y <= -3.1e+75) {
          		tmp = y * 3.13060547623;
          	} else if (y <= 1.1e+52) {
          		tmp = x;
          	} else {
          		tmp = y * 3.13060547623;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b):
          	tmp = 0
          	if y <= -3.1e+75:
          		tmp = y * 3.13060547623
          	elif y <= 1.1e+52:
          		tmp = x
          	else:
          		tmp = y * 3.13060547623
          	return tmp
          
          function code(x, y, z, t, a, b)
          	tmp = 0.0
          	if (y <= -3.1e+75)
          		tmp = Float64(y * 3.13060547623);
          	elseif (y <= 1.1e+52)
          		tmp = x;
          	else
          		tmp = Float64(y * 3.13060547623);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a, b)
          	tmp = 0.0;
          	if (y <= -3.1e+75)
          		tmp = y * 3.13060547623;
          	elseif (y <= 1.1e+52)
          		tmp = x;
          	else
          		tmp = y * 3.13060547623;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.1e+75], N[(y * 3.13060547623), $MachinePrecision], If[LessEqual[y, 1.1e+52], x, N[(y * 3.13060547623), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;y \leq -3.1 \cdot 10^{+75}:\\
          \;\;\;\;y \cdot 3.13060547623\\
          
          \mathbf{elif}\;y \leq 1.1 \cdot 10^{+52}:\\
          \;\;\;\;x\\
          
          \mathbf{else}:\\
          \;\;\;\;y \cdot 3.13060547623\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if y < -3.1000000000000001e75 or 1.1e52 < y

            1. Initial program 51.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.f6448.5

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

              \[\leadsto \color{blue}{\mathsf{fma}\left(y, 3.13060547623, x\right)} \]
            6. Taylor expanded in y around inf

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

                \[\leadsto \color{blue}{y \cdot \frac{313060547623}{100000000000}} \]
              2. *-lowering-*.f6438.9

                \[\leadsto \color{blue}{y \cdot 3.13060547623} \]
            8. Simplified38.9%

              \[\leadsto \color{blue}{y \cdot 3.13060547623} \]

            if -3.1000000000000001e75 < y < 1.1e52

            1. Initial program 59.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 x around inf

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

                \[\leadsto \color{blue}{x} \]
            5. Recombined 2 regimes into one program.
            6. Add Preprocessing

            Alternative 14: 62.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 56.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.f6461.9

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

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

            Alternative 15: 45.0% 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 56.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 x around inf

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

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

              Developer Target 1: 98.3% 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 2024199 
              (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))))