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

Percentage Accurate: 59.1% → 96.5%
Time: 18.7s
Alternatives: 18
Speedup: 7.4×

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 18 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: 59.1% 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: 96.5% accurate, 0.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} \leq 4 \cdot 10^{+292}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), t\right), a\right), b\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}, x\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623 - \frac{36.52704169880642 - \frac{457.9610022158428 + \left(t + \frac{a + \left(1112.0901850848957 + \left(-6976.8927133548 + t \cdot -15.234687407\right)\right)}{z}\right)}{z}}{z}, x\right)\\


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

    1. Initial program 96.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. Simplified98.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), t\right), a\right), b\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}, x\right)} \]
    3. Add Preprocessing

    if 4.0000000000000001e292 < (/.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 4.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. Simplified9.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), t\right), a\right), b\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}, x\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in z around -inf 99.1%

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

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

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

Alternative 2: 95.1% accurate, 0.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623 - \frac{36.52704169880642 - \frac{457.9610022158428 + \left(t + \frac{a + \left(1112.0901850848957 + \left(-6976.8927133548 + t \cdot -15.234687407\right)\right)}{z}\right)}{z}}{z}, x\right)\\


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

    1. Initial program 96.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. Simplified97.8%

      \[\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)} \]
    3. Add Preprocessing
    4. Taylor expanded in z around inf 96.6%

      \[\leadsto \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, \color{blue}{{z}^{3} \cdot \left(1 + 15.234687407 \cdot \frac{1}{z}\right)}, 0.607771387771\right)}, x\right) \]
    5. Step-by-step derivation
      1. associate-*r/96.6%

        \[\leadsto \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, {z}^{3} \cdot \left(1 + \color{blue}{\frac{15.234687407 \cdot 1}{z}}\right), 0.607771387771\right)}, x\right) \]
      2. metadata-eval96.6%

        \[\leadsto \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, {z}^{3} \cdot \left(1 + \frac{\color{blue}{15.234687407}}{z}\right), 0.607771387771\right)}, x\right) \]
    6. Simplified96.6%

      \[\leadsto \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, \color{blue}{{z}^{3} \cdot \left(1 + \frac{15.234687407}{z}\right)}, 0.607771387771\right)}, x\right) \]

    if 4.0000000000000001e292 < (/.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 4.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. Simplified9.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), t\right), a\right), b\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}, x\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in z around -inf 99.1%

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

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

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

Alternative 3: 95.5% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}\\
\mathbf{if}\;t\_1 \leq 4 \cdot 10^{+292}:\\
\;\;\;\;t\_1 + x\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623 - \frac{36.52704169880642 - \frac{457.9610022158428 + \left(t + \frac{a + \left(1112.0901850848957 + \left(-6976.8927133548 + t \cdot -15.234687407\right)\right)}{z}\right)}{z}}{z}, x\right)\\


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

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

    if 4.0000000000000001e292 < (/.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 4.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. Simplified9.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), t\right), a\right), b\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}, x\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in z around -inf 99.1%

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

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

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

Alternative 4: 94.4% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}\\
\mathbf{if}\;t\_1 \leq 4 \cdot 10^{+292}:\\
\;\;\;\;t\_1 + x\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \frac{\frac{t + 457.9610022158428}{z} - 36.52704169880642}{z}, x\right)\\


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

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

    if 4.0000000000000001e292 < (/.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 4.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. Simplified9.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), t\right), a\right), b\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}, x\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in z around -inf 96.2%

      \[\leadsto \mathsf{fma}\left(y, \color{blue}{3.13060547623 + -1 \cdot \frac{36.52704169880642 + -1 \cdot \frac{457.9610022158428 + t}{z}}{z}}, x\right) \]
    5. Step-by-step derivation
      1. mul-1-neg96.2%

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

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

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

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

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

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

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

Alternative 5: 96.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771\\ t_2 := b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\\ t_3 := \frac{y \cdot t\_2}{t\_1}\\ \mathbf{if}\;t\_3 \leq 2 \cdot 10^{+234}:\\ \;\;\;\;t\_3 + x\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;y \cdot \left(\frac{x}{y} + \frac{t\_2}{t\_1}\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(3.13060547623 + \frac{-36.52704169880642}{z}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1
         (+
          (*
           z
           (+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
          0.607771387771))
        (t_2
         (+
          b
          (* z (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))))
        (t_3 (/ (* y t_2) t_1)))
   (if (<= t_3 2e+234)
     (+ t_3 x)
     (if (<= t_3 INFINITY)
       (* y (+ (/ x y) (/ t_2 t_1)))
       (+ x (* y (+ 3.13060547623 (/ -36.52704169880642 z))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771;
	double t_2 = b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623)))))));
	double t_3 = (y * t_2) / t_1;
	double tmp;
	if (t_3 <= 2e+234) {
		tmp = t_3 + x;
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = y * ((x / y) + (t_2 / t_1));
	} else {
		tmp = x + (y * (3.13060547623 + (-36.52704169880642 / z)));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771;
	double t_2 = b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623)))))));
	double t_3 = (y * t_2) / t_1;
	double tmp;
	if (t_3 <= 2e+234) {
		tmp = t_3 + x;
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = y * ((x / y) + (t_2 / t_1));
	} else {
		tmp = x + (y * (3.13060547623 + (-36.52704169880642 / z)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771
	t_2 = b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623)))))))
	t_3 = (y * t_2) / t_1
	tmp = 0
	if t_3 <= 2e+234:
		tmp = t_3 + x
	elif t_3 <= math.inf:
		tmp = y * ((x / y) + (t_2 / t_1))
	else:
		tmp = x + (y * (3.13060547623 + (-36.52704169880642 / z)))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)
	t_2 = Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))))
	t_3 = Float64(Float64(y * t_2) / t_1)
	tmp = 0.0
	if (t_3 <= 2e+234)
		tmp = Float64(t_3 + x);
	elseif (t_3 <= Inf)
		tmp = Float64(y * Float64(Float64(x / y) + Float64(t_2 / t_1)));
	else
		tmp = Float64(x + Float64(y * Float64(3.13060547623 + Float64(-36.52704169880642 / z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771;
	t_2 = b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623)))))));
	t_3 = (y * t_2) / t_1;
	tmp = 0.0;
	if (t_3 <= 2e+234)
		tmp = t_3 + x;
	elseif (t_3 <= Inf)
		tmp = y * ((x / y) + (t_2 / t_1));
	else
		tmp = x + (y * (3.13060547623 + (-36.52704169880642 / z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y * t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$3, 2e+234], N[(t$95$3 + x), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(y * N[(N[(x / y), $MachinePrecision] + N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(3.13060547623 + N[(-36.52704169880642 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771\\
t_2 := b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\\
t_3 := \frac{y \cdot t\_2}{t\_1}\\
\mathbf{if}\;t\_3 \leq 2 \cdot 10^{+234}:\\
\;\;\;\;t\_3 + x\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;y \cdot \left(\frac{x}{y} + \frac{t\_2}{t\_1}\right)\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(3.13060547623 + \frac{-36.52704169880642}{z}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 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))) < 2.00000000000000004e234

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

    if 2.00000000000000004e234 < (/.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 59.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. Simplified88.1%

      \[\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)} \]
    3. Add Preprocessing
    4. Taylor expanded in y around -inf 88.0%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(-1 \cdot \frac{x}{y} + -1 \cdot \frac{b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + 3.13060547623 \cdot z\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(15.234687407 + z\right)\right)\right)}\right)\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. Simplified0.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)} \]
    3. Add Preprocessing
    4. Taylor expanded in z around -inf 98.0%

      \[\leadsto \color{blue}{x + \left(-1 \cdot \frac{-11.1667541262 \cdot y - -47.69379582500642 \cdot y}{z} + 3.13060547623 \cdot y\right)} \]
    5. Step-by-step derivation
      1. +-commutative98.0%

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{-11.1667541262 \cdot y - -47.69379582500642 \cdot y}{z} + 3.13060547623 \cdot y\right) + x} \]
      2. +-commutative98.0%

        \[\leadsto \color{blue}{\left(3.13060547623 \cdot y + -1 \cdot \frac{-11.1667541262 \cdot y - -47.69379582500642 \cdot y}{z}\right)} + x \]
      3. mul-1-neg98.0%

        \[\leadsto \left(3.13060547623 \cdot y + \color{blue}{\left(-\frac{-11.1667541262 \cdot y - -47.69379582500642 \cdot y}{z}\right)}\right) + x \]
      4. unsub-neg98.0%

        \[\leadsto \color{blue}{\left(3.13060547623 \cdot y - \frac{-11.1667541262 \cdot y - -47.69379582500642 \cdot y}{z}\right)} + x \]
      5. *-commutative98.0%

        \[\leadsto \left(\color{blue}{y \cdot 3.13060547623} - \frac{-11.1667541262 \cdot y - -47.69379582500642 \cdot y}{z}\right) + x \]
      6. distribute-rgt-out--98.0%

        \[\leadsto \left(y \cdot 3.13060547623 - \frac{\color{blue}{y \cdot \left(-11.1667541262 - -47.69379582500642\right)}}{z}\right) + x \]
      7. metadata-eval98.0%

        \[\leadsto \left(y \cdot 3.13060547623 - \frac{y \cdot \color{blue}{36.52704169880642}}{z}\right) + x \]
    6. Simplified98.0%

      \[\leadsto \color{blue}{\left(y \cdot 3.13060547623 - \frac{y \cdot 36.52704169880642}{z}\right) + x} \]
    7. Taylor expanded in y around 0 98.0%

      \[\leadsto \color{blue}{y \cdot \left(3.13060547623 - 36.52704169880642 \cdot \frac{1}{z}\right)} + x \]
    8. Step-by-step derivation
      1. associate-*r/98.0%

        \[\leadsto y \cdot \left(3.13060547623 - \color{blue}{\frac{36.52704169880642 \cdot 1}{z}}\right) + x \]
      2. metadata-eval98.0%

        \[\leadsto y \cdot \left(3.13060547623 - \frac{\color{blue}{36.52704169880642}}{z}\right) + x \]
      3. sub-neg98.0%

        \[\leadsto y \cdot \color{blue}{\left(3.13060547623 + \left(-\frac{36.52704169880642}{z}\right)\right)} + x \]
      4. distribute-neg-frac98.0%

        \[\leadsto y \cdot \left(3.13060547623 + \color{blue}{\frac{-36.52704169880642}{z}}\right) + x \]
      5. metadata-eval98.0%

        \[\leadsto y \cdot \left(3.13060547623 + \frac{\color{blue}{-36.52704169880642}}{z}\right) + x \]
    9. Simplified98.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} \leq 2 \cdot 10^{+234}:\\ \;\;\;\;\frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} + x\\ \mathbf{elif}\;\frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} \leq \infty:\\ \;\;\;\;y \cdot \left(\frac{x}{y} + \frac{b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(3.13060547623 + \frac{-36.52704169880642}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 95.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}\\ \mathbf{if}\;t\_1 \leq \infty:\\ \;\;\;\;t\_1 + x\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(3.13060547623 + \frac{-36.52704169880642}{z}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1
         (/
          (*
           y
           (+
            b
            (*
             z
             (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))))
          (+
           (*
            z
            (+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
           0.607771387771))))
   (if (<= t_1 INFINITY)
     (+ t_1 x)
     (+ x (* y (+ 3.13060547623 (/ -36.52704169880642 z)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771);
	double tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = t_1 + x;
	} else {
		tmp = x + (y * (3.13060547623 + (-36.52704169880642 / z)));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771);
	double tmp;
	if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_1 + x;
	} else {
		tmp = x + (y * (3.13060547623 + (-36.52704169880642 / z)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)
	tmp = 0
	if t_1 <= math.inf:
		tmp = t_1 + x
	else:
		tmp = x + (y * (3.13060547623 + (-36.52704169880642 / z)))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))))) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = Float64(t_1 + x);
	else
		tmp = Float64(x + Float64(y * Float64(3.13060547623 + Float64(-36.52704169880642 / z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771);
	tmp = 0.0;
	if (t_1 <= Inf)
		tmp = t_1 + x;
	else
		tmp = x + (y * (3.13060547623 + (-36.52704169880642 / z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(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]}, If[LessEqual[t$95$1, Infinity], N[(t$95$1 + x), $MachinePrecision], N[(x + N[(y * N[(3.13060547623 + N[(-36.52704169880642 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1 + x\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(3.13060547623 + \frac{-36.52704169880642}{z}\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.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

    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. Simplified0.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)} \]
    3. Add Preprocessing
    4. Taylor expanded in z around -inf 98.0%

      \[\leadsto \color{blue}{x + \left(-1 \cdot \frac{-11.1667541262 \cdot y - -47.69379582500642 \cdot y}{z} + 3.13060547623 \cdot y\right)} \]
    5. Step-by-step derivation
      1. +-commutative98.0%

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{-11.1667541262 \cdot y - -47.69379582500642 \cdot y}{z} + 3.13060547623 \cdot y\right) + x} \]
      2. +-commutative98.0%

        \[\leadsto \color{blue}{\left(3.13060547623 \cdot y + -1 \cdot \frac{-11.1667541262 \cdot y - -47.69379582500642 \cdot y}{z}\right)} + x \]
      3. mul-1-neg98.0%

        \[\leadsto \left(3.13060547623 \cdot y + \color{blue}{\left(-\frac{-11.1667541262 \cdot y - -47.69379582500642 \cdot y}{z}\right)}\right) + x \]
      4. unsub-neg98.0%

        \[\leadsto \color{blue}{\left(3.13060547623 \cdot y - \frac{-11.1667541262 \cdot y - -47.69379582500642 \cdot y}{z}\right)} + x \]
      5. *-commutative98.0%

        \[\leadsto \left(\color{blue}{y \cdot 3.13060547623} - \frac{-11.1667541262 \cdot y - -47.69379582500642 \cdot y}{z}\right) + x \]
      6. distribute-rgt-out--98.0%

        \[\leadsto \left(y \cdot 3.13060547623 - \frac{\color{blue}{y \cdot \left(-11.1667541262 - -47.69379582500642\right)}}{z}\right) + x \]
      7. metadata-eval98.0%

        \[\leadsto \left(y \cdot 3.13060547623 - \frac{y \cdot \color{blue}{36.52704169880642}}{z}\right) + x \]
    6. Simplified98.0%

      \[\leadsto \color{blue}{\left(y \cdot 3.13060547623 - \frac{y \cdot 36.52704169880642}{z}\right) + x} \]
    7. Taylor expanded in y around 0 98.0%

      \[\leadsto \color{blue}{y \cdot \left(3.13060547623 - 36.52704169880642 \cdot \frac{1}{z}\right)} + x \]
    8. Step-by-step derivation
      1. associate-*r/98.0%

        \[\leadsto y \cdot \left(3.13060547623 - \color{blue}{\frac{36.52704169880642 \cdot 1}{z}}\right) + x \]
      2. metadata-eval98.0%

        \[\leadsto y \cdot \left(3.13060547623 - \frac{\color{blue}{36.52704169880642}}{z}\right) + x \]
      3. sub-neg98.0%

        \[\leadsto y \cdot \color{blue}{\left(3.13060547623 + \left(-\frac{36.52704169880642}{z}\right)\right)} + x \]
      4. distribute-neg-frac98.0%

        \[\leadsto y \cdot \left(3.13060547623 + \color{blue}{\frac{-36.52704169880642}{z}}\right) + x \]
      5. metadata-eval98.0%

        \[\leadsto y \cdot \left(3.13060547623 + \frac{\color{blue}{-36.52704169880642}}{z}\right) + x \]
    9. Simplified98.0%

      \[\leadsto \color{blue}{y \cdot \left(3.13060547623 + \frac{-36.52704169880642}{z}\right)} + x \]
  3. Recombined 2 regimes into one program.
  4. Final simplification94.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} \leq \infty:\\ \;\;\;\;\frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} + x\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(3.13060547623 + \frac{-36.52704169880642}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 94.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{+59} \lor \neg \left(z \leq 2 \cdot 10^{+68}\right):\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= z -1.9e+59) (not (<= z 2e+68)))
   (+ x (* y 3.13060547623))
   (+
    x
    (/
     (* y (+ b (* z (+ a (* z (+ t (* z 11.1667541262)))))))
     (+
      (* z (+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
      0.607771387771)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((z <= -1.9e+59) || !(z <= 2e+68)) {
		tmp = x + (y * 3.13060547623);
	} else {
		tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771));
	}
	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 ((z <= (-1.9d+59)) .or. (.not. (z <= 2d+68))) then
        tmp = x + (y * 3.13060547623d0)
    else
        tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262d0))))))) / ((z * ((z * ((z * (z + 15.234687407d0)) + 31.4690115749d0)) + 11.9400905721d0)) + 0.607771387771d0))
    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 ((z <= -1.9e+59) || !(z <= 2e+68)) {
		tmp = x + (y * 3.13060547623);
	} else {
		tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (z <= -1.9e+59) or not (z <= 2e+68):
		tmp = x + (y * 3.13060547623)
	else:
		tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((z <= -1.9e+59) || !(z <= 2e+68))
		tmp = Float64(x + Float64(y * 3.13060547623));
	else
		tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * 11.1667541262))))))) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((z <= -1.9e+59) || ~((z <= 2e+68)))
		tmp = x + (y * 3.13060547623);
	else
		tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.9e+59], N[Not[LessEqual[z, 2e+68]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * 11.1667541262), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+59} \lor \neg \left(z \leq 2 \cdot 10^{+68}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.9e59 or 1.99999999999999991e68 < z

    1. Initial program 2.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. Simplified3.9%

      \[\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)} \]
    3. Add Preprocessing
    4. Taylor expanded in z around inf 98.1%

      \[\leadsto \color{blue}{x + 3.13060547623 \cdot y} \]
    5. Step-by-step derivation
      1. +-commutative98.1%

        \[\leadsto \color{blue}{3.13060547623 \cdot y + x} \]
      2. *-commutative98.1%

        \[\leadsto \color{blue}{y \cdot 3.13060547623} + x \]
    6. Simplified98.1%

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

    if -1.9e59 < z < 1.99999999999999991e68

    1. Initial program 93.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 92.0%

      \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{11.1667541262 \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} \]
    4. Step-by-step derivation
      1. *-commutative92.0%

        \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{z \cdot 11.1667541262} + 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} \]
    5. Simplified92.0%

      \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{z \cdot 11.1667541262} + 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} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification94.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{+59} \lor \neg \left(z \leq 2 \cdot 10^{+68}\right):\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\right)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 93.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot 3.13060547623\\ \mathbf{if}\;z \leq -1.85 \cdot 10^{+59}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-7}:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+68}:\\ \;\;\;\;x + \frac{\frac{y}{z} \cdot \left(t + -170.12200846348443\right) - y \cdot -11.1667541262}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (* y 3.13060547623))))
   (if (<= z -1.85e+59)
     t_1
     (if (<= z 2.9e-7)
       (+
        x
        (/
         (*
          y
          (+
           b
           (*
            z
            (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))))
         (+ 0.607771387771 (* z (+ 11.9400905721 (* z 31.4690115749))))))
       (if (<= z 2.6e+68)
         (+
          x
          (/ (- (* (/ y z) (+ t -170.12200846348443)) (* y -11.1667541262)) z))
         t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (y * 3.13060547623);
	double tmp;
	if (z <= -1.85e+59) {
		tmp = t_1;
	} else if (z <= 2.9e-7) {
		tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
	} else if (z <= 2.6e+68) {
		tmp = x + ((((y / z) * (t + -170.12200846348443)) - (y * -11.1667541262)) / z);
	} 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 + (y * 3.13060547623d0)
    if (z <= (-1.85d+59)) then
        tmp = t_1
    else if (z <= 2.9d-7) then
        tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262d0 + (z * 3.13060547623d0))))))))) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * 31.4690115749d0)))))
    else if (z <= 2.6d+68) then
        tmp = x + ((((y / z) * (t + (-170.12200846348443d0))) - (y * (-11.1667541262d0))) / z)
    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 + (y * 3.13060547623);
	double tmp;
	if (z <= -1.85e+59) {
		tmp = t_1;
	} else if (z <= 2.9e-7) {
		tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
	} else if (z <= 2.6e+68) {
		tmp = x + ((((y / z) * (t + -170.12200846348443)) - (y * -11.1667541262)) / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (y * 3.13060547623)
	tmp = 0
	if z <= -1.85e+59:
		tmp = t_1
	elif z <= 2.9e-7:
		tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))))
	elif z <= 2.6e+68:
		tmp = x + ((((y / z) * (t + -170.12200846348443)) - (y * -11.1667541262)) / z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(y * 3.13060547623))
	tmp = 0.0
	if (z <= -1.85e+59)
		tmp = t_1;
	elseif (z <= 2.9e-7)
		tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))))) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * 31.4690115749))))));
	elseif (z <= 2.6e+68)
		tmp = Float64(x + Float64(Float64(Float64(Float64(y / z) * Float64(t + -170.12200846348443)) - Float64(y * -11.1667541262)) / z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (y * 3.13060547623);
	tmp = 0.0;
	if (z <= -1.85e+59)
		tmp = t_1;
	elseif (z <= 2.9e-7)
		tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
	elseif (z <= 2.6e+68)
		tmp = x + ((((y / z) * (t + -170.12200846348443)) - (y * -11.1667541262)) / z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.85e+59], t$95$1, If[LessEqual[z, 2.9e-7], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * 31.4690115749), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+68], N[(x + N[(N[(N[(N[(y / z), $MachinePrecision] * N[(t + -170.12200846348443), $MachinePrecision]), $MachinePrecision] - N[(y * -11.1667541262), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + y \cdot 3.13060547623\\
\mathbf{if}\;z \leq -1.85 \cdot 10^{+59}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.9 \cdot 10^{-7}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+68}:\\
\;\;\;\;x + \frac{\frac{y}{z} \cdot \left(t + -170.12200846348443\right) - y \cdot -11.1667541262}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.84999999999999999e59 or 2.5999999999999998e68 < z

    1. Initial program 2.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. Simplified3.9%

      \[\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)} \]
    3. Add Preprocessing
    4. Taylor expanded in z around inf 98.1%

      \[\leadsto \color{blue}{x + 3.13060547623 \cdot y} \]
    5. Step-by-step derivation
      1. +-commutative98.1%

        \[\leadsto \color{blue}{3.13060547623 \cdot y + x} \]
      2. *-commutative98.1%

        \[\leadsto \color{blue}{y \cdot 3.13060547623} + x \]
    6. Simplified98.1%

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

    if -1.84999999999999999e59 < z < 2.8999999999999998e-7

    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 94.8%

      \[\leadsto 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)}{\color{blue}{z \cdot \left(11.9400905721 + 31.4690115749 \cdot z\right)} + 0.607771387771} \]
    4. Step-by-step derivation
      1. *-commutative94.8%

        \[\leadsto 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)}{z \cdot \left(11.9400905721 + \color{blue}{z \cdot 31.4690115749}\right) + 0.607771387771} \]
    5. Simplified94.8%

      \[\leadsto 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)}{\color{blue}{z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)} + 0.607771387771} \]

    if 2.8999999999999998e-7 < z < 2.5999999999999998e68

    1. Initial program 71.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 0 64.7%

      \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{11.1667541262 \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} \]
    4. Step-by-step derivation
      1. *-commutative64.7%

        \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{z \cdot 11.1667541262} + 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} \]
    5. Simplified64.7%

      \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{z \cdot 11.1667541262} + 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} \]
    6. Taylor expanded in z around -inf 67.1%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 170.12200846348443 \cdot y}{z}}{z}} \]
    7. Step-by-step derivation
      1. mul-1-neg67.1%

        \[\leadsto x + \color{blue}{\left(-\frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 170.12200846348443 \cdot y}{z}}{z}\right)} \]
      2. distribute-neg-frac267.1%

        \[\leadsto x + \color{blue}{\frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 170.12200846348443 \cdot y}{z}}{-z}} \]
      3. mul-1-neg67.1%

        \[\leadsto x + \frac{-11.1667541262 \cdot y + \color{blue}{\left(-\frac{t \cdot y - 170.12200846348443 \cdot y}{z}\right)}}{-z} \]
      4. unsub-neg67.1%

        \[\leadsto x + \frac{\color{blue}{-11.1667541262 \cdot y - \frac{t \cdot y - 170.12200846348443 \cdot y}{z}}}{-z} \]
      5. *-commutative67.1%

        \[\leadsto x + \frac{\color{blue}{y \cdot -11.1667541262} - \frac{t \cdot y - 170.12200846348443 \cdot y}{z}}{-z} \]
      6. div-sub67.1%

        \[\leadsto x + \frac{y \cdot -11.1667541262 - \color{blue}{\left(\frac{t \cdot y}{z} - \frac{170.12200846348443 \cdot y}{z}\right)}}{-z} \]
      7. associate-/l*78.3%

        \[\leadsto x + \frac{y \cdot -11.1667541262 - \left(\color{blue}{t \cdot \frac{y}{z}} - \frac{170.12200846348443 \cdot y}{z}\right)}{-z} \]
      8. associate-*r/78.3%

        \[\leadsto x + \frac{y \cdot -11.1667541262 - \left(t \cdot \frac{y}{z} - \color{blue}{170.12200846348443 \cdot \frac{y}{z}}\right)}{-z} \]
      9. distribute-rgt-out--78.3%

        \[\leadsto x + \frac{y \cdot -11.1667541262 - \color{blue}{\frac{y}{z} \cdot \left(t - 170.12200846348443\right)}}{-z} \]
      10. sub-neg78.3%

        \[\leadsto x + \frac{y \cdot -11.1667541262 - \frac{y}{z} \cdot \color{blue}{\left(t + \left(-170.12200846348443\right)\right)}}{-z} \]
      11. metadata-eval78.3%

        \[\leadsto x + \frac{y \cdot -11.1667541262 - \frac{y}{z} \cdot \left(t + \color{blue}{-170.12200846348443}\right)}{-z} \]
    8. Simplified78.3%

      \[\leadsto x + \color{blue}{\frac{y \cdot -11.1667541262 - \frac{y}{z} \cdot \left(t + -170.12200846348443\right)}{-z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification94.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+59}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-7}:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+68}:\\ \;\;\;\;x + \frac{\frac{y}{z} \cdot \left(t + -170.12200846348443\right) - y \cdot -11.1667541262}{z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 93.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot 3.13060547623\\ \mathbf{if}\;z \leq -4.8 \cdot 10^{+60}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -12.5:\\ \;\;\;\;x + \frac{y \cdot 11.1667541262 + \frac{y \cdot \left(t - 170.12200846348443\right)}{z}}{z}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-7}:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\right)}{0.607771387771 + z \cdot 11.9400905721}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+82}:\\ \;\;\;\;x + \frac{\frac{y}{z} \cdot \left(t + -170.12200846348443\right) - y \cdot -11.1667541262}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (* y 3.13060547623))))
   (if (<= z -4.8e+60)
     t_1
     (if (<= z -12.5)
       (+ x (/ (+ (* y 11.1667541262) (/ (* y (- t 170.12200846348443)) z)) z))
       (if (<= z 2.9e-7)
         (+
          x
          (/
           (* y (+ b (* z (+ a (* z (+ t (* z 11.1667541262)))))))
           (+ 0.607771387771 (* z 11.9400905721))))
         (if (<= z 1.1e+82)
           (+
            x
            (/
             (- (* (/ y z) (+ t -170.12200846348443)) (* y -11.1667541262))
             z))
           t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (y * 3.13060547623);
	double tmp;
	if (z <= -4.8e+60) {
		tmp = t_1;
	} else if (z <= -12.5) {
		tmp = x + (((y * 11.1667541262) + ((y * (t - 170.12200846348443)) / z)) / z);
	} else if (z <= 2.9e-7) {
		tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * 11.9400905721)));
	} else if (z <= 1.1e+82) {
		tmp = x + ((((y / z) * (t + -170.12200846348443)) - (y * -11.1667541262)) / z);
	} 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 + (y * 3.13060547623d0)
    if (z <= (-4.8d+60)) then
        tmp = t_1
    else if (z <= (-12.5d0)) then
        tmp = x + (((y * 11.1667541262d0) + ((y * (t - 170.12200846348443d0)) / z)) / z)
    else if (z <= 2.9d-7) then
        tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262d0))))))) / (0.607771387771d0 + (z * 11.9400905721d0)))
    else if (z <= 1.1d+82) then
        tmp = x + ((((y / z) * (t + (-170.12200846348443d0))) - (y * (-11.1667541262d0))) / z)
    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 + (y * 3.13060547623);
	double tmp;
	if (z <= -4.8e+60) {
		tmp = t_1;
	} else if (z <= -12.5) {
		tmp = x + (((y * 11.1667541262) + ((y * (t - 170.12200846348443)) / z)) / z);
	} else if (z <= 2.9e-7) {
		tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * 11.9400905721)));
	} else if (z <= 1.1e+82) {
		tmp = x + ((((y / z) * (t + -170.12200846348443)) - (y * -11.1667541262)) / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (y * 3.13060547623)
	tmp = 0
	if z <= -4.8e+60:
		tmp = t_1
	elif z <= -12.5:
		tmp = x + (((y * 11.1667541262) + ((y * (t - 170.12200846348443)) / z)) / z)
	elif z <= 2.9e-7:
		tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * 11.9400905721)))
	elif z <= 1.1e+82:
		tmp = x + ((((y / z) * (t + -170.12200846348443)) - (y * -11.1667541262)) / z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(y * 3.13060547623))
	tmp = 0.0
	if (z <= -4.8e+60)
		tmp = t_1;
	elseif (z <= -12.5)
		tmp = Float64(x + Float64(Float64(Float64(y * 11.1667541262) + Float64(Float64(y * Float64(t - 170.12200846348443)) / z)) / z));
	elseif (z <= 2.9e-7)
		tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * 11.1667541262))))))) / Float64(0.607771387771 + Float64(z * 11.9400905721))));
	elseif (z <= 1.1e+82)
		tmp = Float64(x + Float64(Float64(Float64(Float64(y / z) * Float64(t + -170.12200846348443)) - Float64(y * -11.1667541262)) / z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (y * 3.13060547623);
	tmp = 0.0;
	if (z <= -4.8e+60)
		tmp = t_1;
	elseif (z <= -12.5)
		tmp = x + (((y * 11.1667541262) + ((y * (t - 170.12200846348443)) / z)) / z);
	elseif (z <= 2.9e-7)
		tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * 11.9400905721)));
	elseif (z <= 1.1e+82)
		tmp = x + ((((y / z) * (t + -170.12200846348443)) - (y * -11.1667541262)) / z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.8e+60], t$95$1, If[LessEqual[z, -12.5], N[(x + N[(N[(N[(y * 11.1667541262), $MachinePrecision] + N[(N[(y * N[(t - 170.12200846348443), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e-7], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * 11.1667541262), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e+82], N[(x + N[(N[(N[(N[(y / z), $MachinePrecision] * N[(t + -170.12200846348443), $MachinePrecision]), $MachinePrecision] - N[(y * -11.1667541262), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + y \cdot 3.13060547623\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -12.5:\\
\;\;\;\;x + \frac{y \cdot 11.1667541262 + \frac{y \cdot \left(t - 170.12200846348443\right)}{z}}{z}\\

\mathbf{elif}\;z \leq 2.9 \cdot 10^{-7}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\right)}{0.607771387771 + z \cdot 11.9400905721}\\

\mathbf{elif}\;z \leq 1.1 \cdot 10^{+82}:\\
\;\;\;\;x + \frac{\frac{y}{z} \cdot \left(t + -170.12200846348443\right) - y \cdot -11.1667541262}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.8e60 or 1.1000000000000001e82 < z

    1. Initial program 2.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. Simplified3.9%

      \[\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)} \]
    3. Add Preprocessing
    4. Taylor expanded in z around inf 98.1%

      \[\leadsto \color{blue}{x + 3.13060547623 \cdot y} \]
    5. Step-by-step derivation
      1. +-commutative98.1%

        \[\leadsto \color{blue}{3.13060547623 \cdot y + x} \]
      2. *-commutative98.1%

        \[\leadsto \color{blue}{y \cdot 3.13060547623} + x \]
    6. Simplified98.1%

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

    if -4.8e60 < z < -12.5

    1. Initial program 84.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 0 78.6%

      \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{11.1667541262 \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} \]
    4. Step-by-step derivation
      1. *-commutative78.6%

        \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{z \cdot 11.1667541262} + 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} \]
    5. Simplified78.6%

      \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{z \cdot 11.1667541262} + 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} \]
    6. Taylor expanded in z around inf 77.2%

      \[\leadsto x + \color{blue}{\frac{\left(11.1667541262 \cdot y + \frac{t \cdot y}{z}\right) - 170.12200846348443 \cdot \frac{y}{z}}{z}} \]
    7. Step-by-step derivation
      1. associate--l+77.2%

        \[\leadsto x + \frac{\color{blue}{11.1667541262 \cdot y + \left(\frac{t \cdot y}{z} - 170.12200846348443 \cdot \frac{y}{z}\right)}}{z} \]
      2. *-commutative77.2%

        \[\leadsto x + \frac{\color{blue}{y \cdot 11.1667541262} + \left(\frac{t \cdot y}{z} - 170.12200846348443 \cdot \frac{y}{z}\right)}{z} \]
      3. associate-*r/77.2%

        \[\leadsto x + \frac{y \cdot 11.1667541262 + \left(\frac{t \cdot y}{z} - \color{blue}{\frac{170.12200846348443 \cdot y}{z}}\right)}{z} \]
      4. div-sub77.2%

        \[\leadsto x + \frac{y \cdot 11.1667541262 + \color{blue}{\frac{t \cdot y - 170.12200846348443 \cdot y}{z}}}{z} \]
      5. distribute-rgt-out--77.2%

        \[\leadsto x + \frac{y \cdot 11.1667541262 + \frac{\color{blue}{y \cdot \left(t - 170.12200846348443\right)}}{z}}{z} \]
    8. Simplified77.2%

      \[\leadsto x + \color{blue}{\frac{y \cdot 11.1667541262 + \frac{y \cdot \left(t - 170.12200846348443\right)}{z}}{z}} \]

    if -12.5 < z < 2.8999999999999998e-7

    1. Initial program 99.8%

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

      \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{11.1667541262 \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} \]
    4. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{z \cdot 11.1667541262} + 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} \]
    5. Simplified99.8%

      \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{z \cdot 11.1667541262} + 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} \]
    6. Taylor expanded in z around 0 99.6%

      \[\leadsto x + \frac{y \cdot \left(\left(\left(z \cdot 11.1667541262 + t\right) \cdot z + a\right) \cdot z + b\right)}{\color{blue}{11.9400905721 \cdot z} + 0.607771387771} \]
    7. Step-by-step derivation
      1. *-commutative99.6%

        \[\leadsto x + \frac{y \cdot \left(\left(\left(z \cdot 11.1667541262 + t\right) \cdot z + a\right) \cdot z + b\right)}{\color{blue}{z \cdot 11.9400905721} + 0.607771387771} \]
    8. Simplified99.6%

      \[\leadsto x + \frac{y \cdot \left(\left(\left(z \cdot 11.1667541262 + t\right) \cdot z + a\right) \cdot z + b\right)}{\color{blue}{z \cdot 11.9400905721} + 0.607771387771} \]

    if 2.8999999999999998e-7 < z < 1.1000000000000001e82

    1. Initial program 71.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 0 64.7%

      \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{11.1667541262 \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} \]
    4. Step-by-step derivation
      1. *-commutative64.7%

        \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{z \cdot 11.1667541262} + 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} \]
    5. Simplified64.7%

      \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{z \cdot 11.1667541262} + 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} \]
    6. Taylor expanded in z around -inf 67.1%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 170.12200846348443 \cdot y}{z}}{z}} \]
    7. Step-by-step derivation
      1. mul-1-neg67.1%

        \[\leadsto x + \color{blue}{\left(-\frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 170.12200846348443 \cdot y}{z}}{z}\right)} \]
      2. distribute-neg-frac267.1%

        \[\leadsto x + \color{blue}{\frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 170.12200846348443 \cdot y}{z}}{-z}} \]
      3. mul-1-neg67.1%

        \[\leadsto x + \frac{-11.1667541262 \cdot y + \color{blue}{\left(-\frac{t \cdot y - 170.12200846348443 \cdot y}{z}\right)}}{-z} \]
      4. unsub-neg67.1%

        \[\leadsto x + \frac{\color{blue}{-11.1667541262 \cdot y - \frac{t \cdot y - 170.12200846348443 \cdot y}{z}}}{-z} \]
      5. *-commutative67.1%

        \[\leadsto x + \frac{\color{blue}{y \cdot -11.1667541262} - \frac{t \cdot y - 170.12200846348443 \cdot y}{z}}{-z} \]
      6. div-sub67.1%

        \[\leadsto x + \frac{y \cdot -11.1667541262 - \color{blue}{\left(\frac{t \cdot y}{z} - \frac{170.12200846348443 \cdot y}{z}\right)}}{-z} \]
      7. associate-/l*78.3%

        \[\leadsto x + \frac{y \cdot -11.1667541262 - \left(\color{blue}{t \cdot \frac{y}{z}} - \frac{170.12200846348443 \cdot y}{z}\right)}{-z} \]
      8. associate-*r/78.3%

        \[\leadsto x + \frac{y \cdot -11.1667541262 - \left(t \cdot \frac{y}{z} - \color{blue}{170.12200846348443 \cdot \frac{y}{z}}\right)}{-z} \]
      9. distribute-rgt-out--78.3%

        \[\leadsto x + \frac{y \cdot -11.1667541262 - \color{blue}{\frac{y}{z} \cdot \left(t - 170.12200846348443\right)}}{-z} \]
      10. sub-neg78.3%

        \[\leadsto x + \frac{y \cdot -11.1667541262 - \frac{y}{z} \cdot \color{blue}{\left(t + \left(-170.12200846348443\right)\right)}}{-z} \]
      11. metadata-eval78.3%

        \[\leadsto x + \frac{y \cdot -11.1667541262 - \frac{y}{z} \cdot \left(t + \color{blue}{-170.12200846348443}\right)}{-z} \]
    8. Simplified78.3%

      \[\leadsto x + \color{blue}{\frac{y \cdot -11.1667541262 - \frac{y}{z} \cdot \left(t + -170.12200846348443\right)}{-z}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification95.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{+60}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq -12.5:\\ \;\;\;\;x + \frac{y \cdot 11.1667541262 + \frac{y \cdot \left(t - 170.12200846348443\right)}{z}}{z}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-7}:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\right)}{0.607771387771 + z \cdot 11.9400905721}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+82}:\\ \;\;\;\;x + \frac{\frac{y}{z} \cdot \left(t + -170.12200846348443\right) - y \cdot -11.1667541262}{z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 93.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot 3.13060547623\\ \mathbf{if}\;z \leq -1.85 \cdot 10^{+59}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-7}:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\ \mathbf{elif}\;z \leq 1.18 \cdot 10^{+82}:\\ \;\;\;\;x + \frac{\frac{y}{z} \cdot \left(t + -170.12200846348443\right) - y \cdot -11.1667541262}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (* y 3.13060547623))))
   (if (<= z -1.85e+59)
     t_1
     (if (<= z 2.9e-7)
       (+
        x
        (/
         (* y (+ b (* z (+ a (* z (+ t (* z 11.1667541262)))))))
         (+ 0.607771387771 (* z (+ 11.9400905721 (* z 31.4690115749))))))
       (if (<= z 1.18e+82)
         (+
          x
          (/ (- (* (/ y z) (+ t -170.12200846348443)) (* y -11.1667541262)) z))
         t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (y * 3.13060547623);
	double tmp;
	if (z <= -1.85e+59) {
		tmp = t_1;
	} else if (z <= 2.9e-7) {
		tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
	} else if (z <= 1.18e+82) {
		tmp = x + ((((y / z) * (t + -170.12200846348443)) - (y * -11.1667541262)) / z);
	} 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 + (y * 3.13060547623d0)
    if (z <= (-1.85d+59)) then
        tmp = t_1
    else if (z <= 2.9d-7) then
        tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262d0))))))) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * 31.4690115749d0)))))
    else if (z <= 1.18d+82) then
        tmp = x + ((((y / z) * (t + (-170.12200846348443d0))) - (y * (-11.1667541262d0))) / z)
    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 + (y * 3.13060547623);
	double tmp;
	if (z <= -1.85e+59) {
		tmp = t_1;
	} else if (z <= 2.9e-7) {
		tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
	} else if (z <= 1.18e+82) {
		tmp = x + ((((y / z) * (t + -170.12200846348443)) - (y * -11.1667541262)) / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (y * 3.13060547623)
	tmp = 0
	if z <= -1.85e+59:
		tmp = t_1
	elif z <= 2.9e-7:
		tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))))
	elif z <= 1.18e+82:
		tmp = x + ((((y / z) * (t + -170.12200846348443)) - (y * -11.1667541262)) / z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(y * 3.13060547623))
	tmp = 0.0
	if (z <= -1.85e+59)
		tmp = t_1;
	elseif (z <= 2.9e-7)
		tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * 11.1667541262))))))) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * 31.4690115749))))));
	elseif (z <= 1.18e+82)
		tmp = Float64(x + Float64(Float64(Float64(Float64(y / z) * Float64(t + -170.12200846348443)) - Float64(y * -11.1667541262)) / z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (y * 3.13060547623);
	tmp = 0.0;
	if (z <= -1.85e+59)
		tmp = t_1;
	elseif (z <= 2.9e-7)
		tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
	elseif (z <= 1.18e+82)
		tmp = x + ((((y / z) * (t + -170.12200846348443)) - (y * -11.1667541262)) / z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.85e+59], t$95$1, If[LessEqual[z, 2.9e-7], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * 11.1667541262), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * 31.4690115749), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.18e+82], N[(x + N[(N[(N[(N[(y / z), $MachinePrecision] * N[(t + -170.12200846348443), $MachinePrecision]), $MachinePrecision] - N[(y * -11.1667541262), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + y \cdot 3.13060547623\\
\mathbf{if}\;z \leq -1.85 \cdot 10^{+59}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.9 \cdot 10^{-7}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\

\mathbf{elif}\;z \leq 1.18 \cdot 10^{+82}:\\
\;\;\;\;x + \frac{\frac{y}{z} \cdot \left(t + -170.12200846348443\right) - y \cdot -11.1667541262}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.84999999999999999e59 or 1.1800000000000001e82 < z

    1. Initial program 2.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. Simplified3.9%

      \[\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)} \]
    3. Add Preprocessing
    4. Taylor expanded in z around inf 98.1%

      \[\leadsto \color{blue}{x + 3.13060547623 \cdot y} \]
    5. Step-by-step derivation
      1. +-commutative98.1%

        \[\leadsto \color{blue}{3.13060547623 \cdot y + x} \]
      2. *-commutative98.1%

        \[\leadsto \color{blue}{y \cdot 3.13060547623} + x \]
    6. Simplified98.1%

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

    if -1.84999999999999999e59 < z < 2.8999999999999998e-7

    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 96.9%

      \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{11.1667541262 \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} \]
    4. Step-by-step derivation
      1. *-commutative96.9%

        \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{z \cdot 11.1667541262} + 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} \]
    5. Simplified96.9%

      \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{z \cdot 11.1667541262} + 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} \]
    6. Taylor expanded in z around 0 94.7%

      \[\leadsto x + \frac{y \cdot \left(\left(\left(z \cdot 11.1667541262 + t\right) \cdot z + a\right) \cdot z + b\right)}{\color{blue}{z \cdot \left(11.9400905721 + 31.4690115749 \cdot z\right)} + 0.607771387771} \]
    7. Step-by-step derivation
      1. *-commutative94.8%

        \[\leadsto 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)}{z \cdot \left(11.9400905721 + \color{blue}{z \cdot 31.4690115749}\right) + 0.607771387771} \]
    8. Simplified94.7%

      \[\leadsto x + \frac{y \cdot \left(\left(\left(z \cdot 11.1667541262 + t\right) \cdot z + a\right) \cdot z + b\right)}{\color{blue}{z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)} + 0.607771387771} \]

    if 2.8999999999999998e-7 < z < 1.1800000000000001e82

    1. Initial program 71.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 0 64.7%

      \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{11.1667541262 \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} \]
    4. Step-by-step derivation
      1. *-commutative64.7%

        \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{z \cdot 11.1667541262} + 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} \]
    5. Simplified64.7%

      \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{z \cdot 11.1667541262} + 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} \]
    6. Taylor expanded in z around -inf 67.1%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 170.12200846348443 \cdot y}{z}}{z}} \]
    7. Step-by-step derivation
      1. mul-1-neg67.1%

        \[\leadsto x + \color{blue}{\left(-\frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 170.12200846348443 \cdot y}{z}}{z}\right)} \]
      2. distribute-neg-frac267.1%

        \[\leadsto x + \color{blue}{\frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 170.12200846348443 \cdot y}{z}}{-z}} \]
      3. mul-1-neg67.1%

        \[\leadsto x + \frac{-11.1667541262 \cdot y + \color{blue}{\left(-\frac{t \cdot y - 170.12200846348443 \cdot y}{z}\right)}}{-z} \]
      4. unsub-neg67.1%

        \[\leadsto x + \frac{\color{blue}{-11.1667541262 \cdot y - \frac{t \cdot y - 170.12200846348443 \cdot y}{z}}}{-z} \]
      5. *-commutative67.1%

        \[\leadsto x + \frac{\color{blue}{y \cdot -11.1667541262} - \frac{t \cdot y - 170.12200846348443 \cdot y}{z}}{-z} \]
      6. div-sub67.1%

        \[\leadsto x + \frac{y \cdot -11.1667541262 - \color{blue}{\left(\frac{t \cdot y}{z} - \frac{170.12200846348443 \cdot y}{z}\right)}}{-z} \]
      7. associate-/l*78.3%

        \[\leadsto x + \frac{y \cdot -11.1667541262 - \left(\color{blue}{t \cdot \frac{y}{z}} - \frac{170.12200846348443 \cdot y}{z}\right)}{-z} \]
      8. associate-*r/78.3%

        \[\leadsto x + \frac{y \cdot -11.1667541262 - \left(t \cdot \frac{y}{z} - \color{blue}{170.12200846348443 \cdot \frac{y}{z}}\right)}{-z} \]
      9. distribute-rgt-out--78.3%

        \[\leadsto x + \frac{y \cdot -11.1667541262 - \color{blue}{\frac{y}{z} \cdot \left(t - 170.12200846348443\right)}}{-z} \]
      10. sub-neg78.3%

        \[\leadsto x + \frac{y \cdot -11.1667541262 - \frac{y}{z} \cdot \color{blue}{\left(t + \left(-170.12200846348443\right)\right)}}{-z} \]
      11. metadata-eval78.3%

        \[\leadsto x + \frac{y \cdot -11.1667541262 - \frac{y}{z} \cdot \left(t + \color{blue}{-170.12200846348443}\right)}{-z} \]
    8. Simplified78.3%

      \[\leadsto x + \color{blue}{\frac{y \cdot -11.1667541262 - \frac{y}{z} \cdot \left(t + -170.12200846348443\right)}{-z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification94.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+59}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-7}:\\ \;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\ \mathbf{elif}\;z \leq 1.18 \cdot 10^{+82}:\\ \;\;\;\;x + \frac{\frac{y}{z} \cdot \left(t + -170.12200846348443\right) - y \cdot -11.1667541262}{z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 90.4% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot 3.13060547623\\ \mathbf{if}\;z \leq -7.7 \cdot 10^{+59}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-7}:\\ \;\;\;\;x + \frac{y \cdot 11.1667541262 + \frac{y \cdot \left(t - 170.12200846348443\right)}{z}}{z}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-7}:\\ \;\;\;\;x + y \cdot \left(1.6453555072203998 \cdot \left(b + z \cdot a\right)\right)\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+70}:\\ \;\;\;\;x + \frac{\frac{y}{z} \cdot \left(t + -170.12200846348443\right) - y \cdot -11.1667541262}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (* y 3.13060547623))))
   (if (<= z -7.7e+59)
     t_1
     (if (<= z -1.5e-7)
       (+ x (/ (+ (* y 11.1667541262) (/ (* y (- t 170.12200846348443)) z)) z))
       (if (<= z 1.65e-7)
         (+ x (* y (* 1.6453555072203998 (+ b (* z a)))))
         (if (<= z 1.2e+70)
           (+
            x
            (/
             (- (* (/ y z) (+ t -170.12200846348443)) (* y -11.1667541262))
             z))
           t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (y * 3.13060547623);
	double tmp;
	if (z <= -7.7e+59) {
		tmp = t_1;
	} else if (z <= -1.5e-7) {
		tmp = x + (((y * 11.1667541262) + ((y * (t - 170.12200846348443)) / z)) / z);
	} else if (z <= 1.65e-7) {
		tmp = x + (y * (1.6453555072203998 * (b + (z * a))));
	} else if (z <= 1.2e+70) {
		tmp = x + ((((y / z) * (t + -170.12200846348443)) - (y * -11.1667541262)) / z);
	} 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 + (y * 3.13060547623d0)
    if (z <= (-7.7d+59)) then
        tmp = t_1
    else if (z <= (-1.5d-7)) then
        tmp = x + (((y * 11.1667541262d0) + ((y * (t - 170.12200846348443d0)) / z)) / z)
    else if (z <= 1.65d-7) then
        tmp = x + (y * (1.6453555072203998d0 * (b + (z * a))))
    else if (z <= 1.2d+70) then
        tmp = x + ((((y / z) * (t + (-170.12200846348443d0))) - (y * (-11.1667541262d0))) / z)
    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 + (y * 3.13060547623);
	double tmp;
	if (z <= -7.7e+59) {
		tmp = t_1;
	} else if (z <= -1.5e-7) {
		tmp = x + (((y * 11.1667541262) + ((y * (t - 170.12200846348443)) / z)) / z);
	} else if (z <= 1.65e-7) {
		tmp = x + (y * (1.6453555072203998 * (b + (z * a))));
	} else if (z <= 1.2e+70) {
		tmp = x + ((((y / z) * (t + -170.12200846348443)) - (y * -11.1667541262)) / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (y * 3.13060547623)
	tmp = 0
	if z <= -7.7e+59:
		tmp = t_1
	elif z <= -1.5e-7:
		tmp = x + (((y * 11.1667541262) + ((y * (t - 170.12200846348443)) / z)) / z)
	elif z <= 1.65e-7:
		tmp = x + (y * (1.6453555072203998 * (b + (z * a))))
	elif z <= 1.2e+70:
		tmp = x + ((((y / z) * (t + -170.12200846348443)) - (y * -11.1667541262)) / z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(y * 3.13060547623))
	tmp = 0.0
	if (z <= -7.7e+59)
		tmp = t_1;
	elseif (z <= -1.5e-7)
		tmp = Float64(x + Float64(Float64(Float64(y * 11.1667541262) + Float64(Float64(y * Float64(t - 170.12200846348443)) / z)) / z));
	elseif (z <= 1.65e-7)
		tmp = Float64(x + Float64(y * Float64(1.6453555072203998 * Float64(b + Float64(z * a)))));
	elseif (z <= 1.2e+70)
		tmp = Float64(x + Float64(Float64(Float64(Float64(y / z) * Float64(t + -170.12200846348443)) - Float64(y * -11.1667541262)) / z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (y * 3.13060547623);
	tmp = 0.0;
	if (z <= -7.7e+59)
		tmp = t_1;
	elseif (z <= -1.5e-7)
		tmp = x + (((y * 11.1667541262) + ((y * (t - 170.12200846348443)) / z)) / z);
	elseif (z <= 1.65e-7)
		tmp = x + (y * (1.6453555072203998 * (b + (z * a))));
	elseif (z <= 1.2e+70)
		tmp = x + ((((y / z) * (t + -170.12200846348443)) - (y * -11.1667541262)) / z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.7e+59], t$95$1, If[LessEqual[z, -1.5e-7], N[(x + N[(N[(N[(y * 11.1667541262), $MachinePrecision] + N[(N[(y * N[(t - 170.12200846348443), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e-7], N[(x + N[(y * N[(1.6453555072203998 * N[(b + N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e+70], N[(x + N[(N[(N[(N[(y / z), $MachinePrecision] * N[(t + -170.12200846348443), $MachinePrecision]), $MachinePrecision] - N[(y * -11.1667541262), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + y \cdot 3.13060547623\\
\mathbf{if}\;z \leq -7.7 \cdot 10^{+59}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.5 \cdot 10^{-7}:\\
\;\;\;\;x + \frac{y \cdot 11.1667541262 + \frac{y \cdot \left(t - 170.12200846348443\right)}{z}}{z}\\

\mathbf{elif}\;z \leq 1.65 \cdot 10^{-7}:\\
\;\;\;\;x + y \cdot \left(1.6453555072203998 \cdot \left(b + z \cdot a\right)\right)\\

\mathbf{elif}\;z \leq 1.2 \cdot 10^{+70}:\\
\;\;\;\;x + \frac{\frac{y}{z} \cdot \left(t + -170.12200846348443\right) - y \cdot -11.1667541262}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.69999999999999986e59 or 1.19999999999999993e70 < z

    1. Initial program 2.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. Simplified3.9%

      \[\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)} \]
    3. Add Preprocessing
    4. Taylor expanded in z around inf 98.1%

      \[\leadsto \color{blue}{x + 3.13060547623 \cdot y} \]
    5. Step-by-step derivation
      1. +-commutative98.1%

        \[\leadsto \color{blue}{3.13060547623 \cdot y + x} \]
      2. *-commutative98.1%

        \[\leadsto \color{blue}{y \cdot 3.13060547623} + x \]
    6. Simplified98.1%

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

    if -7.69999999999999986e59 < z < -1.4999999999999999e-7

    1. Initial program 84.9%

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

      \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{11.1667541262 \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} \]
    4. Step-by-step derivation
      1. *-commutative79.7%

        \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{z \cdot 11.1667541262} + 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} \]
    5. Simplified79.7%

      \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{z \cdot 11.1667541262} + 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} \]
    6. Taylor expanded in z around inf 73.6%

      \[\leadsto x + \color{blue}{\frac{\left(11.1667541262 \cdot y + \frac{t \cdot y}{z}\right) - 170.12200846348443 \cdot \frac{y}{z}}{z}} \]
    7. Step-by-step derivation
      1. associate--l+73.6%

        \[\leadsto x + \frac{\color{blue}{11.1667541262 \cdot y + \left(\frac{t \cdot y}{z} - 170.12200846348443 \cdot \frac{y}{z}\right)}}{z} \]
      2. *-commutative73.6%

        \[\leadsto x + \frac{\color{blue}{y \cdot 11.1667541262} + \left(\frac{t \cdot y}{z} - 170.12200846348443 \cdot \frac{y}{z}\right)}{z} \]
      3. associate-*r/73.6%

        \[\leadsto x + \frac{y \cdot 11.1667541262 + \left(\frac{t \cdot y}{z} - \color{blue}{\frac{170.12200846348443 \cdot y}{z}}\right)}{z} \]
      4. div-sub73.6%

        \[\leadsto x + \frac{y \cdot 11.1667541262 + \color{blue}{\frac{t \cdot y - 170.12200846348443 \cdot y}{z}}}{z} \]
      5. distribute-rgt-out--73.6%

        \[\leadsto x + \frac{y \cdot 11.1667541262 + \frac{\color{blue}{y \cdot \left(t - 170.12200846348443\right)}}{z}}{z} \]
    8. Simplified73.6%

      \[\leadsto x + \color{blue}{\frac{y \cdot 11.1667541262 + \frac{y \cdot \left(t - 170.12200846348443\right)}{z}}{z}} \]

    if -1.4999999999999999e-7 < z < 1.6500000000000001e-7

    1. Initial program 99.8%

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

      \[\leadsto x + \color{blue}{\left(1.6453555072203998 \cdot \left(b \cdot y\right) + z \cdot \left(1.6453555072203998 \cdot \left(a \cdot y\right) - 32.324150453290734 \cdot \left(b \cdot y\right)\right)\right)} \]
    4. Taylor expanded in a around inf 93.7%

      \[\leadsto x + \left(1.6453555072203998 \cdot \left(b \cdot y\right) + \color{blue}{1.6453555072203998 \cdot \left(a \cdot \left(y \cdot z\right)\right)}\right) \]
    5. Taylor expanded in y around 0 96.4%

      \[\leadsto x + \color{blue}{y \cdot \left(1.6453555072203998 \cdot b + 1.6453555072203998 \cdot \left(a \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. distribute-lft-out96.4%

        \[\leadsto x + y \cdot \color{blue}{\left(1.6453555072203998 \cdot \left(b + a \cdot z\right)\right)} \]
      2. *-commutative96.4%

        \[\leadsto x + y \cdot \left(1.6453555072203998 \cdot \left(b + \color{blue}{z \cdot a}\right)\right) \]
    7. Simplified96.4%

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

    if 1.6500000000000001e-7 < z < 1.19999999999999993e70

    1. Initial program 71.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 0 64.7%

      \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{11.1667541262 \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} \]
    4. Step-by-step derivation
      1. *-commutative64.7%

        \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{z \cdot 11.1667541262} + 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} \]
    5. Simplified64.7%

      \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{z \cdot 11.1667541262} + 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} \]
    6. Taylor expanded in z around -inf 67.1%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 170.12200846348443 \cdot y}{z}}{z}} \]
    7. Step-by-step derivation
      1. mul-1-neg67.1%

        \[\leadsto x + \color{blue}{\left(-\frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 170.12200846348443 \cdot y}{z}}{z}\right)} \]
      2. distribute-neg-frac267.1%

        \[\leadsto x + \color{blue}{\frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 170.12200846348443 \cdot y}{z}}{-z}} \]
      3. mul-1-neg67.1%

        \[\leadsto x + \frac{-11.1667541262 \cdot y + \color{blue}{\left(-\frac{t \cdot y - 170.12200846348443 \cdot y}{z}\right)}}{-z} \]
      4. unsub-neg67.1%

        \[\leadsto x + \frac{\color{blue}{-11.1667541262 \cdot y - \frac{t \cdot y - 170.12200846348443 \cdot y}{z}}}{-z} \]
      5. *-commutative67.1%

        \[\leadsto x + \frac{\color{blue}{y \cdot -11.1667541262} - \frac{t \cdot y - 170.12200846348443 \cdot y}{z}}{-z} \]
      6. div-sub67.1%

        \[\leadsto x + \frac{y \cdot -11.1667541262 - \color{blue}{\left(\frac{t \cdot y}{z} - \frac{170.12200846348443 \cdot y}{z}\right)}}{-z} \]
      7. associate-/l*78.3%

        \[\leadsto x + \frac{y \cdot -11.1667541262 - \left(\color{blue}{t \cdot \frac{y}{z}} - \frac{170.12200846348443 \cdot y}{z}\right)}{-z} \]
      8. associate-*r/78.3%

        \[\leadsto x + \frac{y \cdot -11.1667541262 - \left(t \cdot \frac{y}{z} - \color{blue}{170.12200846348443 \cdot \frac{y}{z}}\right)}{-z} \]
      9. distribute-rgt-out--78.3%

        \[\leadsto x + \frac{y \cdot -11.1667541262 - \color{blue}{\frac{y}{z} \cdot \left(t - 170.12200846348443\right)}}{-z} \]
      10. sub-neg78.3%

        \[\leadsto x + \frac{y \cdot -11.1667541262 - \frac{y}{z} \cdot \color{blue}{\left(t + \left(-170.12200846348443\right)\right)}}{-z} \]
      11. metadata-eval78.3%

        \[\leadsto x + \frac{y \cdot -11.1667541262 - \frac{y}{z} \cdot \left(t + \color{blue}{-170.12200846348443}\right)}{-z} \]
    8. Simplified78.3%

      \[\leadsto x + \color{blue}{\frac{y \cdot -11.1667541262 - \frac{y}{z} \cdot \left(t + -170.12200846348443\right)}{-z}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification93.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.7 \cdot 10^{+59}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-7}:\\ \;\;\;\;x + \frac{y \cdot 11.1667541262 + \frac{y \cdot \left(t - 170.12200846348443\right)}{z}}{z}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-7}:\\ \;\;\;\;x + y \cdot \left(1.6453555072203998 \cdot \left(b + z \cdot a\right)\right)\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+70}:\\ \;\;\;\;x + \frac{\frac{y}{z} \cdot \left(t + -170.12200846348443\right) - y \cdot -11.1667541262}{z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 89.4% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot 3.13060547623\\ \mathbf{if}\;z \leq -1.88 \cdot 10^{+59}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.45 \cdot 10^{-7}:\\ \;\;\;\;x + \frac{y \cdot 11.1667541262 + \frac{y \cdot \left(t - 170.12200846348443\right)}{z}}{z}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+66}:\\ \;\;\;\;x + y \cdot \left(1.6453555072203998 \cdot \left(b + z \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (* y 3.13060547623))))
   (if (<= z -1.88e+59)
     t_1
     (if (<= z -1.45e-7)
       (+ x (/ (+ (* y 11.1667541262) (/ (* y (- t 170.12200846348443)) z)) z))
       (if (<= z 2.2e+66)
         (+ x (* y (* 1.6453555072203998 (+ b (* z a)))))
         t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (y * 3.13060547623);
	double tmp;
	if (z <= -1.88e+59) {
		tmp = t_1;
	} else if (z <= -1.45e-7) {
		tmp = x + (((y * 11.1667541262) + ((y * (t - 170.12200846348443)) / z)) / z);
	} else if (z <= 2.2e+66) {
		tmp = x + (y * (1.6453555072203998 * (b + (z * a))));
	} 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 + (y * 3.13060547623d0)
    if (z <= (-1.88d+59)) then
        tmp = t_1
    else if (z <= (-1.45d-7)) then
        tmp = x + (((y * 11.1667541262d0) + ((y * (t - 170.12200846348443d0)) / z)) / z)
    else if (z <= 2.2d+66) then
        tmp = x + (y * (1.6453555072203998d0 * (b + (z * a))))
    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 + (y * 3.13060547623);
	double tmp;
	if (z <= -1.88e+59) {
		tmp = t_1;
	} else if (z <= -1.45e-7) {
		tmp = x + (((y * 11.1667541262) + ((y * (t - 170.12200846348443)) / z)) / z);
	} else if (z <= 2.2e+66) {
		tmp = x + (y * (1.6453555072203998 * (b + (z * a))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (y * 3.13060547623)
	tmp = 0
	if z <= -1.88e+59:
		tmp = t_1
	elif z <= -1.45e-7:
		tmp = x + (((y * 11.1667541262) + ((y * (t - 170.12200846348443)) / z)) / z)
	elif z <= 2.2e+66:
		tmp = x + (y * (1.6453555072203998 * (b + (z * a))))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(y * 3.13060547623))
	tmp = 0.0
	if (z <= -1.88e+59)
		tmp = t_1;
	elseif (z <= -1.45e-7)
		tmp = Float64(x + Float64(Float64(Float64(y * 11.1667541262) + Float64(Float64(y * Float64(t - 170.12200846348443)) / z)) / z));
	elseif (z <= 2.2e+66)
		tmp = Float64(x + Float64(y * Float64(1.6453555072203998 * Float64(b + Float64(z * a)))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (y * 3.13060547623);
	tmp = 0.0;
	if (z <= -1.88e+59)
		tmp = t_1;
	elseif (z <= -1.45e-7)
		tmp = x + (((y * 11.1667541262) + ((y * (t - 170.12200846348443)) / z)) / z);
	elseif (z <= 2.2e+66)
		tmp = x + (y * (1.6453555072203998 * (b + (z * a))));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.88e+59], t$95$1, If[LessEqual[z, -1.45e-7], N[(x + N[(N[(N[(y * 11.1667541262), $MachinePrecision] + N[(N[(y * N[(t - 170.12200846348443), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e+66], N[(x + N[(y * N[(1.6453555072203998 * N[(b + N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + y \cdot 3.13060547623\\
\mathbf{if}\;z \leq -1.88 \cdot 10^{+59}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.45 \cdot 10^{-7}:\\
\;\;\;\;x + \frac{y \cdot 11.1667541262 + \frac{y \cdot \left(t - 170.12200846348443\right)}{z}}{z}\\

\mathbf{elif}\;z \leq 2.2 \cdot 10^{+66}:\\
\;\;\;\;x + y \cdot \left(1.6453555072203998 \cdot \left(b + z \cdot a\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.87999999999999989e59 or 2.1999999999999998e66 < z

    1. Initial program 3.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. Simplified4.8%

      \[\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)} \]
    3. Add Preprocessing
    4. Taylor expanded in z around inf 97.2%

      \[\leadsto \color{blue}{x + 3.13060547623 \cdot y} \]
    5. Step-by-step derivation
      1. +-commutative97.2%

        \[\leadsto \color{blue}{3.13060547623 \cdot y + x} \]
      2. *-commutative97.2%

        \[\leadsto \color{blue}{y \cdot 3.13060547623} + x \]
    6. Simplified97.2%

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

    if -1.87999999999999989e59 < z < -1.4499999999999999e-7

    1. Initial program 84.9%

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

      \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{11.1667541262 \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} \]
    4. Step-by-step derivation
      1. *-commutative79.7%

        \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{z \cdot 11.1667541262} + 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} \]
    5. Simplified79.7%

      \[\leadsto x + \frac{y \cdot \left(\left(\left(\color{blue}{z \cdot 11.1667541262} + 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} \]
    6. Taylor expanded in z around inf 73.6%

      \[\leadsto x + \color{blue}{\frac{\left(11.1667541262 \cdot y + \frac{t \cdot y}{z}\right) - 170.12200846348443 \cdot \frac{y}{z}}{z}} \]
    7. Step-by-step derivation
      1. associate--l+73.6%

        \[\leadsto x + \frac{\color{blue}{11.1667541262 \cdot y + \left(\frac{t \cdot y}{z} - 170.12200846348443 \cdot \frac{y}{z}\right)}}{z} \]
      2. *-commutative73.6%

        \[\leadsto x + \frac{\color{blue}{y \cdot 11.1667541262} + \left(\frac{t \cdot y}{z} - 170.12200846348443 \cdot \frac{y}{z}\right)}{z} \]
      3. associate-*r/73.6%

        \[\leadsto x + \frac{y \cdot 11.1667541262 + \left(\frac{t \cdot y}{z} - \color{blue}{\frac{170.12200846348443 \cdot y}{z}}\right)}{z} \]
      4. div-sub73.6%

        \[\leadsto x + \frac{y \cdot 11.1667541262 + \color{blue}{\frac{t \cdot y - 170.12200846348443 \cdot y}{z}}}{z} \]
      5. distribute-rgt-out--73.6%

        \[\leadsto x + \frac{y \cdot 11.1667541262 + \frac{\color{blue}{y \cdot \left(t - 170.12200846348443\right)}}{z}}{z} \]
    8. Simplified73.6%

      \[\leadsto x + \color{blue}{\frac{y \cdot 11.1667541262 + \frac{y \cdot \left(t - 170.12200846348443\right)}{z}}{z}} \]

    if -1.4499999999999999e-7 < z < 2.1999999999999998e66

    1. Initial program 94.9%

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

      \[\leadsto x + \color{blue}{\left(1.6453555072203998 \cdot \left(b \cdot y\right) + z \cdot \left(1.6453555072203998 \cdot \left(a \cdot y\right) - 32.324150453290734 \cdot \left(b \cdot y\right)\right)\right)} \]
    4. Taylor expanded in a around inf 86.2%

      \[\leadsto x + \left(1.6453555072203998 \cdot \left(b \cdot y\right) + \color{blue}{1.6453555072203998 \cdot \left(a \cdot \left(y \cdot z\right)\right)}\right) \]
    5. Taylor expanded in y around 0 89.1%

      \[\leadsto x + \color{blue}{y \cdot \left(1.6453555072203998 \cdot b + 1.6453555072203998 \cdot \left(a \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. distribute-lft-out89.1%

        \[\leadsto x + y \cdot \color{blue}{\left(1.6453555072203998 \cdot \left(b + a \cdot z\right)\right)} \]
      2. *-commutative89.1%

        \[\leadsto x + y \cdot \left(1.6453555072203998 \cdot \left(b + \color{blue}{z \cdot a}\right)\right) \]
    7. Simplified89.1%

      \[\leadsto x + \color{blue}{y \cdot \left(1.6453555072203998 \cdot \left(b + z \cdot a\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification91.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.88 \cdot 10^{+59}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq -1.45 \cdot 10^{-7}:\\ \;\;\;\;x + \frac{y \cdot 11.1667541262 + \frac{y \cdot \left(t - 170.12200846348443\right)}{z}}{z}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+66}:\\ \;\;\;\;x + y \cdot \left(1.6453555072203998 \cdot \left(b + z \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 89.3% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6000000:\\ \;\;\;\;x + y \cdot \left(3.13060547623 + \frac{-36.52704169880642}{z}\right)\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+66}:\\ \;\;\;\;x + y \cdot \left(1.6453555072203998 \cdot \left(b + z \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= z -6000000.0)
   (+ x (* y (+ 3.13060547623 (/ -36.52704169880642 z))))
   (if (<= z 2.2e+66)
     (+ x (* y (* 1.6453555072203998 (+ b (* z a)))))
     (+ x (* y 3.13060547623)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -6000000.0) {
		tmp = x + (y * (3.13060547623 + (-36.52704169880642 / z)));
	} else if (z <= 2.2e+66) {
		tmp = x + (y * (1.6453555072203998 * (b + (z * a))));
	} else {
		tmp = x + (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 (z <= (-6000000.0d0)) then
        tmp = x + (y * (3.13060547623d0 + ((-36.52704169880642d0) / z)))
    else if (z <= 2.2d+66) then
        tmp = x + (y * (1.6453555072203998d0 * (b + (z * a))))
    else
        tmp = x + (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 (z <= -6000000.0) {
		tmp = x + (y * (3.13060547623 + (-36.52704169880642 / z)));
	} else if (z <= 2.2e+66) {
		tmp = x + (y * (1.6453555072203998 * (b + (z * a))));
	} else {
		tmp = x + (y * 3.13060547623);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if z <= -6000000.0:
		tmp = x + (y * (3.13060547623 + (-36.52704169880642 / z)))
	elif z <= 2.2e+66:
		tmp = x + (y * (1.6453555072203998 * (b + (z * a))))
	else:
		tmp = x + (y * 3.13060547623)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (z <= -6000000.0)
		tmp = Float64(x + Float64(y * Float64(3.13060547623 + Float64(-36.52704169880642 / z))));
	elseif (z <= 2.2e+66)
		tmp = Float64(x + Float64(y * Float64(1.6453555072203998 * Float64(b + Float64(z * a)))));
	else
		tmp = Float64(x + Float64(y * 3.13060547623));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (z <= -6000000.0)
		tmp = x + (y * (3.13060547623 + (-36.52704169880642 / z)));
	elseif (z <= 2.2e+66)
		tmp = x + (y * (1.6453555072203998 * (b + (z * a))));
	else
		tmp = x + (y * 3.13060547623);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -6000000.0], N[(x + N[(y * N[(3.13060547623 + N[(-36.52704169880642 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e+66], N[(x + N[(y * N[(1.6453555072203998 * N[(b + N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6000000:\\
\;\;\;\;x + y \cdot \left(3.13060547623 + \frac{-36.52704169880642}{z}\right)\\

\mathbf{elif}\;z \leq 2.2 \cdot 10^{+66}:\\
\;\;\;\;x + y \cdot \left(1.6453555072203998 \cdot \left(b + z \cdot a\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6e6

    1. Initial program 20.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. Simplified22.7%

      \[\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)} \]
    3. Add Preprocessing
    4. Taylor expanded in z around -inf 84.5%

      \[\leadsto \color{blue}{x + \left(-1 \cdot \frac{-11.1667541262 \cdot y - -47.69379582500642 \cdot y}{z} + 3.13060547623 \cdot y\right)} \]
    5. Step-by-step derivation
      1. +-commutative84.5%

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{-11.1667541262 \cdot y - -47.69379582500642 \cdot y}{z} + 3.13060547623 \cdot y\right) + x} \]
      2. +-commutative84.5%

        \[\leadsto \color{blue}{\left(3.13060547623 \cdot y + -1 \cdot \frac{-11.1667541262 \cdot y - -47.69379582500642 \cdot y}{z}\right)} + x \]
      3. mul-1-neg84.5%

        \[\leadsto \left(3.13060547623 \cdot y + \color{blue}{\left(-\frac{-11.1667541262 \cdot y - -47.69379582500642 \cdot y}{z}\right)}\right) + x \]
      4. unsub-neg84.5%

        \[\leadsto \color{blue}{\left(3.13060547623 \cdot y - \frac{-11.1667541262 \cdot y - -47.69379582500642 \cdot y}{z}\right)} + x \]
      5. *-commutative84.5%

        \[\leadsto \left(\color{blue}{y \cdot 3.13060547623} - \frac{-11.1667541262 \cdot y - -47.69379582500642 \cdot y}{z}\right) + x \]
      6. distribute-rgt-out--84.5%

        \[\leadsto \left(y \cdot 3.13060547623 - \frac{\color{blue}{y \cdot \left(-11.1667541262 - -47.69379582500642\right)}}{z}\right) + x \]
      7. metadata-eval84.5%

        \[\leadsto \left(y \cdot 3.13060547623 - \frac{y \cdot \color{blue}{36.52704169880642}}{z}\right) + x \]
    6. Simplified84.5%

      \[\leadsto \color{blue}{\left(y \cdot 3.13060547623 - \frac{y \cdot 36.52704169880642}{z}\right) + x} \]
    7. Taylor expanded in y around 0 84.5%

      \[\leadsto \color{blue}{y \cdot \left(3.13060547623 - 36.52704169880642 \cdot \frac{1}{z}\right)} + x \]
    8. Step-by-step derivation
      1. associate-*r/84.5%

        \[\leadsto y \cdot \left(3.13060547623 - \color{blue}{\frac{36.52704169880642 \cdot 1}{z}}\right) + x \]
      2. metadata-eval84.5%

        \[\leadsto y \cdot \left(3.13060547623 - \frac{\color{blue}{36.52704169880642}}{z}\right) + x \]
      3. sub-neg84.5%

        \[\leadsto y \cdot \color{blue}{\left(3.13060547623 + \left(-\frac{36.52704169880642}{z}\right)\right)} + x \]
      4. distribute-neg-frac84.5%

        \[\leadsto y \cdot \left(3.13060547623 + \color{blue}{\frac{-36.52704169880642}{z}}\right) + x \]
      5. metadata-eval84.5%

        \[\leadsto y \cdot \left(3.13060547623 + \frac{\color{blue}{-36.52704169880642}}{z}\right) + x \]
    9. Simplified84.5%

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

    if -6e6 < z < 2.1999999999999998e66

    1. Initial program 95.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 80.8%

      \[\leadsto x + \color{blue}{\left(1.6453555072203998 \cdot \left(b \cdot y\right) + z \cdot \left(1.6453555072203998 \cdot \left(a \cdot y\right) - 32.324150453290734 \cdot \left(b \cdot y\right)\right)\right)} \]
    4. Taylor expanded in a around inf 85.8%

      \[\leadsto x + \left(1.6453555072203998 \cdot \left(b \cdot y\right) + \color{blue}{1.6453555072203998 \cdot \left(a \cdot \left(y \cdot z\right)\right)}\right) \]
    5. Taylor expanded in y around 0 88.7%

      \[\leadsto x + \color{blue}{y \cdot \left(1.6453555072203998 \cdot b + 1.6453555072203998 \cdot \left(a \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. distribute-lft-out88.7%

        \[\leadsto x + y \cdot \color{blue}{\left(1.6453555072203998 \cdot \left(b + a \cdot z\right)\right)} \]
      2. *-commutative88.7%

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

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

    if 2.1999999999999998e66 < z

    1. Initial program 2.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. Simplified2.1%

      \[\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)} \]
    3. Add Preprocessing
    4. Taylor expanded in z around inf 98.0%

      \[\leadsto \color{blue}{x + 3.13060547623 \cdot y} \]
    5. Step-by-step derivation
      1. +-commutative98.0%

        \[\leadsto \color{blue}{3.13060547623 \cdot y + x} \]
      2. *-commutative98.0%

        \[\leadsto \color{blue}{y \cdot 3.13060547623} + x \]
    6. Simplified98.0%

      \[\leadsto \color{blue}{y \cdot 3.13060547623 + x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification89.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6000000:\\ \;\;\;\;x + y \cdot \left(3.13060547623 + \frac{-36.52704169880642}{z}\right)\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+66}:\\ \;\;\;\;x + y \cdot \left(1.6453555072203998 \cdot \left(b + z \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 82.8% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{-7} \lor \neg \left(z \leq 4.5 \cdot 10^{-22}\right):\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= z -1.5e-7) (not (<= z 4.5e-22)))
   (+ x (* y 3.13060547623))
   (+ x (* y (* b 1.6453555072203998)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((z <= -1.5e-7) || !(z <= 4.5e-22)) {
		tmp = x + (y * 3.13060547623);
	} else {
		tmp = x + (y * (b * 1.6453555072203998));
	}
	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 ((z <= (-1.5d-7)) .or. (.not. (z <= 4.5d-22))) then
        tmp = x + (y * 3.13060547623d0)
    else
        tmp = x + (y * (b * 1.6453555072203998d0))
    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 ((z <= -1.5e-7) || !(z <= 4.5e-22)) {
		tmp = x + (y * 3.13060547623);
	} else {
		tmp = x + (y * (b * 1.6453555072203998));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (z <= -1.5e-7) or not (z <= 4.5e-22):
		tmp = x + (y * 3.13060547623)
	else:
		tmp = x + (y * (b * 1.6453555072203998))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((z <= -1.5e-7) || !(z <= 4.5e-22))
		tmp = Float64(x + Float64(y * 3.13060547623));
	else
		tmp = Float64(x + Float64(y * Float64(b * 1.6453555072203998)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((z <= -1.5e-7) || ~((z <= 4.5e-22)))
		tmp = x + (y * 3.13060547623);
	else
		tmp = x + (y * (b * 1.6453555072203998));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.5e-7], N[Not[LessEqual[z, 4.5e-22]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{-7} \lor \neg \left(z \leq 4.5 \cdot 10^{-22}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.4999999999999999e-7 or 4.49999999999999987e-22 < z

    1. Initial program 24.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. Simplified28.8%

      \[\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)} \]
    3. Add Preprocessing
    4. Taylor expanded in z around inf 83.0%

      \[\leadsto \color{blue}{x + 3.13060547623 \cdot y} \]
    5. Step-by-step derivation
      1. +-commutative83.0%

        \[\leadsto \color{blue}{3.13060547623 \cdot y + x} \]
      2. *-commutative83.0%

        \[\leadsto \color{blue}{y \cdot 3.13060547623} + x \]
    6. Simplified83.0%

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

    if -1.4999999999999999e-7 < z < 4.49999999999999987e-22

    1. Initial program 99.8%

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

      \[\leadsto x + \color{blue}{1.6453555072203998 \cdot \left(b \cdot y\right)} \]
    4. Step-by-step derivation
      1. associate-*r*80.5%

        \[\leadsto x + \color{blue}{\left(1.6453555072203998 \cdot b\right) \cdot y} \]
      2. *-commutative80.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{-7} \lor \neg \left(z \leq 4.5 \cdot 10^{-22}\right):\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 81.9% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{-54}:\\ \;\;\;\;x + y \cdot \left(3.13060547623 + \frac{-36.52704169880642}{z}\right)\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-22}:\\ \;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= z -4.2e-54)
   (+ x (* y (+ 3.13060547623 (/ -36.52704169880642 z))))
   (if (<= z 4.5e-22)
     (+ x (* y (* b 1.6453555072203998)))
     (+ x (* y 3.13060547623)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -4.2e-54) {
		tmp = x + (y * (3.13060547623 + (-36.52704169880642 / z)));
	} else if (z <= 4.5e-22) {
		tmp = x + (y * (b * 1.6453555072203998));
	} else {
		tmp = x + (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 (z <= (-4.2d-54)) then
        tmp = x + (y * (3.13060547623d0 + ((-36.52704169880642d0) / z)))
    else if (z <= 4.5d-22) then
        tmp = x + (y * (b * 1.6453555072203998d0))
    else
        tmp = x + (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 (z <= -4.2e-54) {
		tmp = x + (y * (3.13060547623 + (-36.52704169880642 / z)));
	} else if (z <= 4.5e-22) {
		tmp = x + (y * (b * 1.6453555072203998));
	} else {
		tmp = x + (y * 3.13060547623);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if z <= -4.2e-54:
		tmp = x + (y * (3.13060547623 + (-36.52704169880642 / z)))
	elif z <= 4.5e-22:
		tmp = x + (y * (b * 1.6453555072203998))
	else:
		tmp = x + (y * 3.13060547623)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (z <= -4.2e-54)
		tmp = Float64(x + Float64(y * Float64(3.13060547623 + Float64(-36.52704169880642 / z))));
	elseif (z <= 4.5e-22)
		tmp = Float64(x + Float64(y * Float64(b * 1.6453555072203998)));
	else
		tmp = Float64(x + Float64(y * 3.13060547623));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (z <= -4.2e-54)
		tmp = x + (y * (3.13060547623 + (-36.52704169880642 / z)));
	elseif (z <= 4.5e-22)
		tmp = x + (y * (b * 1.6453555072203998));
	else
		tmp = x + (y * 3.13060547623);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.2e-54], N[(x + N[(y * N[(3.13060547623 + N[(-36.52704169880642 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e-22], N[(x + N[(y * N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-54}:\\
\;\;\;\;x + y \cdot \left(3.13060547623 + \frac{-36.52704169880642}{z}\right)\\

\mathbf{elif}\;z \leq 4.5 \cdot 10^{-22}:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.2e-54

    1. Initial program 29.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. Simplified31.4%

      \[\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)} \]
    3. Add Preprocessing
    4. Taylor expanded in z around -inf 82.7%

      \[\leadsto \color{blue}{x + \left(-1 \cdot \frac{-11.1667541262 \cdot y - -47.69379582500642 \cdot y}{z} + 3.13060547623 \cdot y\right)} \]
    5. Step-by-step derivation
      1. +-commutative82.7%

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{-11.1667541262 \cdot y - -47.69379582500642 \cdot y}{z} + 3.13060547623 \cdot y\right) + x} \]
      2. +-commutative82.7%

        \[\leadsto \color{blue}{\left(3.13060547623 \cdot y + -1 \cdot \frac{-11.1667541262 \cdot y - -47.69379582500642 \cdot y}{z}\right)} + x \]
      3. mul-1-neg82.7%

        \[\leadsto \left(3.13060547623 \cdot y + \color{blue}{\left(-\frac{-11.1667541262 \cdot y - -47.69379582500642 \cdot y}{z}\right)}\right) + x \]
      4. unsub-neg82.7%

        \[\leadsto \color{blue}{\left(3.13060547623 \cdot y - \frac{-11.1667541262 \cdot y - -47.69379582500642 \cdot y}{z}\right)} + x \]
      5. *-commutative82.7%

        \[\leadsto \left(\color{blue}{y \cdot 3.13060547623} - \frac{-11.1667541262 \cdot y - -47.69379582500642 \cdot y}{z}\right) + x \]
      6. distribute-rgt-out--82.7%

        \[\leadsto \left(y \cdot 3.13060547623 - \frac{\color{blue}{y \cdot \left(-11.1667541262 - -47.69379582500642\right)}}{z}\right) + x \]
      7. metadata-eval82.7%

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

      \[\leadsto \color{blue}{\left(y \cdot 3.13060547623 - \frac{y \cdot 36.52704169880642}{z}\right) + x} \]
    7. Taylor expanded in y around 0 82.7%

      \[\leadsto \color{blue}{y \cdot \left(3.13060547623 - 36.52704169880642 \cdot \frac{1}{z}\right)} + x \]
    8. Step-by-step derivation
      1. associate-*r/82.7%

        \[\leadsto y \cdot \left(3.13060547623 - \color{blue}{\frac{36.52704169880642 \cdot 1}{z}}\right) + x \]
      2. metadata-eval82.7%

        \[\leadsto y \cdot \left(3.13060547623 - \frac{\color{blue}{36.52704169880642}}{z}\right) + x \]
      3. sub-neg82.7%

        \[\leadsto y \cdot \color{blue}{\left(3.13060547623 + \left(-\frac{36.52704169880642}{z}\right)\right)} + x \]
      4. distribute-neg-frac82.7%

        \[\leadsto y \cdot \left(3.13060547623 + \color{blue}{\frac{-36.52704169880642}{z}}\right) + x \]
      5. metadata-eval82.7%

        \[\leadsto y \cdot \left(3.13060547623 + \frac{\color{blue}{-36.52704169880642}}{z}\right) + x \]
    9. Simplified82.7%

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

    if -4.2e-54 < z < 4.49999999999999987e-22

    1. Initial program 99.8%

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

      \[\leadsto x + \color{blue}{1.6453555072203998 \cdot \left(b \cdot y\right)} \]
    4. Step-by-step derivation
      1. associate-*r*80.4%

        \[\leadsto x + \color{blue}{\left(1.6453555072203998 \cdot b\right) \cdot y} \]
      2. *-commutative80.4%

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

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

    if 4.49999999999999987e-22 < z

    1. Initial program 24.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. Simplified31.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)} \]
    3. Add Preprocessing
    4. Taylor expanded in z around inf 83.7%

      \[\leadsto \color{blue}{x + 3.13060547623 \cdot y} \]
    5. Step-by-step derivation
      1. +-commutative83.7%

        \[\leadsto \color{blue}{3.13060547623 \cdot y + x} \]
      2. *-commutative83.7%

        \[\leadsto \color{blue}{y \cdot 3.13060547623} + x \]
    6. Simplified83.7%

      \[\leadsto \color{blue}{y \cdot 3.13060547623 + x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification82.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{-54}:\\ \;\;\;\;x + y \cdot \left(3.13060547623 + \frac{-36.52704169880642}{z}\right)\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-22}:\\ \;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 47.4% accurate, 3.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 4.7 \cdot 10^{+181}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b \cdot 1.6453555072203998\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= y 4.7e+181) x (* y (* b 1.6453555072203998))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= 4.7e+181) {
		tmp = x;
	} else {
		tmp = y * (b * 1.6453555072203998);
	}
	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 <= 4.7d+181) then
        tmp = x
    else
        tmp = y * (b * 1.6453555072203998d0)
    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 <= 4.7e+181) {
		tmp = x;
	} else {
		tmp = y * (b * 1.6453555072203998);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y <= 4.7e+181:
		tmp = x
	else:
		tmp = y * (b * 1.6453555072203998)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= 4.7e+181)
		tmp = x;
	else
		tmp = Float64(y * Float64(b * 1.6453555072203998));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (y <= 4.7e+181)
		tmp = x;
	else
		tmp = y * (b * 1.6453555072203998);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 4.7e+181], x, N[(y * N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.7 \cdot 10^{+181}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y \cdot \left(b \cdot 1.6453555072203998\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 4.70000000000000027e181

    1. Initial program 57.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. Simplified60.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), t\right), a\right), b\right), \frac{y}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}, x\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in y around 0 53.5%

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

    if 4.70000000000000027e181 < y

    1. Initial program 49.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. Simplified49.9%

      \[\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)} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf 37.7%

      \[\leadsto \color{blue}{x \cdot \left(1 + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + 3.13060547623 \cdot z\right)\right)\right)\right)}{x \cdot \left(0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(15.234687407 + z\right)\right)\right)\right)}\right)} \]
    5. Taylor expanded in z around 0 29.3%

      \[\leadsto x \cdot \left(1 + \color{blue}{1.6453555072203998 \cdot \frac{b \cdot y}{x}}\right) \]
    6. Step-by-step derivation
      1. associate-/l*24.7%

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

      \[\leadsto x \cdot \left(1 + \color{blue}{1.6453555072203998 \cdot \left(b \cdot \frac{y}{x}\right)}\right) \]
    8. Taylor expanded in x around 0 33.1%

      \[\leadsto \color{blue}{1.6453555072203998 \cdot \left(b \cdot y\right)} \]
    9. Step-by-step derivation
      1. *-commutative33.1%

        \[\leadsto \color{blue}{\left(b \cdot y\right) \cdot 1.6453555072203998} \]
      2. *-commutative33.1%

        \[\leadsto \color{blue}{\left(y \cdot b\right)} \cdot 1.6453555072203998 \]
      3. associate-*r*33.1%

        \[\leadsto \color{blue}{y \cdot \left(b \cdot 1.6453555072203998\right)} \]
    10. Simplified33.1%

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

Alternative 17: 62.6% accurate, 7.4× speedup?

\[\begin{array}{l} \\ x + y \cdot 3.13060547623 \end{array} \]
(FPCore (x y z t a b) :precision binary64 (+ x (* y 3.13060547623)))
double code(double x, double y, double z, double t, double a, double b) {
	return x + (y * 3.13060547623);
}
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 * 3.13060547623d0)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return x + (y * 3.13060547623);
}
def code(x, y, z, t, a, b):
	return x + (y * 3.13060547623)
function code(x, y, z, t, a, b)
	return Float64(x + Float64(y * 3.13060547623))
end
function tmp = code(x, y, z, t, a, b)
	tmp = x + (y * 3.13060547623);
end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + y \cdot 3.13060547623
\end{array}
Derivation
  1. Initial program 56.8%

    \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
  2. Simplified59.3%

    \[\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)} \]
  3. Add Preprocessing
  4. Taylor expanded in z around inf 67.6%

    \[\leadsto \color{blue}{x + 3.13060547623 \cdot y} \]
  5. Step-by-step derivation
    1. +-commutative67.6%

      \[\leadsto \color{blue}{3.13060547623 \cdot y + x} \]
    2. *-commutative67.6%

      \[\leadsto \color{blue}{y \cdot 3.13060547623} + x \]
  6. Simplified67.6%

    \[\leadsto \color{blue}{y \cdot 3.13060547623 + x} \]
  7. Final simplification67.6%

    \[\leadsto x + y \cdot 3.13060547623 \]
  8. Add Preprocessing

Alternative 18: 45.4% accurate, 37.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.8%

    \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
  2. Simplified59.3%

    \[\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)} \]
  3. Add Preprocessing
  4. Taylor expanded in y around 0 49.1%

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

Developer target: 98.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := x + \left(\left(3.13060547623 - \frac{36.527041698806414}{z}\right) + \frac{t}{z \cdot z}\right) \cdot \frac{y}{1}\\
\mathbf{if}\;z < -6.499344996252632 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z < 7.066965436914287 \cdot 10^{+59}:\\
\;\;\;\;x + \frac{y}{\frac{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}{\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024108 
(FPCore (x y z t a b)
  :name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, D"
  :precision binary64

  :alt
  (if (< z -6.499344996252632e+53) (+ x (* (+ (- 3.13060547623 (/ 36.527041698806414 z)) (/ t (* z z))) (/ y 1.0))) (if (< z 7.066965436914287e+59) (+ x (/ y (/ (+ (* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z) 0.607771387771) (+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b)))) (+ x (* (+ (- 3.13060547623 (/ 36.527041698806414 z)) (/ t (* z z))) (/ y 1.0)))))

  (+ x (/ (* y (+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b)) (+ (* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z) 0.607771387771))))