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

Percentage Accurate: 59.0% → 98.3%
Time: 33.8s
Alternatives: 19
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 19 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.0% 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: 98.3% accurate, 0.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+52}:\\
\;\;\;\;x + \left(y \cdot 3.13060547623 + \frac{y \cdot \frac{t + -98.5170599679272}{z} - y \cdot -11.1667541262}{z}\right)\\

\mathbf{elif}\;z \leq 1.26 \cdot 10^{+37}:\\
\;\;\;\;\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{\frac{\left(t + 457.9610022158428\right) + \frac{\left(-6976.8927133548 + t \cdot -15.234687407\right) + \left(a + 1112.0901850848957\right)}{z}}{z} - 36.52704169880642}{z}, x\right)\\


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

    1. Initial program 4.5%

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

      \[\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)}{\left(\left(\color{blue}{z} \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    4. Taylor expanded in z around -inf 88.5%

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

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

        \[\leadsto x + \left(3.13060547623 \cdot y + \color{blue}{\left(-\frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right)}\right) \]
      3. unsub-neg88.5%

        \[\leadsto x + \color{blue}{\left(3.13060547623 \cdot y - \frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right)} \]
      4. *-commutative88.5%

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

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{-11.1667541262 \cdot y + \color{blue}{\left(-\frac{t \cdot y - 98.5170599679272 \cdot y}{z}\right)}}{z}\right) \]
      6. unsub-neg88.5%

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

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{\color{blue}{y \cdot -11.1667541262} - \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right) \]
      8. distribute-rgt-out--88.5%

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{y \cdot -11.1667541262 - \frac{\color{blue}{y \cdot \left(t - 98.5170599679272\right)}}{z}}{z}\right) \]
      9. associate-/l*98.5%

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{y \cdot -11.1667541262 - \color{blue}{y \cdot \frac{t - 98.5170599679272}{z}}}{z}\right) \]
      10. sub-neg98.5%

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

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

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

    if -6.49999999999999996e52 < z < 1.26e37

    1. Initial program 98.3%

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

      \[\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 1.26e37 < z

    1. Initial program 8.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. Simplified11.6%

      \[\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 98.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. Simplified98.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{+52}:\\ \;\;\;\;x + \left(y \cdot 3.13060547623 + \frac{y \cdot \frac{t + -98.5170599679272}{z} - y \cdot -11.1667541262}{z}\right)\\ \mathbf{elif}\;z \leq 1.26 \cdot 10^{+37}:\\ \;\;\;\;\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{\frac{\left(t + 457.9610022158428\right) + \frac{\left(-6976.8927133548 + t \cdot -15.234687407\right) + \left(a + 1112.0901850848957\right)}{z}}{z} - 36.52704169880642}{z}, x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 97.4% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+52}:\\
\;\;\;\;x + \left(y \cdot 3.13060547623 + \frac{y \cdot \frac{t + -98.5170599679272}{z} - y \cdot -11.1667541262}{z}\right)\\

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

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


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

    1. Initial program 4.5%

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

      \[\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)}{\left(\left(\color{blue}{z} \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    4. Taylor expanded in z around -inf 88.5%

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

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

        \[\leadsto x + \left(3.13060547623 \cdot y + \color{blue}{\left(-\frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right)}\right) \]
      3. unsub-neg88.5%

        \[\leadsto x + \color{blue}{\left(3.13060547623 \cdot y - \frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right)} \]
      4. *-commutative88.5%

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

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{-11.1667541262 \cdot y + \color{blue}{\left(-\frac{t \cdot y - 98.5170599679272 \cdot y}{z}\right)}}{z}\right) \]
      6. unsub-neg88.5%

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

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{\color{blue}{y \cdot -11.1667541262} - \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right) \]
      8. distribute-rgt-out--88.5%

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{y \cdot -11.1667541262 - \frac{\color{blue}{y \cdot \left(t - 98.5170599679272\right)}}{z}}{z}\right) \]
      9. associate-/l*98.5%

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{y \cdot -11.1667541262 - \color{blue}{y \cdot \frac{t - 98.5170599679272}{z}}}{z}\right) \]
      10. sub-neg98.5%

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

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

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

    if -3.1e52 < z < 6.3999999999999998e36

    1. Initial program 98.3%

      \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    2. Step-by-step derivation
      1. remove-double-neg98.3%

        \[\leadsto x + \frac{\color{blue}{-\left(-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)\right)}}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
      2. distribute-lft-neg-out98.3%

        \[\leadsto x + \frac{-\color{blue}{\left(-y\right) \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} \]
      3. distribute-lft-neg-in98.3%

        \[\leadsto x + \frac{\color{blue}{\left(-\left(-y\right)\right) \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} \]
      4. remove-double-neg98.3%

        \[\leadsto x + \frac{\color{blue}{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} \]
      5. fma-define98.4%

        \[\leadsto x + \frac{y \cdot \color{blue}{\mathsf{fma}\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a, 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. fma-define98.4%

        \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t, z, a\right)}, z, b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
      7. fma-define98.4%

        \[\leadsto x + \frac{y \cdot \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z \cdot 3.13060547623 + 11.1667541262, z, t\right)}, z, a\right), z, b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
      8. fma-define98.4%

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

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

    if 6.3999999999999998e36 < z

    1. Initial program 8.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. Simplified11.6%

      \[\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 98.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. Simplified98.1%

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

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

Alternative 3: 97.4% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+52}:\\
\;\;\;\;x + \left(y \cdot 3.13060547623 + \frac{y \cdot \frac{t + -98.5170599679272}{z} - y \cdot -11.1667541262}{z}\right)\\

\mathbf{elif}\;z \leq 6.8 \cdot 10^{+36}:\\
\;\;\;\;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 \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\

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


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

    1. Initial program 4.5%

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

      \[\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)}{\left(\left(\color{blue}{z} \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    4. Taylor expanded in z around -inf 88.5%

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

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

        \[\leadsto x + \left(3.13060547623 \cdot y + \color{blue}{\left(-\frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right)}\right) \]
      3. unsub-neg88.5%

        \[\leadsto x + \color{blue}{\left(3.13060547623 \cdot y - \frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right)} \]
      4. *-commutative88.5%

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

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{-11.1667541262 \cdot y + \color{blue}{\left(-\frac{t \cdot y - 98.5170599679272 \cdot y}{z}\right)}}{z}\right) \]
      6. unsub-neg88.5%

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

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{\color{blue}{y \cdot -11.1667541262} - \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right) \]
      8. distribute-rgt-out--88.5%

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{y \cdot -11.1667541262 - \frac{\color{blue}{y \cdot \left(t - 98.5170599679272\right)}}{z}}{z}\right) \]
      9. associate-/l*98.5%

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{y \cdot -11.1667541262 - \color{blue}{y \cdot \frac{t - 98.5170599679272}{z}}}{z}\right) \]
      10. sub-neg98.5%

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

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

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

    if -3.1e52 < z < 6.7999999999999996e36

    1. Initial program 98.3%

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

    if 6.7999999999999996e36 < z

    1. Initial program 8.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. Simplified11.6%

      \[\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 98.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. Simplified98.1%

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

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

Alternative 4: 97.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+52}:\\ \;\;\;\;x + \left(y \cdot 3.13060547623 + \frac{y \cdot \frac{t + -98.5170599679272}{z} - y \cdot -11.1667541262}{z}\right)\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+36}:\\ \;\;\;\;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 \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\ \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
 (if (<= z -3.2e+52)
   (+
    x
    (+
     (* y 3.13060547623)
     (/ (- (* y (/ (+ t -98.5170599679272) z)) (* y -11.1667541262)) z)))
   (if (<= z 6.5e+36)
     (+
      x
      (/
       (*
        y
        (+
         b
         (* z (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))))
       (+
        0.607771387771
        (*
         z
         (+ 11.9400905721 (* z (+ 31.4690115749 (* z (+ z 15.234687407)))))))))
     (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 tmp;
	if (z <= -3.2e+52) {
		tmp = x + ((y * 3.13060547623) + (((y * ((t + -98.5170599679272) / z)) - (y * -11.1667541262)) / z));
	} else if (z <= 6.5e+36) {
		tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))));
	} else {
		tmp = fma(y, (3.13060547623 + ((((t + 457.9610022158428) / z) - 36.52704169880642) / z)), x);
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (z <= -3.2e+52)
		tmp = Float64(x + Float64(Float64(y * 3.13060547623) + Float64(Float64(Float64(y * Float64(Float64(t + -98.5170599679272) / z)) - Float64(y * -11.1667541262)) / z)));
	elseif (z <= 6.5e+36)
		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 * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407)))))))));
	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_] := If[LessEqual[z, -3.2e+52], N[(x + N[(N[(y * 3.13060547623), $MachinePrecision] + N[(N[(N[(y * N[(N[(t + -98.5170599679272), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(y * -11.1667541262), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+36], 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 * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+52}:\\
\;\;\;\;x + \left(y \cdot 3.13060547623 + \frac{y \cdot \frac{t + -98.5170599679272}{z} - y \cdot -11.1667541262}{z}\right)\\

\mathbf{elif}\;z \leq 6.5 \cdot 10^{+36}:\\
\;\;\;\;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 \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\

\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 3 regimes
  2. if z < -3.2e52

    1. Initial program 4.5%

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

      \[\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)}{\left(\left(\color{blue}{z} \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    4. Taylor expanded in z around -inf 88.5%

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

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

        \[\leadsto x + \left(3.13060547623 \cdot y + \color{blue}{\left(-\frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right)}\right) \]
      3. unsub-neg88.5%

        \[\leadsto x + \color{blue}{\left(3.13060547623 \cdot y - \frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right)} \]
      4. *-commutative88.5%

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

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{-11.1667541262 \cdot y + \color{blue}{\left(-\frac{t \cdot y - 98.5170599679272 \cdot y}{z}\right)}}{z}\right) \]
      6. unsub-neg88.5%

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

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{\color{blue}{y \cdot -11.1667541262} - \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right) \]
      8. distribute-rgt-out--88.5%

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{y \cdot -11.1667541262 - \frac{\color{blue}{y \cdot \left(t - 98.5170599679272\right)}}{z}}{z}\right) \]
      9. associate-/l*98.5%

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{y \cdot -11.1667541262 - \color{blue}{y \cdot \frac{t - 98.5170599679272}{z}}}{z}\right) \]
      10. sub-neg98.5%

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

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

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

    if -3.2e52 < z < 6.4999999999999998e36

    1. Initial program 98.3%

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

    if 6.4999999999999998e36 < z

    1. Initial program 8.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. Simplified11.6%

      \[\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 3 regimes into one program.
  4. Final simplification97.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+52}:\\ \;\;\;\;x + \left(y \cdot 3.13060547623 + \frac{y \cdot \frac{t + -98.5170599679272}{z} - y \cdot -11.1667541262}{z}\right)\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+36}:\\ \;\;\;\;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 \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\ \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.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+52} \lor \neg \left(z \leq 1.06 \cdot 10^{+37}\right):\\
\;\;\;\;x + \left(y \cdot 3.13060547623 + \frac{y \cdot \frac{t + -98.5170599679272}{z} - y \cdot -11.1667541262}{z}\right)\\

\mathbf{else}:\\
\;\;\;\;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 \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.1e52 or 1.06e37 < z

    1. Initial program 6.4%

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

      \[\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)}{\left(\left(\color{blue}{z} \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    4. Taylor expanded in z around -inf 83.2%

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

        \[\leadsto x + \color{blue}{\left(3.13060547623 \cdot y + -1 \cdot \frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right)} \]
      2. mul-1-neg83.2%

        \[\leadsto x + \left(3.13060547623 \cdot y + \color{blue}{\left(-\frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right)}\right) \]
      3. unsub-neg83.2%

        \[\leadsto x + \color{blue}{\left(3.13060547623 \cdot y - \frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right)} \]
      4. *-commutative83.2%

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

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{-11.1667541262 \cdot y + \color{blue}{\left(-\frac{t \cdot y - 98.5170599679272 \cdot y}{z}\right)}}{z}\right) \]
      6. unsub-neg83.2%

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

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{\color{blue}{y \cdot -11.1667541262} - \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right) \]
      8. distribute-rgt-out--83.2%

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{y \cdot -11.1667541262 - \frac{\color{blue}{y \cdot \left(t - 98.5170599679272\right)}}{z}}{z}\right) \]
      9. associate-/l*95.5%

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{y \cdot -11.1667541262 - \color{blue}{y \cdot \frac{t - 98.5170599679272}{z}}}{z}\right) \]
      10. sub-neg95.5%

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{y \cdot -11.1667541262 - y \cdot \frac{\color{blue}{t + \left(-98.5170599679272\right)}}{z}}{z}\right) \]
      11. metadata-eval95.5%

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

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

    if -3.1e52 < z < 1.06e37

    1. Initial program 98.3%

      \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification97.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+52} \lor \neg \left(z \leq 1.06 \cdot 10^{+37}\right):\\ \;\;\;\;x + \left(y \cdot 3.13060547623 + \frac{y \cdot \frac{t + -98.5170599679272}{z} - y \cdot -11.1667541262}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;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 \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 96.1% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+52} \lor \neg \left(z \leq 7.8 \cdot 10^{+36}\right):\\
\;\;\;\;x + \left(y \cdot 3.13060547623 + \frac{y \cdot \frac{t + -98.5170599679272}{z} - y \cdot -11.1667541262}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.1e52 or 7.80000000000000042e36 < z

    1. Initial program 6.4%

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

      \[\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)}{\left(\left(\color{blue}{z} \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    4. Taylor expanded in z around -inf 83.2%

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

        \[\leadsto x + \color{blue}{\left(3.13060547623 \cdot y + -1 \cdot \frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right)} \]
      2. mul-1-neg83.2%

        \[\leadsto x + \left(3.13060547623 \cdot y + \color{blue}{\left(-\frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right)}\right) \]
      3. unsub-neg83.2%

        \[\leadsto x + \color{blue}{\left(3.13060547623 \cdot y - \frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right)} \]
      4. *-commutative83.2%

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

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{-11.1667541262 \cdot y + \color{blue}{\left(-\frac{t \cdot y - 98.5170599679272 \cdot y}{z}\right)}}{z}\right) \]
      6. unsub-neg83.2%

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

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{\color{blue}{y \cdot -11.1667541262} - \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right) \]
      8. distribute-rgt-out--83.2%

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{y \cdot -11.1667541262 - \frac{\color{blue}{y \cdot \left(t - 98.5170599679272\right)}}{z}}{z}\right) \]
      9. associate-/l*95.5%

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{y \cdot -11.1667541262 - \color{blue}{y \cdot \frac{t - 98.5170599679272}{z}}}{z}\right) \]
      10. sub-neg95.5%

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{y \cdot -11.1667541262 - y \cdot \frac{\color{blue}{t + \left(-98.5170599679272\right)}}{z}}{z}\right) \]
      11. metadata-eval95.5%

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

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

    if -3.1e52 < z < 7.80000000000000042e36

    1. Initial program 98.3%

      \[x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 97.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. *-commutative97.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. Simplified97.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} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification96.9%

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

Alternative 7: 95.5% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+18} \lor \neg \left(z \leq 460\right):\\
\;\;\;\;x + \left(y \cdot 3.13060547623 + \frac{y \cdot \frac{t + -98.5170599679272}{z} - y \cdot -11.1667541262}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.4e18 or 460 < z

    1. Initial program 16.7%

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

      \[\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)}{\left(\left(\color{blue}{z} \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    4. Taylor expanded in z around -inf 80.9%

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

        \[\leadsto x + \color{blue}{\left(3.13060547623 \cdot y + -1 \cdot \frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right)} \]
      2. mul-1-neg80.9%

        \[\leadsto x + \left(3.13060547623 \cdot y + \color{blue}{\left(-\frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right)}\right) \]
      3. unsub-neg80.9%

        \[\leadsto x + \color{blue}{\left(3.13060547623 \cdot y - \frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right)} \]
      4. *-commutative80.9%

        \[\leadsto x + \left(\color{blue}{y \cdot 3.13060547623} - \frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right) \]
      5. mul-1-neg80.9%

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{-11.1667541262 \cdot y + \color{blue}{\left(-\frac{t \cdot y - 98.5170599679272 \cdot y}{z}\right)}}{z}\right) \]
      6. unsub-neg80.9%

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{\color{blue}{-11.1667541262 \cdot y - \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}}{z}\right) \]
      7. *-commutative80.9%

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{\color{blue}{y \cdot -11.1667541262} - \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right) \]
      8. distribute-rgt-out--80.9%

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{y \cdot -11.1667541262 - \frac{\color{blue}{y \cdot \left(t - 98.5170599679272\right)}}{z}}{z}\right) \]
      9. associate-/l*91.7%

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{y \cdot -11.1667541262 - \color{blue}{y \cdot \frac{t - 98.5170599679272}{z}}}{z}\right) \]
      10. sub-neg91.7%

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

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

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

    if -1.4e18 < z < 460

    1. Initial program 99.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+18} \lor \neg \left(z \leq 460\right):\\ \;\;\;\;x + \left(y \cdot 3.13060547623 + \frac{y \cdot \frac{t + -98.5170599679272}{z} - y \cdot -11.1667541262}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;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)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 82.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot 3.13060547623\\ \mathbf{if}\;z \leq -4 \cdot 10^{+24}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -8 \cdot 10^{-98}:\\ \;\;\;\;x + \frac{y \cdot b}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-176}:\\ \;\;\;\;x + a \cdot \left(z \cdot \left(\left(z \cdot y\right) \cdot -32.324150453290734 + y \cdot 1.6453555072203998\right)\right)\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-16}:\\ \;\;\;\;x + \left(y \cdot b\right) \cdot 1.6453555072203998\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+74}:\\ \;\;\;\;x - \frac{\frac{y \cdot \left(170.12200846348443 - t\right)}{z} - 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 -4e+24)
     t_1
     (if (<= z -8e-98)
       (+
        x
        (/
         (* y b)
         (+ 0.607771387771 (* z (+ 11.9400905721 (* z 31.4690115749))))))
       (if (<= z -2.3e-176)
         (+
          x
          (*
           a
           (* z (+ (* (* z y) -32.324150453290734) (* y 1.6453555072203998)))))
         (if (<= z 2.2e-16)
           (+ x (* (* y b) 1.6453555072203998))
           (if (<= z 3.8e+74)
             (-
              x
              (/
               (- (/ (* y (- 170.12200846348443 t)) z) (* 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 <= -4e+24) {
		tmp = t_1;
	} else if (z <= -8e-98) {
		tmp = x + ((y * b) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
	} else if (z <= -2.3e-176) {
		tmp = x + (a * (z * (((z * y) * -32.324150453290734) + (y * 1.6453555072203998))));
	} else if (z <= 2.2e-16) {
		tmp = x + ((y * b) * 1.6453555072203998);
	} else if (z <= 3.8e+74) {
		tmp = x - ((((y * (170.12200846348443 - t)) / z) - (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 <= (-4d+24)) then
        tmp = t_1
    else if (z <= (-8d-98)) then
        tmp = x + ((y * b) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * 31.4690115749d0)))))
    else if (z <= (-2.3d-176)) then
        tmp = x + (a * (z * (((z * y) * (-32.324150453290734d0)) + (y * 1.6453555072203998d0))))
    else if (z <= 2.2d-16) then
        tmp = x + ((y * b) * 1.6453555072203998d0)
    else if (z <= 3.8d+74) then
        tmp = x - ((((y * (170.12200846348443d0 - t)) / z) - (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 <= -4e+24) {
		tmp = t_1;
	} else if (z <= -8e-98) {
		tmp = x + ((y * b) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
	} else if (z <= -2.3e-176) {
		tmp = x + (a * (z * (((z * y) * -32.324150453290734) + (y * 1.6453555072203998))));
	} else if (z <= 2.2e-16) {
		tmp = x + ((y * b) * 1.6453555072203998);
	} else if (z <= 3.8e+74) {
		tmp = x - ((((y * (170.12200846348443 - t)) / z) - (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 <= -4e+24:
		tmp = t_1
	elif z <= -8e-98:
		tmp = x + ((y * b) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))))
	elif z <= -2.3e-176:
		tmp = x + (a * (z * (((z * y) * -32.324150453290734) + (y * 1.6453555072203998))))
	elif z <= 2.2e-16:
		tmp = x + ((y * b) * 1.6453555072203998)
	elif z <= 3.8e+74:
		tmp = x - ((((y * (170.12200846348443 - t)) / z) - (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 <= -4e+24)
		tmp = t_1;
	elseif (z <= -8e-98)
		tmp = Float64(x + Float64(Float64(y * b) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * 31.4690115749))))));
	elseif (z <= -2.3e-176)
		tmp = Float64(x + Float64(a * Float64(z * Float64(Float64(Float64(z * y) * -32.324150453290734) + Float64(y * 1.6453555072203998)))));
	elseif (z <= 2.2e-16)
		tmp = Float64(x + Float64(Float64(y * b) * 1.6453555072203998));
	elseif (z <= 3.8e+74)
		tmp = Float64(x - Float64(Float64(Float64(Float64(y * Float64(170.12200846348443 - t)) / z) - 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 <= -4e+24)
		tmp = t_1;
	elseif (z <= -8e-98)
		tmp = x + ((y * b) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
	elseif (z <= -2.3e-176)
		tmp = x + (a * (z * (((z * y) * -32.324150453290734) + (y * 1.6453555072203998))));
	elseif (z <= 2.2e-16)
		tmp = x + ((y * b) * 1.6453555072203998);
	elseif (z <= 3.8e+74)
		tmp = x - ((((y * (170.12200846348443 - t)) / z) - (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, -4e+24], t$95$1, If[LessEqual[z, -8e-98], N[(x + N[(N[(y * b), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * 31.4690115749), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.3e-176], N[(x + N[(a * N[(z * N[(N[(N[(z * y), $MachinePrecision] * -32.324150453290734), $MachinePrecision] + N[(y * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e-16], N[(x + N[(N[(y * b), $MachinePrecision] * 1.6453555072203998), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e+74], N[(x - N[(N[(N[(N[(y * N[(170.12200846348443 - t), $MachinePrecision]), $MachinePrecision] / z), $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 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -8 \cdot 10^{-98}:\\
\;\;\;\;x + \frac{y \cdot b}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\

\mathbf{elif}\;z \leq -2.3 \cdot 10^{-176}:\\
\;\;\;\;x + a \cdot \left(z \cdot \left(\left(z \cdot y\right) \cdot -32.324150453290734 + y \cdot 1.6453555072203998\right)\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.9999999999999999e24 or 3.7999999999999998e74 < z

    1. Initial program 9.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. Simplified10.0%

      \[\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 91.4%

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

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

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

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

    if -3.9999999999999999e24 < z < -7.99999999999999951e-98

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

      \[\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. *-commutative95.0%

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

      \[\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} \]
    6. Taylor expanded in z around 0 57.4%

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

        \[\leadsto x + \frac{\color{blue}{y \cdot b}}{z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right) + 0.607771387771} \]
    8. Simplified57.4%

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

    if -7.99999999999999951e-98 < z < -2.3000000000000001e-176

    1. Initial program 99.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 a around inf 87.5%

      \[\leadsto x + \frac{\color{blue}{a \cdot \left(y \cdot z\right)}}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    4. Taylor expanded in z around 0 85.1%

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

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

    if -2.3000000000000001e-176 < z < 2.2e-16

    1. Initial program 99.6%

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

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

    if 2.2e-16 < z < 3.7999999999999998e74

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

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

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

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

        \[\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/54.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+24}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq -8 \cdot 10^{-98}:\\ \;\;\;\;x + \frac{y \cdot b}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-176}:\\ \;\;\;\;x + a \cdot \left(z \cdot \left(\left(z \cdot y\right) \cdot -32.324150453290734 + y \cdot 1.6453555072203998\right)\right)\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-16}:\\ \;\;\;\;x + \left(y \cdot b\right) \cdot 1.6453555072203998\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+74}:\\ \;\;\;\;x - \frac{\frac{y \cdot \left(170.12200846348443 - t\right)}{z} - y \cdot 11.1667541262}{z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 95.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -135000000000 \lor \neg \left(z \leq 3.2\right):\\
\;\;\;\;x + \left(y \cdot 3.13060547623 + \frac{y \cdot \frac{t + -98.5170599679272}{z} - y \cdot -11.1667541262}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.35e11 or 3.2000000000000002 < z

    1. Initial program 18.1%

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

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

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

        \[\leadsto x + \left(3.13060547623 \cdot y + \color{blue}{\left(-\frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right)}\right) \]
      3. unsub-neg79.7%

        \[\leadsto x + \color{blue}{\left(3.13060547623 \cdot y - \frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right)} \]
      4. *-commutative79.7%

        \[\leadsto x + \left(\color{blue}{y \cdot 3.13060547623} - \frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right) \]
      5. mul-1-neg79.7%

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{-11.1667541262 \cdot y + \color{blue}{\left(-\frac{t \cdot y - 98.5170599679272 \cdot y}{z}\right)}}{z}\right) \]
      6. unsub-neg79.7%

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

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{\color{blue}{y \cdot -11.1667541262} - \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right) \]
      8. distribute-rgt-out--79.7%

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{y \cdot -11.1667541262 - \frac{\color{blue}{y \cdot \left(t - 98.5170599679272\right)}}{z}}{z}\right) \]
      9. associate-/l*90.3%

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

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

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{y \cdot -11.1667541262 - y \cdot \frac{t + \color{blue}{-98.5170599679272}}{z}}{z}\right) \]
    6. Simplified90.3%

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

    if -1.35e11 < z < 3.2000000000000002

    1. Initial program 99.6%

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

      \[\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}{11.9400905721 \cdot z} + 0.607771387771} \]
    4. Step-by-step derivation
      1. *-commutative99.6%

        \[\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 11.9400905721} + 0.607771387771} \]
    5. Simplified99.6%

      \[\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 11.9400905721} + 0.607771387771} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification95.2%

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

Alternative 10: 89.4% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot 3.13060547623\\ \mathbf{if}\;z \leq -160000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 0.092:\\ \;\;\;\;x + \frac{a \cdot \left(z \cdot y\right) + y \cdot b}{0.607771387771 + z \cdot 11.9400905721}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{+74}:\\ \;\;\;\;x - \frac{\frac{y \cdot \left(170.12200846348443 - t\right)}{z} - 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 -160000000000.0)
     t_1
     (if (<= z 0.092)
       (+
        x
        (/ (+ (* a (* z y)) (* y b)) (+ 0.607771387771 (* z 11.9400905721))))
       (if (<= z 3.3e+74)
         (-
          x
          (/ (- (/ (* y (- 170.12200846348443 t)) z) (* 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 <= -160000000000.0) {
		tmp = t_1;
	} else if (z <= 0.092) {
		tmp = x + (((a * (z * y)) + (y * b)) / (0.607771387771 + (z * 11.9400905721)));
	} else if (z <= 3.3e+74) {
		tmp = x - ((((y * (170.12200846348443 - t)) / z) - (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 <= (-160000000000.0d0)) then
        tmp = t_1
    else if (z <= 0.092d0) then
        tmp = x + (((a * (z * y)) + (y * b)) / (0.607771387771d0 + (z * 11.9400905721d0)))
    else if (z <= 3.3d+74) then
        tmp = x - ((((y * (170.12200846348443d0 - t)) / z) - (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 <= -160000000000.0) {
		tmp = t_1;
	} else if (z <= 0.092) {
		tmp = x + (((a * (z * y)) + (y * b)) / (0.607771387771 + (z * 11.9400905721)));
	} else if (z <= 3.3e+74) {
		tmp = x - ((((y * (170.12200846348443 - t)) / z) - (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 <= -160000000000.0:
		tmp = t_1
	elif z <= 0.092:
		tmp = x + (((a * (z * y)) + (y * b)) / (0.607771387771 + (z * 11.9400905721)))
	elif z <= 3.3e+74:
		tmp = x - ((((y * (170.12200846348443 - t)) / z) - (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 <= -160000000000.0)
		tmp = t_1;
	elseif (z <= 0.092)
		tmp = Float64(x + Float64(Float64(Float64(a * Float64(z * y)) + Float64(y * b)) / Float64(0.607771387771 + Float64(z * 11.9400905721))));
	elseif (z <= 3.3e+74)
		tmp = Float64(x - Float64(Float64(Float64(Float64(y * Float64(170.12200846348443 - t)) / z) - 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 <= -160000000000.0)
		tmp = t_1;
	elseif (z <= 0.092)
		tmp = x + (((a * (z * y)) + (y * b)) / (0.607771387771 + (z * 11.9400905721)));
	elseif (z <= 3.3e+74)
		tmp = x - ((((y * (170.12200846348443 - t)) / z) - (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, -160000000000.0], t$95$1, If[LessEqual[z, 0.092], N[(x + N[(N[(N[(a * N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.3e+74], N[(x - N[(N[(N[(N[(y * N[(170.12200846348443 - t), $MachinePrecision]), $MachinePrecision] / z), $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 -160000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 0.092:\\
\;\;\;\;x + \frac{a \cdot \left(z \cdot y\right) + y \cdot b}{0.607771387771 + z \cdot 11.9400905721}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.6e11 or 3.3000000000000002e74 < z

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

      \[\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 90.5%

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

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

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

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

    if -1.6e11 < z < 0.091999999999999998

    1. Initial program 99.6%

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

      \[\leadsto x + \frac{\color{blue}{a \cdot \left(y \cdot z\right) + b \cdot y}}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    4. Taylor expanded in z around 0 87.4%

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

        \[\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 11.9400905721} + 0.607771387771} \]
    6. Simplified87.4%

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

    if 0.091999999999999998 < z < 3.3000000000000002e74

    1. Initial program 66.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 66.2%

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

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

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

        \[\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/56.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -160000000000:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq 0.092:\\ \;\;\;\;x + \frac{a \cdot \left(z \cdot y\right) + y \cdot b}{0.607771387771 + z \cdot 11.9400905721}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{+74}:\\ \;\;\;\;x - \frac{\frac{y \cdot \left(170.12200846348443 - t\right)}{z} - y \cdot 11.1667541262}{z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 82.1% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot 3.13060547623\\ \mathbf{if}\;z \leq -1.36 \cdot 10^{+20}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-102}:\\ \;\;\;\;x + \frac{y \cdot b}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{-176}:\\ \;\;\;\;x + a \cdot \left(z \cdot \left(\left(z \cdot y\right) \cdot -32.324150453290734 + y \cdot 1.6453555072203998\right)\right)\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{+36}:\\ \;\;\;\;x + \left(y \cdot b\right) \cdot 1.6453555072203998\\ \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.36e+20)
     t_1
     (if (<= z -6.8e-102)
       (+
        x
        (/
         (* y b)
         (+ 0.607771387771 (* z (+ 11.9400905721 (* z 31.4690115749))))))
       (if (<= z -1.35e-176)
         (+
          x
          (*
           a
           (* z (+ (* (* z y) -32.324150453290734) (* y 1.6453555072203998)))))
         (if (<= z 6.4e+36) (+ x (* (* y b) 1.6453555072203998)) 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.36e+20) {
		tmp = t_1;
	} else if (z <= -6.8e-102) {
		tmp = x + ((y * b) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
	} else if (z <= -1.35e-176) {
		tmp = x + (a * (z * (((z * y) * -32.324150453290734) + (y * 1.6453555072203998))));
	} else if (z <= 6.4e+36) {
		tmp = x + ((y * b) * 1.6453555072203998);
	} 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.36d+20)) then
        tmp = t_1
    else if (z <= (-6.8d-102)) then
        tmp = x + ((y * b) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * 31.4690115749d0)))))
    else if (z <= (-1.35d-176)) then
        tmp = x + (a * (z * (((z * y) * (-32.324150453290734d0)) + (y * 1.6453555072203998d0))))
    else if (z <= 6.4d+36) then
        tmp = x + ((y * b) * 1.6453555072203998d0)
    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.36e+20) {
		tmp = t_1;
	} else if (z <= -6.8e-102) {
		tmp = x + ((y * b) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
	} else if (z <= -1.35e-176) {
		tmp = x + (a * (z * (((z * y) * -32.324150453290734) + (y * 1.6453555072203998))));
	} else if (z <= 6.4e+36) {
		tmp = x + ((y * b) * 1.6453555072203998);
	} 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.36e+20:
		tmp = t_1
	elif z <= -6.8e-102:
		tmp = x + ((y * b) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))))
	elif z <= -1.35e-176:
		tmp = x + (a * (z * (((z * y) * -32.324150453290734) + (y * 1.6453555072203998))))
	elif z <= 6.4e+36:
		tmp = x + ((y * b) * 1.6453555072203998)
	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.36e+20)
		tmp = t_1;
	elseif (z <= -6.8e-102)
		tmp = Float64(x + Float64(Float64(y * b) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * 31.4690115749))))));
	elseif (z <= -1.35e-176)
		tmp = Float64(x + Float64(a * Float64(z * Float64(Float64(Float64(z * y) * -32.324150453290734) + Float64(y * 1.6453555072203998)))));
	elseif (z <= 6.4e+36)
		tmp = Float64(x + Float64(Float64(y * b) * 1.6453555072203998));
	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.36e+20)
		tmp = t_1;
	elseif (z <= -6.8e-102)
		tmp = x + ((y * b) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
	elseif (z <= -1.35e-176)
		tmp = x + (a * (z * (((z * y) * -32.324150453290734) + (y * 1.6453555072203998))));
	elseif (z <= 6.4e+36)
		tmp = x + ((y * b) * 1.6453555072203998);
	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.36e+20], t$95$1, If[LessEqual[z, -6.8e-102], N[(x + N[(N[(y * b), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * 31.4690115749), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.35e-176], N[(x + N[(a * N[(z * N[(N[(N[(z * y), $MachinePrecision] * -32.324150453290734), $MachinePrecision] + N[(y * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.4e+36], N[(x + N[(N[(y * b), $MachinePrecision] * 1.6453555072203998), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -6.8 \cdot 10^{-102}:\\
\;\;\;\;x + \frac{y \cdot b}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\

\mathbf{elif}\;z \leq -1.35 \cdot 10^{-176}:\\
\;\;\;\;x + a \cdot \left(z \cdot \left(\left(z \cdot y\right) \cdot -32.324150453290734 + y \cdot 1.6453555072203998\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.36e20 or 6.3999999999999998e36 < z

    1. Initial program 12.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. Simplified14.9%

      \[\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 87.6%

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

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

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

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

    if -1.36e20 < z < -6.80000000000000026e-102

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

      \[\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. *-commutative95.0%

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

      \[\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} \]
    6. Taylor expanded in z around 0 57.4%

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

        \[\leadsto x + \frac{\color{blue}{y \cdot b}}{z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right) + 0.607771387771} \]
    8. Simplified57.4%

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

    if -6.80000000000000026e-102 < z < -1.3499999999999999e-176

    1. Initial program 99.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 a around inf 87.5%

      \[\leadsto x + \frac{\color{blue}{a \cdot \left(y \cdot z\right)}}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    4. Taylor expanded in z around 0 85.1%

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

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

    if -1.3499999999999999e-176 < z < 6.3999999999999998e36

    1. Initial program 97.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 75.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.36 \cdot 10^{+20}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-102}:\\ \;\;\;\;x + \frac{y \cdot b}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{-176}:\\ \;\;\;\;x + a \cdot \left(z \cdot \left(\left(z \cdot y\right) \cdot -32.324150453290734 + y \cdot 1.6453555072203998\right)\right)\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{+36}:\\ \;\;\;\;x + \left(y \cdot b\right) \cdot 1.6453555072203998\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 82.0% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(y \cdot b\right) \cdot 1.6453555072203998\\ t_2 := x + y \cdot 3.13060547623\\ \mathbf{if}\;z \leq -4.4 \cdot 10^{+21}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-102}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.15 \cdot 10^{-176}:\\ \;\;\;\;x + a \cdot \left(z \cdot \left(\left(z \cdot y\right) \cdot -32.324150453290734 + y \cdot 1.6453555072203998\right)\right)\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{+36}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (* (* y b) 1.6453555072203998)))
        (t_2 (+ x (* y 3.13060547623))))
   (if (<= z -4.4e+21)
     t_2
     (if (<= z -6.8e-102)
       t_1
       (if (<= z -2.15e-176)
         (+
          x
          (*
           a
           (* z (+ (* (* z y) -32.324150453290734) (* y 1.6453555072203998)))))
         (if (<= z 6.4e+36) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + ((y * b) * 1.6453555072203998);
	double t_2 = x + (y * 3.13060547623);
	double tmp;
	if (z <= -4.4e+21) {
		tmp = t_2;
	} else if (z <= -6.8e-102) {
		tmp = t_1;
	} else if (z <= -2.15e-176) {
		tmp = x + (a * (z * (((z * y) * -32.324150453290734) + (y * 1.6453555072203998))));
	} else if (z <= 6.4e+36) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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) :: t_2
    real(8) :: tmp
    t_1 = x + ((y * b) * 1.6453555072203998d0)
    t_2 = x + (y * 3.13060547623d0)
    if (z <= (-4.4d+21)) then
        tmp = t_2
    else if (z <= (-6.8d-102)) then
        tmp = t_1
    else if (z <= (-2.15d-176)) then
        tmp = x + (a * (z * (((z * y) * (-32.324150453290734d0)) + (y * 1.6453555072203998d0))))
    else if (z <= 6.4d+36) then
        tmp = t_1
    else
        tmp = t_2
    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 * b) * 1.6453555072203998);
	double t_2 = x + (y * 3.13060547623);
	double tmp;
	if (z <= -4.4e+21) {
		tmp = t_2;
	} else if (z <= -6.8e-102) {
		tmp = t_1;
	} else if (z <= -2.15e-176) {
		tmp = x + (a * (z * (((z * y) * -32.324150453290734) + (y * 1.6453555072203998))));
	} else if (z <= 6.4e+36) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + ((y * b) * 1.6453555072203998)
	t_2 = x + (y * 3.13060547623)
	tmp = 0
	if z <= -4.4e+21:
		tmp = t_2
	elif z <= -6.8e-102:
		tmp = t_1
	elif z <= -2.15e-176:
		tmp = x + (a * (z * (((z * y) * -32.324150453290734) + (y * 1.6453555072203998))))
	elif z <= 6.4e+36:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(Float64(y * b) * 1.6453555072203998))
	t_2 = Float64(x + Float64(y * 3.13060547623))
	tmp = 0.0
	if (z <= -4.4e+21)
		tmp = t_2;
	elseif (z <= -6.8e-102)
		tmp = t_1;
	elseif (z <= -2.15e-176)
		tmp = Float64(x + Float64(a * Float64(z * Float64(Float64(Float64(z * y) * -32.324150453290734) + Float64(y * 1.6453555072203998)))));
	elseif (z <= 6.4e+36)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + ((y * b) * 1.6453555072203998);
	t_2 = x + (y * 3.13060547623);
	tmp = 0.0;
	if (z <= -4.4e+21)
		tmp = t_2;
	elseif (z <= -6.8e-102)
		tmp = t_1;
	elseif (z <= -2.15e-176)
		tmp = x + (a * (z * (((z * y) * -32.324150453290734) + (y * 1.6453555072203998))));
	elseif (z <= 6.4e+36)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * b), $MachinePrecision] * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.4e+21], t$95$2, If[LessEqual[z, -6.8e-102], t$95$1, If[LessEqual[z, -2.15e-176], N[(x + N[(a * N[(z * N[(N[(N[(z * y), $MachinePrecision] * -32.324150453290734), $MachinePrecision] + N[(y * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.4e+36], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(y \cdot b\right) \cdot 1.6453555072203998\\
t_2 := x + y \cdot 3.13060547623\\
\mathbf{if}\;z \leq -4.4 \cdot 10^{+21}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -6.8 \cdot 10^{-102}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -2.15 \cdot 10^{-176}:\\
\;\;\;\;x + a \cdot \left(z \cdot \left(\left(z \cdot y\right) \cdot -32.324150453290734 + y \cdot 1.6453555072203998\right)\right)\\

\mathbf{elif}\;z \leq 6.4 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.4e21 or 6.3999999999999998e36 < z

    1. Initial program 12.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. Simplified14.9%

      \[\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 87.6%

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

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

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

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

    if -4.4e21 < z < -6.80000000000000026e-102 or -2.15000000000000006e-176 < z < 6.3999999999999998e36

    1. Initial program 98.2%

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

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

    if -6.80000000000000026e-102 < z < -2.15000000000000006e-176

    1. Initial program 99.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 a around inf 87.5%

      \[\leadsto x + \frac{\color{blue}{a \cdot \left(y \cdot z\right)}}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    4. Taylor expanded in z around 0 85.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{+21}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-102}:\\ \;\;\;\;x + \left(y \cdot b\right) \cdot 1.6453555072203998\\ \mathbf{elif}\;z \leq -2.15 \cdot 10^{-176}:\\ \;\;\;\;x + a \cdot \left(z \cdot \left(\left(z \cdot y\right) \cdot -32.324150453290734 + y \cdot 1.6453555072203998\right)\right)\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{+36}:\\ \;\;\;\;x + \left(y \cdot b\right) \cdot 1.6453555072203998\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 91.6% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -135000000000 \lor \neg \left(z \leq 0.58\right):\\
\;\;\;\;x + \left(y \cdot 3.13060547623 + \frac{y \cdot \frac{t + -98.5170599679272}{z} - y \cdot -11.1667541262}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.35e11 or 0.57999999999999996 < z

    1. Initial program 18.1%

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

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

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

        \[\leadsto x + \left(3.13060547623 \cdot y + \color{blue}{\left(-\frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right)}\right) \]
      3. unsub-neg79.7%

        \[\leadsto x + \color{blue}{\left(3.13060547623 \cdot y - \frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right)} \]
      4. *-commutative79.7%

        \[\leadsto x + \left(\color{blue}{y \cdot 3.13060547623} - \frac{-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right) \]
      5. mul-1-neg79.7%

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{-11.1667541262 \cdot y + \color{blue}{\left(-\frac{t \cdot y - 98.5170599679272 \cdot y}{z}\right)}}{z}\right) \]
      6. unsub-neg79.7%

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

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{\color{blue}{y \cdot -11.1667541262} - \frac{t \cdot y - 98.5170599679272 \cdot y}{z}}{z}\right) \]
      8. distribute-rgt-out--79.7%

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{y \cdot -11.1667541262 - \frac{\color{blue}{y \cdot \left(t - 98.5170599679272\right)}}{z}}{z}\right) \]
      9. associate-/l*90.3%

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

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

        \[\leadsto x + \left(y \cdot 3.13060547623 - \frac{y \cdot -11.1667541262 - y \cdot \frac{t + \color{blue}{-98.5170599679272}}{z}}{z}\right) \]
    6. Simplified90.3%

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

    if -1.35e11 < z < 0.57999999999999996

    1. Initial program 99.6%

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

      \[\leadsto x + \frac{\color{blue}{a \cdot \left(y \cdot z\right) + b \cdot y}}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    4. Taylor expanded in z around 0 87.4%

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

        \[\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 11.9400905721} + 0.607771387771} \]
    6. Simplified87.4%

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

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

Alternative 14: 82.0% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(y \cdot b\right) \cdot 1.6453555072203998\\ t_2 := x + y \cdot 3.13060547623\\ \mathbf{if}\;z \leq -4.2 \cdot 10^{+20}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-102}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-176}:\\ \;\;\;\;x + \left(a \cdot \left(z \cdot y\right)\right) \cdot 1.6453555072203998\\ \mathbf{elif}\;z \leq 7.1 \cdot 10^{+36}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (* (* y b) 1.6453555072203998)))
        (t_2 (+ x (* y 3.13060547623))))
   (if (<= z -4.2e+20)
     t_2
     (if (<= z -6.8e-102)
       t_1
       (if (<= z -2.3e-176)
         (+ x (* (* a (* z y)) 1.6453555072203998))
         (if (<= z 7.1e+36) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + ((y * b) * 1.6453555072203998);
	double t_2 = x + (y * 3.13060547623);
	double tmp;
	if (z <= -4.2e+20) {
		tmp = t_2;
	} else if (z <= -6.8e-102) {
		tmp = t_1;
	} else if (z <= -2.3e-176) {
		tmp = x + ((a * (z * y)) * 1.6453555072203998);
	} else if (z <= 7.1e+36) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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) :: t_2
    real(8) :: tmp
    t_1 = x + ((y * b) * 1.6453555072203998d0)
    t_2 = x + (y * 3.13060547623d0)
    if (z <= (-4.2d+20)) then
        tmp = t_2
    else if (z <= (-6.8d-102)) then
        tmp = t_1
    else if (z <= (-2.3d-176)) then
        tmp = x + ((a * (z * y)) * 1.6453555072203998d0)
    else if (z <= 7.1d+36) then
        tmp = t_1
    else
        tmp = t_2
    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 * b) * 1.6453555072203998);
	double t_2 = x + (y * 3.13060547623);
	double tmp;
	if (z <= -4.2e+20) {
		tmp = t_2;
	} else if (z <= -6.8e-102) {
		tmp = t_1;
	} else if (z <= -2.3e-176) {
		tmp = x + ((a * (z * y)) * 1.6453555072203998);
	} else if (z <= 7.1e+36) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + ((y * b) * 1.6453555072203998)
	t_2 = x + (y * 3.13060547623)
	tmp = 0
	if z <= -4.2e+20:
		tmp = t_2
	elif z <= -6.8e-102:
		tmp = t_1
	elif z <= -2.3e-176:
		tmp = x + ((a * (z * y)) * 1.6453555072203998)
	elif z <= 7.1e+36:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(Float64(y * b) * 1.6453555072203998))
	t_2 = Float64(x + Float64(y * 3.13060547623))
	tmp = 0.0
	if (z <= -4.2e+20)
		tmp = t_2;
	elseif (z <= -6.8e-102)
		tmp = t_1;
	elseif (z <= -2.3e-176)
		tmp = Float64(x + Float64(Float64(a * Float64(z * y)) * 1.6453555072203998));
	elseif (z <= 7.1e+36)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + ((y * b) * 1.6453555072203998);
	t_2 = x + (y * 3.13060547623);
	tmp = 0.0;
	if (z <= -4.2e+20)
		tmp = t_2;
	elseif (z <= -6.8e-102)
		tmp = t_1;
	elseif (z <= -2.3e-176)
		tmp = x + ((a * (z * y)) * 1.6453555072203998);
	elseif (z <= 7.1e+36)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * b), $MachinePrecision] * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.2e+20], t$95$2, If[LessEqual[z, -6.8e-102], t$95$1, If[LessEqual[z, -2.3e-176], N[(x + N[(N[(a * N[(z * y), $MachinePrecision]), $MachinePrecision] * 1.6453555072203998), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.1e+36], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(y \cdot b\right) \cdot 1.6453555072203998\\
t_2 := x + y \cdot 3.13060547623\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{+20}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -6.8 \cdot 10^{-102}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 7.1 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.2e20 or 7.0999999999999995e36 < z

    1. Initial program 12.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. Simplified14.9%

      \[\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 87.6%

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

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

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

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

    if -4.2e20 < z < -6.80000000000000026e-102 or -2.3000000000000001e-176 < z < 7.0999999999999995e36

    1. Initial program 98.2%

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

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

    if -6.80000000000000026e-102 < z < -2.3000000000000001e-176

    1. Initial program 99.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 a around inf 87.5%

      \[\leadsto x + \frac{\color{blue}{a \cdot \left(y \cdot z\right)}}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    4. Taylor expanded in z around 0 87.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+20}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-102}:\\ \;\;\;\;x + \left(y \cdot b\right) \cdot 1.6453555072203998\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-176}:\\ \;\;\;\;x + \left(a \cdot \left(z \cdot y\right)\right) \cdot 1.6453555072203998\\ \mathbf{elif}\;z \leq 7.1 \cdot 10^{+36}:\\ \;\;\;\;x + \left(y \cdot b\right) \cdot 1.6453555072203998\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 83.5% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+22} \lor \neg \left(z \leq 6.5 \cdot 10^{+36}\right):\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x + \left(y \cdot b\right) \cdot 1.6453555072203998\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= z -2.2e+22) (not (<= z 6.5e+36)))
   (+ 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 <= -2.2e+22) || !(z <= 6.5e+36)) {
		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 <= (-2.2d+22)) .or. (.not. (z <= 6.5d+36))) 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 <= -2.2e+22) || !(z <= 6.5e+36)) {
		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 <= -2.2e+22) or not (z <= 6.5e+36):
		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 <= -2.2e+22) || !(z <= 6.5e+36))
		tmp = Float64(x + Float64(y * 3.13060547623));
	else
		tmp = Float64(x + Float64(Float64(y * b) * 1.6453555072203998));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((z <= -2.2e+22) || ~((z <= 6.5e+36)))
		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, -2.2e+22], N[Not[LessEqual[z, 6.5e+36]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * b), $MachinePrecision] * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.2e22 or 6.4999999999999998e36 < z

    1. Initial program 12.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. Simplified14.9%

      \[\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 87.6%

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

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

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

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

    if -2.2e22 < z < 6.4999999999999998e36

    1. Initial program 98.3%

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

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

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

Alternative 16: 49.2% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.6 \cdot 10^{-254}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{-161}:\\ \;\;\;\;y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= x -1.6e-254) x (if (<= x 1.8e-161) (* y 3.13060547623) x)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -1.6e-254) {
		tmp = x;
	} else if (x <= 1.8e-161) {
		tmp = y * 3.13060547623;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (x <= (-1.6d-254)) then
        tmp = x
    else if (x <= 1.8d-161) then
        tmp = y * 3.13060547623d0
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -1.6e-254) {
		tmp = x;
	} else if (x <= 1.8e-161) {
		tmp = y * 3.13060547623;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if x <= -1.6e-254:
		tmp = x
	elif x <= 1.8e-161:
		tmp = y * 3.13060547623
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (x <= -1.6e-254)
		tmp = x;
	elseif (x <= 1.8e-161)
		tmp = Float64(y * 3.13060547623);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (x <= -1.6e-254)
		tmp = x;
	elseif (x <= 1.8e-161)
		tmp = y * 3.13060547623;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.6e-254], x, If[LessEqual[x, 1.8e-161], N[(y * 3.13060547623), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.6 \cdot 10^{-254}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 1.8 \cdot 10^{-161}:\\
\;\;\;\;y \cdot 3.13060547623\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.6e-254 or 1.80000000000000009e-161 < x

    1. Initial program 63.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. Simplified65.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 y around 0 51.1%

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

    if -1.6e-254 < x < 1.80000000000000009e-161

    1. Initial program 54.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. Simplified56.0%

      \[\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 40.6%

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

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

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

      \[\leadsto \color{blue}{y \cdot 3.13060547623 + x} \]
    7. Taylor expanded in y around inf 40.6%

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

      \[\leadsto y \cdot \color{blue}{3.13060547623} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 17: 61.3% accurate, 3.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.9 \cdot 10^{+103}:\\
\;\;\;\;x + y \cdot 3.13060547623\\

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


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

    1. Initial program 60.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. Simplified61.8%

      \[\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 60.3%

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

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

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

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

    if 2.8999999999999998e103 < y

    1. Initial program 65.3%

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

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

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

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

        \[\leadsto y \cdot \left(\color{blue}{b \cdot 1.6453555072203998} + \frac{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) \]
    7. Simplified65.4%

      \[\leadsto y \cdot \left(\color{blue}{b \cdot 1.6453555072203998} + \frac{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) \]
    8. Taylor expanded in z around inf 45.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 2.9 \cdot 10^{+103}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(3.13060547623 + b \cdot 1.6453555072203998\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 61.8% 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 61.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. Simplified63.2%

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

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

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

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

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

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

Alternative 19: 45.0% 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 61.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. Simplified63.2%

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

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

Developer target: 98.4% 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 2024110 
(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))))