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

Percentage Accurate: 58.6% → 98.9%
Time: 26.2s
Alternatives: 18
Speedup: 2.5×

Specification

?
\[\begin{array}{l} \\ x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+
  x
  (/
   (*
    y
    (+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b))
   (+
    (* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z)
    0.607771387771))))
double code(double x, double y, double z, double t, double a, double b) {
	return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = x + ((y * ((((((((z * 3.13060547623d0) + 11.1667541262d0) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407d0) * z) + 31.4690115749d0) * z) + 11.9400905721d0) * z) + 0.607771387771d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
def code(x, y, z, t, a, b):
	return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))
function code(x, y, z, t, a, b)
	return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)))
end
function tmp = code(x, y, z, t, a, b)
	tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 58.6% 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.9% accurate, 0.0× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{b}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\
\mathbf{if}\;z \leq -1.42 \cdot 10^{+20}:\\
\;\;\;\;x - y \cdot \left(\left(\frac{\left(36.52704169880642 - \frac{t}{z}\right) + 457.9610022158428 \cdot \frac{-1}{z}}{z} - 3.13060547623\right) - t\_1\right)\\

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

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


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

    1. Initial program 5.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. Simplified14.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 0 14.4%

      \[\leadsto \color{blue}{x + 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 -inf 99.8%

      \[\leadsto x + 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)} + \color{blue}{\left(3.13060547623 + -1 \cdot \frac{\left(36.52704169880642 + -1 \cdot \frac{t}{z}\right) - 457.9610022158428 \cdot \frac{1}{z}}{z}\right)}\right) \]

    if -1.42e20 < z < 1.3e11

    1. Initial program 99.7%

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

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

    if 1.3e11 < z

    1. Initial program 9.8%

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

      \[\leadsto \color{blue}{x + 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 -inf 99.9%

      \[\leadsto x + 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)} + \color{blue}{\left(3.13060547623 + -1 \cdot \frac{36.52704169880642 + -1 \cdot \frac{\left(-1 \cdot \left(-1 \cdot t - 457.9610022158428\right) + \left(1112.0901850848957 \cdot \frac{1}{z} + \frac{a}{z}\right)\right) - -15.234687407 \cdot \frac{-1 \cdot t - 457.9610022158428}{z}}{z}}{z}\right)}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.8%

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

Alternative 2: 98.9% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{b}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+20}:\\
\;\;\;\;x - y \cdot \left(\left(\frac{\left(36.52704169880642 - \frac{t}{z}\right) + 457.9610022158428 \cdot \frac{-1}{z}}{z} - 3.13060547623\right) - t\_1\right)\\

\mathbf{elif}\;z \leq 4400000:\\
\;\;\;\;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}:\\
\;\;\;\;x - y \cdot \left(\left(\frac{36.52704169880642 - \frac{\left(\left(\frac{a}{z} - 1112.0901850848957 \cdot \frac{-1}{z}\right) + \left(t + 457.9610022158428\right)\right) + -15.234687407 \cdot \frac{t + 457.9610022158428}{z}}{z}}{z} - 3.13060547623\right) - t\_1\right)\\


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

    1. Initial program 5.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. Simplified14.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 0 14.4%

      \[\leadsto \color{blue}{x + 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 -inf 99.8%

      \[\leadsto x + 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)} + \color{blue}{\left(3.13060547623 + -1 \cdot \frac{\left(36.52704169880642 + -1 \cdot \frac{t}{z}\right) - 457.9610022158428 \cdot \frac{1}{z}}{z}\right)}\right) \]

    if -1.4e20 < z < 4.4e6

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

      \[\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 4.4e6 < z

    1. Initial program 9.8%

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

      \[\leadsto \color{blue}{x + 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 -inf 99.9%

      \[\leadsto x + 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)} + \color{blue}{\left(3.13060547623 + -1 \cdot \frac{36.52704169880642 + -1 \cdot \frac{\left(-1 \cdot \left(-1 \cdot t - 457.9610022158428\right) + \left(1112.0901850848957 \cdot \frac{1}{z} + \frac{a}{z}\right)\right) - -15.234687407 \cdot \frac{-1 \cdot t - 457.9610022158428}{z}}{z}}{z}\right)}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+20}:\\ \;\;\;\;x - y \cdot \left(\left(\frac{\left(36.52704169880642 - \frac{t}{z}\right) + 457.9610022158428 \cdot \frac{-1}{z}}{z} - 3.13060547623\right) - \frac{b}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\right)\\ \mathbf{elif}\;z \leq 4400000:\\ \;\;\;\;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}:\\ \;\;\;\;x - y \cdot \left(\left(\frac{36.52704169880642 - \frac{\left(\left(\frac{a}{z} - 1112.0901850848957 \cdot \frac{-1}{z}\right) + \left(t + 457.9610022158428\right)\right) + -15.234687407 \cdot \frac{t + 457.9610022158428}{z}}{z}}{z} - 3.13060547623\right) - \frac{b}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 98.8% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{b}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\ \mathbf{if}\;z \leq -1.42 \cdot 10^{+20}:\\ \;\;\;\;x - y \cdot \left(\left(\frac{\left(36.52704169880642 - \frac{t}{z}\right) + 457.9610022158428 \cdot \frac{-1}{z}}{z} - 3.13060547623\right) - t\_1\right)\\ \mathbf{elif}\;z \leq 58000000:\\ \;\;\;\;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}^{2} \cdot \left(1 + \frac{15.234687407}{z}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \left(\left(\frac{36.52704169880642 - \frac{\left(\left(\frac{a}{z} - 1112.0901850848957 \cdot \frac{-1}{z}\right) + \left(t + 457.9610022158428\right)\right) + -15.234687407 \cdot \frac{t + 457.9610022158428}{z}}{z}}{z} - 3.13060547623\right) - t\_1\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1
         (/
          b
          (+
           0.607771387771
           (*
            z
            (+
             11.9400905721
             (* z (+ 31.4690115749 (* z (+ z 15.234687407))))))))))
   (if (<= z -1.42e+20)
     (-
      x
      (*
       y
       (-
        (-
         (/
          (+ (- 36.52704169880642 (/ t z)) (* 457.9610022158428 (/ -1.0 z)))
          z)
         3.13060547623)
        t_1)))
     (if (<= z 58000000.0)
       (+
        x
        (/
         (*
          y
          (+
           b
           (*
            z
            (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))))
         (+
          0.607771387771
          (*
           z
           (+
            11.9400905721
            (*
             z
             (+ 31.4690115749 (* (pow z 2.0) (+ 1.0 (/ 15.234687407 z))))))))))
       (-
        x
        (*
         y
         (-
          (-
           (/
            (-
             36.52704169880642
             (/
              (+
               (+
                (- (/ a z) (* 1112.0901850848957 (/ -1.0 z)))
                (+ t 457.9610022158428))
               (* -15.234687407 (/ (+ t 457.9610022158428) z)))
              z))
            z)
           3.13060547623)
          t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))));
	double tmp;
	if (z <= -1.42e+20) {
		tmp = x - (y * (((((36.52704169880642 - (t / z)) + (457.9610022158428 * (-1.0 / z))) / z) - 3.13060547623) - t_1));
	} else if (z <= 58000000.0) {
		tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (pow(z, 2.0) * (1.0 + (15.234687407 / z)))))))));
	} else {
		tmp = x - (y * ((((36.52704169880642 - (((((a / z) - (1112.0901850848957 * (-1.0 / z))) + (t + 457.9610022158428)) + (-15.234687407 * ((t + 457.9610022158428) / z))) / z)) / z) - 3.13060547623) - 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 = b / (0.607771387771d0 + (z * (11.9400905721d0 + (z * (31.4690115749d0 + (z * (z + 15.234687407d0)))))))
    if (z <= (-1.42d+20)) then
        tmp = x - (y * (((((36.52704169880642d0 - (t / z)) + (457.9610022158428d0 * ((-1.0d0) / z))) / z) - 3.13060547623d0) - t_1))
    else if (z <= 58000000.0d0) then
        tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262d0 + (z * 3.13060547623d0))))))))) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * (31.4690115749d0 + ((z ** 2.0d0) * (1.0d0 + (15.234687407d0 / z)))))))))
    else
        tmp = x - (y * ((((36.52704169880642d0 - (((((a / z) - (1112.0901850848957d0 * ((-1.0d0) / z))) + (t + 457.9610022158428d0)) + ((-15.234687407d0) * ((t + 457.9610022158428d0) / z))) / z)) / z) - 3.13060547623d0) - 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 = b / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))));
	double tmp;
	if (z <= -1.42e+20) {
		tmp = x - (y * (((((36.52704169880642 - (t / z)) + (457.9610022158428 * (-1.0 / z))) / z) - 3.13060547623) - t_1));
	} else if (z <= 58000000.0) {
		tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (Math.pow(z, 2.0) * (1.0 + (15.234687407 / z)))))))));
	} else {
		tmp = x - (y * ((((36.52704169880642 - (((((a / z) - (1112.0901850848957 * (-1.0 / z))) + (t + 457.9610022158428)) + (-15.234687407 * ((t + 457.9610022158428) / z))) / z)) / z) - 3.13060547623) - t_1));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = b / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))
	tmp = 0
	if z <= -1.42e+20:
		tmp = x - (y * (((((36.52704169880642 - (t / z)) + (457.9610022158428 * (-1.0 / z))) / z) - 3.13060547623) - t_1))
	elif z <= 58000000.0:
		tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (math.pow(z, 2.0) * (1.0 + (15.234687407 / z)))))))))
	else:
		tmp = x - (y * ((((36.52704169880642 - (((((a / z) - (1112.0901850848957 * (-1.0 / z))) + (t + 457.9610022158428)) + (-15.234687407 * ((t + 457.9610022158428) / z))) / z)) / z) - 3.13060547623) - t_1))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(b / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))))
	tmp = 0.0
	if (z <= -1.42e+20)
		tmp = Float64(x - Float64(y * Float64(Float64(Float64(Float64(Float64(36.52704169880642 - Float64(t / z)) + Float64(457.9610022158428 * Float64(-1.0 / z))) / z) - 3.13060547623) - t_1)));
	elseif (z <= 58000000.0)
		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 ^ 2.0) * Float64(1.0 + Float64(15.234687407 / z))))))))));
	else
		tmp = Float64(x - Float64(y * Float64(Float64(Float64(Float64(36.52704169880642 - Float64(Float64(Float64(Float64(Float64(a / z) - Float64(1112.0901850848957 * Float64(-1.0 / z))) + Float64(t + 457.9610022158428)) + Float64(-15.234687407 * Float64(Float64(t + 457.9610022158428) / z))) / z)) / z) - 3.13060547623) - t_1)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = b / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))));
	tmp = 0.0;
	if (z <= -1.42e+20)
		tmp = x - (y * (((((36.52704169880642 - (t / z)) + (457.9610022158428 * (-1.0 / z))) / z) - 3.13060547623) - t_1));
	elseif (z <= 58000000.0)
		tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + ((z ^ 2.0) * (1.0 + (15.234687407 / z)))))))));
	else
		tmp = x - (y * ((((36.52704169880642 - (((((a / z) - (1112.0901850848957 * (-1.0 / z))) + (t + 457.9610022158428)) + (-15.234687407 * ((t + 457.9610022158428) / z))) / z)) / z) - 3.13060547623) - t_1));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b / 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]}, If[LessEqual[z, -1.42e+20], N[(x - N[(y * N[(N[(N[(N[(N[(36.52704169880642 - N[(t / z), $MachinePrecision]), $MachinePrecision] + N[(457.9610022158428 * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - 3.13060547623), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 58000000.0], 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[(N[Power[z, 2.0], $MachinePrecision] * N[(1.0 + N[(15.234687407 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(N[(N[(N[(36.52704169880642 - N[(N[(N[(N[(N[(a / z), $MachinePrecision] - N[(1112.0901850848957 * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t + 457.9610022158428), $MachinePrecision]), $MachinePrecision] + N[(-15.234687407 * N[(N[(t + 457.9610022158428), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - 3.13060547623), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{b}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\
\mathbf{if}\;z \leq -1.42 \cdot 10^{+20}:\\
\;\;\;\;x - y \cdot \left(\left(\frac{\left(36.52704169880642 - \frac{t}{z}\right) + 457.9610022158428 \cdot \frac{-1}{z}}{z} - 3.13060547623\right) - t\_1\right)\\

\mathbf{elif}\;z \leq 58000000:\\
\;\;\;\;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}^{2} \cdot \left(1 + \frac{15.234687407}{z}\right)\right)\right)}\\

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


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

    1. Initial program 5.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. Simplified14.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 0 14.4%

      \[\leadsto \color{blue}{x + 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 -inf 99.8%

      \[\leadsto x + 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)} + \color{blue}{\left(3.13060547623 + -1 \cdot \frac{\left(36.52704169880642 + -1 \cdot \frac{t}{z}\right) - 457.9610022158428 \cdot \frac{1}{z}}{z}\right)}\right) \]

    if -1.42e20 < z < 5.8e7

    1. Initial program 99.7%

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

      \[\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}^{2} \cdot \left(1 + 15.234687407 \cdot \frac{1}{z}\right)} + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    4. Step-by-step derivation
      1. associate-*r/99.7%

        \[\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({z}^{2} \cdot \left(1 + \color{blue}{\frac{15.234687407 \cdot 1}{z}}\right) + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
      2. metadata-eval99.7%

        \[\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({z}^{2} \cdot \left(1 + \frac{\color{blue}{15.234687407}}{z}\right) + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]
    5. Simplified99.7%

      \[\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}^{2} \cdot \left(1 + \frac{15.234687407}{z}\right)} + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771} \]

    if 5.8e7 < z

    1. Initial program 9.8%

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

      \[\leadsto \color{blue}{x + 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 -inf 99.9%

      \[\leadsto x + 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)} + \color{blue}{\left(3.13060547623 + -1 \cdot \frac{36.52704169880642 + -1 \cdot \frac{\left(-1 \cdot \left(-1 \cdot t - 457.9610022158428\right) + \left(1112.0901850848957 \cdot \frac{1}{z} + \frac{a}{z}\right)\right) - -15.234687407 \cdot \frac{-1 \cdot t - 457.9610022158428}{z}}{z}}{z}\right)}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.8%

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

Alternative 4: 98.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := 0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)\\
t_2 := \frac{b}{t\_1}\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{+41} \lor \neg \left(z \leq 6.5 \cdot 10^{+41}\right):\\
\;\;\;\;x - y \cdot \left(\left(\frac{\left(36.52704169880642 - \frac{t}{z}\right) + 457.9610022158428 \cdot \frac{-1}{z}}{z} - 3.13060547623\right) - t\_2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.8000000000000003e41 or 6.49999999999999975e41 < z

    1. Initial program 3.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. 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 y around 0 10.9%

      \[\leadsto \color{blue}{x + 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 -inf 99.8%

      \[\leadsto x + 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)} + \color{blue}{\left(3.13060547623 + -1 \cdot \frac{\left(36.52704169880642 + -1 \cdot \frac{t}{z}\right) - 457.9610022158428 \cdot \frac{1}{z}}{z}\right)}\right) \]

    if -4.8000000000000003e41 < z < 6.49999999999999975e41

    1. Initial program 96.5%

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

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

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

Alternative 5: 98.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := 0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)\\
t_2 := \frac{b}{t\_1}\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+20}:\\
\;\;\;\;x - y \cdot \left(\left(\frac{\left(36.52704169880642 - \frac{t}{z}\right) + 457.9610022158428 \cdot \frac{-1}{z}}{z} - 3.13060547623\right) - t\_2\right)\\

\mathbf{elif}\;z \leq 30000000:\\
\;\;\;\;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)}{t\_1}\\

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


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

    1. Initial program 5.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. Simplified14.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 0 14.4%

      \[\leadsto \color{blue}{x + 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 -inf 99.8%

      \[\leadsto x + 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)} + \color{blue}{\left(3.13060547623 + -1 \cdot \frac{\left(36.52704169880642 + -1 \cdot \frac{t}{z}\right) - 457.9610022158428 \cdot \frac{1}{z}}{z}\right)}\right) \]

    if -1.4e20 < z < 3e7

    1. Initial program 99.7%

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

    if 3e7 < z

    1. Initial program 9.8%

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

      \[\leadsto \color{blue}{x + 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 -inf 99.9%

      \[\leadsto x + 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)} + \color{blue}{\left(3.13060547623 + -1 \cdot \frac{36.52704169880642 + -1 \cdot \frac{\left(-1 \cdot \left(-1 \cdot t - 457.9610022158428\right) + \left(1112.0901850848957 \cdot \frac{1}{z} + \frac{a}{z}\right)\right) - -15.234687407 \cdot \frac{-1 \cdot t - 457.9610022158428}{z}}{z}}{z}\right)}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+20}:\\ \;\;\;\;x - y \cdot \left(\left(\frac{\left(36.52704169880642 - \frac{t}{z}\right) + 457.9610022158428 \cdot \frac{-1}{z}}{z} - 3.13060547623\right) - \frac{b}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\right)\\ \mathbf{elif}\;z \leq 30000000:\\ \;\;\;\;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}:\\ \;\;\;\;x - y \cdot \left(\left(\frac{36.52704169880642 - \frac{\left(\left(\frac{a}{z} - 1112.0901850848957 \cdot \frac{-1}{z}\right) + \left(t + 457.9610022158428\right)\right) + -15.234687407 \cdot \frac{t + 457.9610022158428}{z}}{z}}{z} - 3.13060547623\right) - \frac{b}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 98.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := 0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+20} \lor \neg \left(z \leq 3.8 \cdot 10^{+25}\right):\\
\;\;\;\;x - y \cdot \left(\left(\frac{\left(36.52704169880642 - \frac{t}{z}\right) + 457.9610022158428 \cdot \frac{-1}{z}}{z} - 3.13060547623\right) - \frac{b}{t\_1}\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)}{t\_1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.4e20 or 3.8e25 < z

    1. Initial program 5.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. Simplified15.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 0 15.4%

      \[\leadsto \color{blue}{x + 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 -inf 99.0%

      \[\leadsto x + 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)} + \color{blue}{\left(3.13060547623 + -1 \cdot \frac{\left(36.52704169880642 + -1 \cdot \frac{t}{z}\right) - 457.9610022158428 \cdot \frac{1}{z}}{z}\right)}\right) \]

    if -1.4e20 < z < 3.8e25

    1. Initial program 99.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+20} \lor \neg \left(z \leq 3.8 \cdot 10^{+25}\right):\\ \;\;\;\;x - y \cdot \left(\left(\frac{\left(36.52704169880642 - \frac{t}{z}\right) + 457.9610022158428 \cdot \frac{-1}{z}}{z} - 3.13060547623\right) - \frac{b}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\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 7: 97.2% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 2.4 \cdot 10^{+27}:\\
\;\;\;\;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}:\\
\;\;\;\;x + \left(y \cdot 3.13060547623 - y \cdot \frac{36.52704169880642 + \frac{-457.9610022158428 - t}{z}}{z}\right)\\


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

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

      \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{\left(-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - \left(-15.234687407 \cdot \left(-11.1667541262 \cdot y - -47.69379582500642 \cdot y\right) + 98.5170599679272 \cdot y\right)}{z}\right) - -47.69379582500642 \cdot y}{z} + 3.13060547623 \cdot y\right)} \]
    4. Taylor expanded in y around 0 96.7%

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

    if -1.42e20 < z < 2.39999999999999998e27

    1. Initial program 99.7%

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

    if 2.39999999999999998e27 < z

    1. Initial program 4.8%

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

      \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{\left(-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - \left(-15.234687407 \cdot \left(-11.1667541262 \cdot y - -47.69379582500642 \cdot y\right) + 98.5170599679272 \cdot y\right)}{z}\right) - -47.69379582500642 \cdot y}{z} + 3.13060547623 \cdot y\right)} \]
    4. Taylor expanded in y around 0 91.0%

      \[\leadsto x + \left(-1 \cdot \color{blue}{\frac{y \cdot \left(36.52704169880642 + -1 \cdot \frac{457.9610022158428 + t}{z}\right)}{z}} + 3.13060547623 \cdot y\right) \]
    5. Step-by-step derivation
      1. associate-/l*96.3%

        \[\leadsto x + \left(-1 \cdot \color{blue}{\left(y \cdot \frac{36.52704169880642 + -1 \cdot \frac{457.9610022158428 + t}{z}}{z}\right)} + 3.13060547623 \cdot y\right) \]
      2. associate-*r/96.3%

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

        \[\leadsto x + \left(-1 \cdot \left(y \cdot \frac{36.52704169880642 + \frac{\color{blue}{-\left(457.9610022158428 + t\right)}}{z}}{z}\right) + 3.13060547623 \cdot y\right) \]
      4. distribute-neg-in96.3%

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

        \[\leadsto x + \left(-1 \cdot \left(y \cdot \frac{36.52704169880642 + \frac{\color{blue}{\left(-457.9610022158428\right) - t}}{z}}{z}\right) + 3.13060547623 \cdot y\right) \]
      6. metadata-eval96.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.42 \cdot 10^{+20}:\\ \;\;\;\;x + \left(\frac{y \cdot \left(\frac{t + 457.9610022158428}{z} - 36.52704169880642\right)}{z} + y \cdot 3.13060547623\right)\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+27}:\\ \;\;\;\;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}:\\ \;\;\;\;x + \left(y \cdot 3.13060547623 - y \cdot \frac{36.52704169880642 + \frac{-457.9610022158428 - t}{z}}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 96.6% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq 4.8 \cdot 10^{+24}:\\
\;\;\;\;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)}\\

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


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

    1. Initial program 12.6%

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

      \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{\left(-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - \left(-15.234687407 \cdot \left(-11.1667541262 \cdot y - -47.69379582500642 \cdot y\right) + 98.5170599679272 \cdot y\right)}{z}\right) - -47.69379582500642 \cdot y}{z} + 3.13060547623 \cdot y\right)} \]
    4. Taylor expanded in y around 0 96.5%

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

    if -2e4 < z < 4.8000000000000001e24

    1. Initial program 99.7%

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

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

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

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

    if 4.8000000000000001e24 < z

    1. Initial program 4.8%

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

      \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{\left(-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - \left(-15.234687407 \cdot \left(-11.1667541262 \cdot y - -47.69379582500642 \cdot y\right) + 98.5170599679272 \cdot y\right)}{z}\right) - -47.69379582500642 \cdot y}{z} + 3.13060547623 \cdot y\right)} \]
    4. Taylor expanded in y around 0 91.0%

      \[\leadsto x + \left(-1 \cdot \color{blue}{\frac{y \cdot \left(36.52704169880642 + -1 \cdot \frac{457.9610022158428 + t}{z}\right)}{z}} + 3.13060547623 \cdot y\right) \]
    5. Step-by-step derivation
      1. associate-/l*96.3%

        \[\leadsto x + \left(-1 \cdot \color{blue}{\left(y \cdot \frac{36.52704169880642 + -1 \cdot \frac{457.9610022158428 + t}{z}}{z}\right)} + 3.13060547623 \cdot y\right) \]
      2. associate-*r/96.3%

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

        \[\leadsto x + \left(-1 \cdot \left(y \cdot \frac{36.52704169880642 + \frac{\color{blue}{-\left(457.9610022158428 + t\right)}}{z}}{z}\right) + 3.13060547623 \cdot y\right) \]
      4. distribute-neg-in96.3%

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

        \[\leadsto x + \left(-1 \cdot \left(y \cdot \frac{36.52704169880642 + \frac{\color{blue}{\left(-457.9610022158428\right) - t}}{z}}{z}\right) + 3.13060547623 \cdot y\right) \]
      6. metadata-eval96.3%

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

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

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

Alternative 9: 92.9% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.049 \lor \neg \left(z \leq 7.2 \cdot 10^{+25}\right):\\
\;\;\;\;x + \left(y \cdot 3.13060547623 - y \cdot \frac{36.52704169880642 + \frac{-457.9610022158428 - t}{z}}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.049000000000000002 or 7.20000000000000031e25 < 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. Add Preprocessing
    3. Taylor expanded in z around -inf 84.7%

      \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{\left(-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - \left(-15.234687407 \cdot \left(-11.1667541262 \cdot y - -47.69379582500642 \cdot y\right) + 98.5170599679272 \cdot y\right)}{z}\right) - -47.69379582500642 \cdot y}{z} + 3.13060547623 \cdot y\right)} \]
    4. Taylor expanded in y around 0 94.0%

      \[\leadsto x + \left(-1 \cdot \color{blue}{\frac{y \cdot \left(36.52704169880642 + -1 \cdot \frac{457.9610022158428 + t}{z}\right)}{z}} + 3.13060547623 \cdot y\right) \]
    5. Step-by-step derivation
      1. associate-/l*96.3%

        \[\leadsto x + \left(-1 \cdot \color{blue}{\left(y \cdot \frac{36.52704169880642 + -1 \cdot \frac{457.9610022158428 + t}{z}}{z}\right)} + 3.13060547623 \cdot y\right) \]
      2. associate-*r/96.3%

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

        \[\leadsto x + \left(-1 \cdot \left(y \cdot \frac{36.52704169880642 + \frac{\color{blue}{-\left(457.9610022158428 + t\right)}}{z}}{z}\right) + 3.13060547623 \cdot y\right) \]
      4. distribute-neg-in96.3%

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

        \[\leadsto x + \left(-1 \cdot \left(y \cdot \frac{36.52704169880642 + \frac{\color{blue}{\left(-457.9610022158428\right) - t}}{z}}{z}\right) + 3.13060547623 \cdot y\right) \]
      6. metadata-eval96.3%

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

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

    if -0.049000000000000002 < z < 7.20000000000000031e25

    1. Initial program 99.7%

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

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

      \[\leadsto x + \left(1.6453555072203998 \cdot \left(b \cdot y\right) + \color{blue}{1.6453555072203998 \cdot \left(a \cdot \left(y \cdot z\right)\right)}\right) \]
    5. Step-by-step derivation
      1. *-commutative90.8%

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-y\right)} \cdot \left(-1.6453555072203998 \cdot b + -1.6453555072203998 \cdot \left(a \cdot z\right)\right) \]
      3. distribute-lft-out92.0%

        \[\leadsto x + \left(-y\right) \cdot \color{blue}{\left(-1.6453555072203998 \cdot \left(b + a \cdot z\right)\right)} \]
    9. Simplified92.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.049 \lor \neg \left(z \leq 7.2 \cdot 10^{+25}\right):\\ \;\;\;\;x + \left(y \cdot 3.13060547623 - y \cdot \frac{36.52704169880642 + \frac{-457.9610022158428 - t}{z}}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \left(-1.6453555072203998 \cdot \left(b + z \cdot a\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 92.4% accurate, 1.4× speedup?

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

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

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

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


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

    1. Initial program 12.6%

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

      \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{\left(-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - \left(-15.234687407 \cdot \left(-11.1667541262 \cdot y - -47.69379582500642 \cdot y\right) + 98.5170599679272 \cdot y\right)}{z}\right) - -47.69379582500642 \cdot y}{z} + 3.13060547623 \cdot y\right)} \]
    4. Taylor expanded in y around 0 96.5%

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

    if -0.0269999999999999997 < z < 1.6e21

    1. Initial program 99.7%

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

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

      \[\leadsto x + \left(1.6453555072203998 \cdot \left(b \cdot y\right) + \color{blue}{1.6453555072203998 \cdot \left(a \cdot \left(y \cdot z\right)\right)}\right) \]
    5. Step-by-step derivation
      1. *-commutative90.8%

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-y\right)} \cdot \left(-1.6453555072203998 \cdot b + -1.6453555072203998 \cdot \left(a \cdot z\right)\right) \]
      3. distribute-lft-out92.0%

        \[\leadsto x + \left(-y\right) \cdot \color{blue}{\left(-1.6453555072203998 \cdot \left(b + a \cdot z\right)\right)} \]
    9. Simplified92.0%

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

    if 1.6e21 < z

    1. Initial program 4.8%

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

      \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{\left(-11.1667541262 \cdot y + -1 \cdot \frac{t \cdot y - \left(-15.234687407 \cdot \left(-11.1667541262 \cdot y - -47.69379582500642 \cdot y\right) + 98.5170599679272 \cdot y\right)}{z}\right) - -47.69379582500642 \cdot y}{z} + 3.13060547623 \cdot y\right)} \]
    4. Taylor expanded in y around 0 91.0%

      \[\leadsto x + \left(-1 \cdot \color{blue}{\frac{y \cdot \left(36.52704169880642 + -1 \cdot \frac{457.9610022158428 + t}{z}\right)}{z}} + 3.13060547623 \cdot y\right) \]
    5. Step-by-step derivation
      1. associate-/l*96.3%

        \[\leadsto x + \left(-1 \cdot \color{blue}{\left(y \cdot \frac{36.52704169880642 + -1 \cdot \frac{457.9610022158428 + t}{z}}{z}\right)} + 3.13060547623 \cdot y\right) \]
      2. associate-*r/96.3%

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

        \[\leadsto x + \left(-1 \cdot \left(y \cdot \frac{36.52704169880642 + \frac{\color{blue}{-\left(457.9610022158428 + t\right)}}{z}}{z}\right) + 3.13060547623 \cdot y\right) \]
      4. distribute-neg-in96.3%

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

        \[\leadsto x + \left(-1 \cdot \left(y \cdot \frac{36.52704169880642 + \frac{\color{blue}{\left(-457.9610022158428\right) - t}}{z}}{z}\right) + 3.13060547623 \cdot y\right) \]
      6. metadata-eval96.3%

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

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

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

Alternative 11: 83.2% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot 3.13060547623\\ \mathbf{if}\;z \leq -1.4 \cdot 10^{+20}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{-83}:\\ \;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+43}:\\ \;\;\;\;x + 1.6453555072203998 \cdot \left(a \cdot \left(z \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (* y 3.13060547623))))
   (if (<= z -1.4e+20)
     t_1
     (if (<= z 1.95e-83)
       (+ x (* y (* b 1.6453555072203998)))
       (if (<= z 2e+43) (+ x (* 1.6453555072203998 (* a (* z y)))) 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.4e+20) {
		tmp = t_1;
	} else if (z <= 1.95e-83) {
		tmp = x + (y * (b * 1.6453555072203998));
	} else if (z <= 2e+43) {
		tmp = x + (1.6453555072203998 * (a * (z * y)));
	} 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.4d+20)) then
        tmp = t_1
    else if (z <= 1.95d-83) then
        tmp = x + (y * (b * 1.6453555072203998d0))
    else if (z <= 2d+43) then
        tmp = x + (1.6453555072203998d0 * (a * (z * y)))
    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.4e+20) {
		tmp = t_1;
	} else if (z <= 1.95e-83) {
		tmp = x + (y * (b * 1.6453555072203998));
	} else if (z <= 2e+43) {
		tmp = x + (1.6453555072203998 * (a * (z * y)));
	} 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.4e+20:
		tmp = t_1
	elif z <= 1.95e-83:
		tmp = x + (y * (b * 1.6453555072203998))
	elif z <= 2e+43:
		tmp = x + (1.6453555072203998 * (a * (z * y)))
	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.4e+20)
		tmp = t_1;
	elseif (z <= 1.95e-83)
		tmp = Float64(x + Float64(y * Float64(b * 1.6453555072203998)));
	elseif (z <= 2e+43)
		tmp = Float64(x + Float64(1.6453555072203998 * Float64(a * Float64(z * y))));
	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.4e+20)
		tmp = t_1;
	elseif (z <= 1.95e-83)
		tmp = x + (y * (b * 1.6453555072203998));
	elseif (z <= 2e+43)
		tmp = x + (1.6453555072203998 * (a * (z * y)));
	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.4e+20], t$95$1, If[LessEqual[z, 1.95e-83], N[(x + N[(y * N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+43], N[(x + N[(1.6453555072203998 * N[(a * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.4e20 or 2.00000000000000003e43 < z

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

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

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

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

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

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

    if -1.4e20 < z < 1.95e-83

    1. Initial program 99.7%

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

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

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

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

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

    if 1.95e-83 < z < 2.00000000000000003e43

    1. Initial program 87.7%

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

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

      \[\leadsto x + \left(1.6453555072203998 \cdot \left(b \cdot y\right) + \color{blue}{1.6453555072203998 \cdot \left(a \cdot \left(y \cdot z\right)\right)}\right) \]
    5. Step-by-step derivation
      1. *-commutative71.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+20}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{-83}:\\ \;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+43}:\\ \;\;\;\;x + 1.6453555072203998 \cdot \left(a \cdot \left(z \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 83.2% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot 3.13060547623\\ \mathbf{if}\;z \leq -1.4 \cdot 10^{+20}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.75 \cdot 10^{-84}:\\ \;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+43}:\\ \;\;\;\;x + \left(a \cdot 1.6453555072203998\right) \cdot \left(z \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (* y 3.13060547623))))
   (if (<= z -1.4e+20)
     t_1
     (if (<= z 2.75e-84)
       (+ x (* y (* b 1.6453555072203998)))
       (if (<= z 2e+43) (+ x (* (* a 1.6453555072203998) (* z y))) 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.4e+20) {
		tmp = t_1;
	} else if (z <= 2.75e-84) {
		tmp = x + (y * (b * 1.6453555072203998));
	} else if (z <= 2e+43) {
		tmp = x + ((a * 1.6453555072203998) * (z * y));
	} 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.4d+20)) then
        tmp = t_1
    else if (z <= 2.75d-84) then
        tmp = x + (y * (b * 1.6453555072203998d0))
    else if (z <= 2d+43) then
        tmp = x + ((a * 1.6453555072203998d0) * (z * y))
    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.4e+20) {
		tmp = t_1;
	} else if (z <= 2.75e-84) {
		tmp = x + (y * (b * 1.6453555072203998));
	} else if (z <= 2e+43) {
		tmp = x + ((a * 1.6453555072203998) * (z * y));
	} 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.4e+20:
		tmp = t_1
	elif z <= 2.75e-84:
		tmp = x + (y * (b * 1.6453555072203998))
	elif z <= 2e+43:
		tmp = x + ((a * 1.6453555072203998) * (z * y))
	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.4e+20)
		tmp = t_1;
	elseif (z <= 2.75e-84)
		tmp = Float64(x + Float64(y * Float64(b * 1.6453555072203998)));
	elseif (z <= 2e+43)
		tmp = Float64(x + Float64(Float64(a * 1.6453555072203998) * Float64(z * y)));
	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.4e+20)
		tmp = t_1;
	elseif (z <= 2.75e-84)
		tmp = x + (y * (b * 1.6453555072203998));
	elseif (z <= 2e+43)
		tmp = x + ((a * 1.6453555072203998) * (z * y));
	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.4e+20], t$95$1, If[LessEqual[z, 2.75e-84], N[(x + N[(y * N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+43], N[(x + N[(N[(a * 1.6453555072203998), $MachinePrecision] * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.4e20 or 2.00000000000000003e43 < z

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

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

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

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

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

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

    if -1.4e20 < z < 2.7500000000000001e-84

    1. Initial program 99.7%

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

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

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

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

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

    if 2.7500000000000001e-84 < z < 2.00000000000000003e43

    1. Initial program 87.7%

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

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

      \[\leadsto x + \left(1.6453555072203998 \cdot \left(b \cdot y\right) + \color{blue}{1.6453555072203998 \cdot \left(a \cdot \left(y \cdot z\right)\right)}\right) \]
    5. Step-by-step derivation
      1. *-commutative71.8%

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

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

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

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

        \[\leadsto x + \left(1.6453555072203998 \cdot a\right) \cdot \color{blue}{\left(z \cdot y\right)} \]
    9. Simplified66.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+20}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq 2.75 \cdot 10^{-84}:\\ \;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+43}:\\ \;\;\;\;x + \left(a \cdot 1.6453555072203998\right) \cdot \left(z \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 90.1% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+20} \lor \neg \left(z \leq 1.1 \cdot 10^{+24}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.4e20 or 1.10000000000000001e24 < z

    1. Initial program 5.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. Simplified15.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 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.4e20 < z < 1.10000000000000001e24

    1. Initial program 99.7%

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

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

      \[\leadsto x + \left(1.6453555072203998 \cdot \left(b \cdot y\right) + \color{blue}{1.6453555072203998 \cdot \left(a \cdot \left(y \cdot z\right)\right)}\right) \]
    5. Step-by-step derivation
      1. *-commutative89.8%

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

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

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

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

        \[\leadsto x + 1.6453555072203998 \cdot \left(a \cdot \color{blue}{\left(z \cdot y\right)} + b \cdot y\right) \]
      3. associate-*r*90.2%

        \[\leadsto x + 1.6453555072203998 \cdot \left(\color{blue}{\left(a \cdot z\right) \cdot y} + b \cdot y\right) \]
      4. distribute-rgt-out90.9%

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

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

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

Alternative 14: 90.1% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+20} \lor \neg \left(z \leq 2.4 \cdot 10^{+26}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.4e20 or 2.40000000000000005e26 < z

    1. Initial program 5.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. Simplified15.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 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.4e20 < z < 2.40000000000000005e26

    1. Initial program 99.7%

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

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

      \[\leadsto x + \left(1.6453555072203998 \cdot \left(b \cdot y\right) + \color{blue}{1.6453555072203998 \cdot \left(a \cdot \left(y \cdot z\right)\right)}\right) \]
    5. Step-by-step derivation
      1. *-commutative89.8%

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-y\right)} \cdot \left(-1.6453555072203998 \cdot b + -1.6453555072203998 \cdot \left(a \cdot z\right)\right) \]
      3. distribute-lft-out90.9%

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

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

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

Alternative 15: 83.0% accurate, 2.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+20} \lor \neg \left(z \leq 1.55 \cdot 10^{-35}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.4e20 or 1.55000000000000006e-35 < z

    1. Initial program 15.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. Simplified24.3%

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

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

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

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

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

    if -1.4e20 < z < 1.55000000000000006e-35

    1. Initial program 99.7%

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

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

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

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

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

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

Alternative 16: 64.8% accurate, 2.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{-60} \lor \neg \left(z \leq 6.6 \cdot 10^{-71}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.54999999999999994e-60 or 6.6000000000000003e-71 < z

    1. Initial program 27.8%

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

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

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

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

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

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

    if -1.54999999999999994e-60 < z < 6.6000000000000003e-71

    1. Initial program 99.7%

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification62.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{-60} \lor \neg \left(z \leq 6.6 \cdot 10^{-71}\right):\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 50.5% accurate, 2.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1000000000000:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 1.45 \cdot 10^{-110}:\\
\;\;\;\;y \cdot 3.13060547623\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1e12 or 1.4500000000000001e-110 < x

    1. Initial program 60.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. Simplified65.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 0 62.9%

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

    if -1e12 < x < 1.4500000000000001e-110

    1. Initial program 50.8%

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{3.13060547623} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification53.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1000000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.45 \cdot 10^{-110}:\\ \;\;\;\;y \cdot 3.13060547623\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 45.1% accurate, 37.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
def code(x, y, z, t, a, b):
	return x
function code(x, y, z, t, a, b)
	return x
end
function tmp = code(x, y, z, t, a, b)
	tmp = x;
end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 56.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. Simplified60.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 y around 0 41.3%

    \[\leadsto \color{blue}{x} \]
  5. Final simplification41.3%

    \[\leadsto x \]
  6. 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 2024071 
(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))))