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

Percentage Accurate: 57.2% → 97.5%
Time: 18.1s
Alternatives: 20
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 20 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: 57.2% accurate, 1.0× speedup?

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

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

Alternative 1: 97.5% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.8e19 or 9.99999999999999977e37 < z

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

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

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

      \[\leadsto x + \left(\color{blue}{-1 \cdot \frac{y \cdot \left(36.52704169880642 + -1 \cdot \frac{457.9610022158428 + t}{z}\right)}{z}} + 3.13060547623 \cdot y\right) \]
    6. Step-by-step derivation
      1. mul-1-neg95.9%

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

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

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

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

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

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

    if -5.8e19 < z < 9.99999999999999977e37

    1. Initial program 99.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. Recombined 2 regimes into one program.
  4. Final simplification98.4%

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

Alternative 2: 97.9% accurate, 0.0× speedup?

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

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

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


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

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

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

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

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(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 88.4%

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

      \[\leadsto x + \left(\color{blue}{-1 \cdot \frac{y \cdot \left(36.52704169880642 + -1 \cdot \frac{457.9610022158428 + t}{z}\right)}{z}} + 3.13060547623 \cdot y\right) \]
    6. Step-by-step derivation
      1. mul-1-neg98.1%

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

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

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

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

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

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

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

Alternative 3: 97.4% accurate, 0.0× speedup?

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

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

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


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

    1. Initial program 94.3%

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

      \[\leadsto x + \color{blue}{\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) \cdot \left(-y\right)\right) \cdot \frac{1}{-\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}} \]
    4. Step-by-step derivation
      1. associate-*l*97.0%

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

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

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

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(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 88.4%

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

      \[\leadsto x + \left(\color{blue}{-1 \cdot \frac{y \cdot \left(36.52704169880642 + -1 \cdot \frac{457.9610022158428 + t}{z}\right)}{z}} + 3.13060547623 \cdot y\right) \]
    6. Step-by-step derivation
      1. mul-1-neg98.1%

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

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

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

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

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

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

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

Alternative 4: 96.1% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.5e18 or 2.4e7 < z

    1. Initial program 8.9%

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

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

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

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

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

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

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

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

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

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

    if -1.5e18 < z < 2.4e7

    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 97.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)}{\color{blue}{z \cdot \left(11.9400905721 + 31.4690115749 \cdot z\right)} + 0.607771387771} \]
    4. Step-by-step derivation
      1. *-commutative97.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)}{z \cdot \left(11.9400905721 + \color{blue}{z \cdot 31.4690115749}\right) + 0.607771387771} \]
    5. Simplified97.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)}{\color{blue}{z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)} + 0.607771387771} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification97.3%

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

Alternative 5: 96.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.41 \lor \neg \left(z \leq 23000000\right):\\ \;\;\;\;x + \left(y \cdot \frac{\frac{t + 457.9610022158428}{z} - 36.52704169880642}{z} + y \cdot 3.13060547623\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{0.607771387771 + z \cdot 11.9400905721}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= z -0.41) (not (<= z 23000000.0)))
   (+
    x
    (+
     (* y (/ (- (/ (+ t 457.9610022158428) z) 36.52704169880642) z))
     (* y 3.13060547623)))
   (+
    x
    (/
     (*
      y
      (+
       (* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
       b))
     (+ 0.607771387771 (* z 11.9400905721))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((z <= -0.41) || !(z <= 23000000.0)) {
		tmp = x + ((y * ((((t + 457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623));
	} else {
		tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * 11.9400905721)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if ((z <= (-0.41d0)) .or. (.not. (z <= 23000000.0d0))) then
        tmp = x + ((y * ((((t + 457.9610022158428d0) / z) - 36.52704169880642d0) / z)) + (y * 3.13060547623d0))
    else
        tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623d0) + 11.1667541262d0)) + t)) + a)) + b)) / (0.607771387771d0 + (z * 11.9400905721d0)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((z <= -0.41) || !(z <= 23000000.0)) {
		tmp = x + ((y * ((((t + 457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623));
	} else {
		tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * 11.9400905721)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (z <= -0.41) or not (z <= 23000000.0):
		tmp = x + ((y * ((((t + 457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623))
	else:
		tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * 11.9400905721)))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((z <= -0.41) || !(z <= 23000000.0))
		tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(t + 457.9610022158428) / z) - 36.52704169880642) / z)) + Float64(y * 3.13060547623)));
	else
		tmp = Float64(x + Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(0.607771387771 + Float64(z * 11.9400905721))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((z <= -0.41) || ~((z <= 23000000.0)))
		tmp = x + ((y * ((((t + 457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623));
	else
		tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * 11.9400905721)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -0.41], N[Not[LessEqual[z, 23000000.0]], $MachinePrecision]], N[(x + N[(N[(y * N[(N[(N[(N[(t + 457.9610022158428), $MachinePrecision] / z), $MachinePrecision] - 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.409999999999999976 or 2.3e7 < z

    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. Simplified16.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 86.8%

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

      \[\leadsto x + \left(\color{blue}{-1 \cdot \frac{y \cdot \left(36.52704169880642 + -1 \cdot \frac{457.9610022158428 + t}{z}\right)}{z}} + 3.13060547623 \cdot y\right) \]
    6. Step-by-step derivation
      1. mul-1-neg94.6%

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

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

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

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

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

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

    if -0.409999999999999976 < z < 2.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
    3. Taylor expanded in z around 0 98.0%

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

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

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

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

Alternative 6: 95.8% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 8.9%

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

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

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

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

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

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

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

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

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

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

    if -1.4e18 < z < 4.2e7

    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 97.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)}{\color{blue}{z \cdot \left(11.9400905721 + 31.4690115749 \cdot z\right)} + 0.607771387771} \]
    4. Step-by-step derivation
      1. *-commutative97.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)}{z \cdot \left(11.9400905721 + \color{blue}{z \cdot 31.4690115749}\right) + 0.607771387771} \]
    5. Simplified97.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)}{\color{blue}{z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)} + 0.607771387771} \]
    6. Taylor expanded in z around 0 80.4%

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

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

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

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

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

Alternative 7: 92.9% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.65e18 or 2.75e7 < z

    1. Initial program 8.9%

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

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

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

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

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

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

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

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

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

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

    if -1.65e18 < z < 2.75e7

    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 97.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)}{\color{blue}{z \cdot \left(11.9400905721 + 31.4690115749 \cdot z\right)} + 0.607771387771} \]
    4. Step-by-step derivation
      1. *-commutative97.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)}{z \cdot \left(11.9400905721 + \color{blue}{z \cdot 31.4690115749}\right) + 0.607771387771} \]
    5. Simplified97.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)}{\color{blue}{z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)} + 0.607771387771} \]
    6. Taylor expanded in z around 0 80.4%

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

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

        \[\leadsto x + \frac{\color{blue}{\left(a \cdot y\right) \cdot z} + b \cdot y}{z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right) + 0.607771387771} \]
      2. *-commutative78.6%

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

        \[\leadsto x + \frac{\color{blue}{y \cdot \left(a \cdot z\right)} + b \cdot y}{z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right) + 0.607771387771} \]
      4. *-commutative90.2%

        \[\leadsto x + \frac{y \cdot \left(a \cdot z\right) + \color{blue}{y \cdot b}}{z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right) + 0.607771387771} \]
      5. distribute-lft-out91.6%

        \[\leadsto x + \frac{\color{blue}{y \cdot \left(a \cdot z + b\right)}}{z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right) + 0.607771387771} \]
      6. *-commutative91.6%

        \[\leadsto x + \frac{y \cdot \left(\color{blue}{z \cdot a} + b\right)}{z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right) + 0.607771387771} \]
    9. Simplified91.6%

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

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

Alternative 8: 92.6% accurate, 1.4× speedup?

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

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

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


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

    1. Initial program 8.9%

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

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

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

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

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

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

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

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

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

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

    if -1.4e18 < z < 1.5e7

    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 z around 0 74.6%

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

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

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

Alternative 9: 89.6% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+19}:\\
\;\;\;\;x + y \cdot 3.13060547623\\

\mathbf{elif}\;z \leq 44000000:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998 + z \cdot \left(a \cdot 1.6453555072203998 - b \cdot 32.324150453290734\right)\right)\\

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


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

    1. Initial program 11.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. 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 89.7%

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

    if -2.8e19 < z < 4.4e7

    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 z around 0 74.6%

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

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

    if 4.4e7 < z

    1. Initial program 6.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. Simplified9.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 z around -inf 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 83.0% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+18}:\\
\;\;\;\;x + y \cdot 3.13060547623\\

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

\mathbf{elif}\;z \leq 15000000:\\
\;\;\;\;a \cdot \left(\frac{x}{a} - y \cdot \left(z \cdot -1.6453555072203998\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.65e18

    1. Initial program 11.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. 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 89.7%

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

    if -1.65e18 < z < 7.4999999999999994e-26

    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 z around 0 80.2%

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

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

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

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

    if 7.4999999999999994e-26 < z < 1.5e7

    1. Initial program 99.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(-1.6453555072203998 \cdot \left(y \cdot z\right) + -1 \cdot \frac{x}{a}\right)\right)} \]
    9. Step-by-step derivation
      1. mul-1-neg71.8%

        \[\leadsto \color{blue}{-a \cdot \left(-1.6453555072203998 \cdot \left(y \cdot z\right) + -1 \cdot \frac{x}{a}\right)} \]
      2. distribute-rgt-neg-in71.8%

        \[\leadsto \color{blue}{a \cdot \left(-\left(-1.6453555072203998 \cdot \left(y \cdot z\right) + -1 \cdot \frac{x}{a}\right)\right)} \]
      3. mul-1-neg71.8%

        \[\leadsto a \cdot \left(-\left(-1.6453555072203998 \cdot \left(y \cdot z\right) + \color{blue}{\left(-\frac{x}{a}\right)}\right)\right) \]
      4. unsub-neg71.8%

        \[\leadsto a \cdot \left(-\color{blue}{\left(-1.6453555072203998 \cdot \left(y \cdot z\right) - \frac{x}{a}\right)}\right) \]
      5. *-commutative71.8%

        \[\leadsto a \cdot \left(-\left(\color{blue}{\left(y \cdot z\right) \cdot -1.6453555072203998} - \frac{x}{a}\right)\right) \]
      6. associate-*l*71.8%

        \[\leadsto a \cdot \left(-\left(\color{blue}{y \cdot \left(z \cdot -1.6453555072203998\right)} - \frac{x}{a}\right)\right) \]
    10. Simplified71.8%

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

    if 1.5e7 < z

    1. Initial program 6.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. Simplified9.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 z around -inf 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 83.0% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+18}:\\
\;\;\;\;x + y \cdot 3.13060547623\\

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

\mathbf{elif}\;z \leq 23000000:\\
\;\;\;\;a \cdot \left(\frac{x}{a} + 1.6453555072203998 \cdot \left(y \cdot z\right)\right)\\

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


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

    1. Initial program 11.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. 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 89.7%

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

    if -6e18 < z < 6.00000000000000005e-28

    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 z around 0 80.2%

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

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

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

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

    if 6.00000000000000005e-28 < z < 2.3e7

    1. Initial program 99.6%

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

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

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

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

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

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

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

    if 2.3e7 < z

    1. Initial program 6.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. Simplified9.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 z around -inf 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 89.1% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+18}:\\
\;\;\;\;x + y \cdot 3.13060547623\\

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

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


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

    1. Initial program 11.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. 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 89.7%

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

    if -4.6e18 < z < 3.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. 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 z around 0 74.6%

      \[\leadsto \color{blue}{x + \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)} \]
    5. Taylor expanded in a around inf 88.9%

      \[\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) \]

    if 3.3e7 < z

    1. Initial program 6.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. Simplified9.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 z around -inf 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 83.3% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+18}:\\
\;\;\;\;x + y \cdot 3.13060547623\\

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

\mathbf{elif}\;z \leq 16000000:\\
\;\;\;\;x + 1.6453555072203998 \cdot \left(y \cdot \left(z \cdot a\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.7e18

    1. Initial program 11.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. 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 89.7%

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

    if -1.7e18 < z < 6.6000000000000005e-38

    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 z around 0 79.9%

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

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

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

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

    if 6.6000000000000005e-38 < z < 1.6e7

    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.6%

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

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

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

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

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

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

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

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

        \[\leadsto x + 1.6453555072203998 \cdot \color{blue}{\left(y \cdot \left(z \cdot a\right)\right)} \]
    10. Simplified75.5%

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

    if 1.6e7 < z

    1. Initial program 6.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. Simplified9.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 z around -inf 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 83.2% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot 3.13060547623\\ \mathbf{if}\;z \leq -3.2 \cdot 10^{+19}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{-36}:\\ \;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\ \mathbf{elif}\;z \leq 44000000:\\ \;\;\;\;x + 1.6453555072203998 \cdot \left(y \cdot \left(z \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (* y 3.13060547623))))
   (if (<= z -3.2e+19)
     t_1
     (if (<= z 6.6e-36)
       (+ x (* y (* b 1.6453555072203998)))
       (if (<= z 44000000.0)
         (+ x (* 1.6453555072203998 (* y (* z a))))
         t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (y * 3.13060547623);
	double tmp;
	if (z <= -3.2e+19) {
		tmp = t_1;
	} else if (z <= 6.6e-36) {
		tmp = x + (y * (b * 1.6453555072203998));
	} else if (z <= 44000000.0) {
		tmp = x + (1.6453555072203998 * (y * (z * a)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (y * 3.13060547623d0)
    if (z <= (-3.2d+19)) then
        tmp = t_1
    else if (z <= 6.6d-36) then
        tmp = x + (y * (b * 1.6453555072203998d0))
    else if (z <= 44000000.0d0) then
        tmp = x + (1.6453555072203998d0 * (y * (z * a)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (y * 3.13060547623);
	double tmp;
	if (z <= -3.2e+19) {
		tmp = t_1;
	} else if (z <= 6.6e-36) {
		tmp = x + (y * (b * 1.6453555072203998));
	} else if (z <= 44000000.0) {
		tmp = x + (1.6453555072203998 * (y * (z * a)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (y * 3.13060547623)
	tmp = 0
	if z <= -3.2e+19:
		tmp = t_1
	elif z <= 6.6e-36:
		tmp = x + (y * (b * 1.6453555072203998))
	elif z <= 44000000.0:
		tmp = x + (1.6453555072203998 * (y * (z * a)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(y * 3.13060547623))
	tmp = 0.0
	if (z <= -3.2e+19)
		tmp = t_1;
	elseif (z <= 6.6e-36)
		tmp = Float64(x + Float64(y * Float64(b * 1.6453555072203998)));
	elseif (z <= 44000000.0)
		tmp = Float64(x + Float64(1.6453555072203998 * Float64(y * Float64(z * a))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (y * 3.13060547623);
	tmp = 0.0;
	if (z <= -3.2e+19)
		tmp = t_1;
	elseif (z <= 6.6e-36)
		tmp = x + (y * (b * 1.6453555072203998));
	elseif (z <= 44000000.0)
		tmp = x + (1.6453555072203998 * (y * (z * a)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.2e+19], t$95$1, If[LessEqual[z, 6.6e-36], N[(x + N[(y * N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 44000000.0], N[(x + N[(1.6453555072203998 * N[(y * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 44000000:\\
\;\;\;\;x + 1.6453555072203998 \cdot \left(y \cdot \left(z \cdot a\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.2e19 or 4.4e7 < z

    1. Initial program 8.9%

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

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

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

    if -3.2e19 < z < 6.59999999999999981e-36

    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 z around 0 79.9%

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

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

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

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

    if 6.59999999999999981e-36 < z < 4.4e7

    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.6%

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

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

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

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

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

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

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

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

        \[\leadsto x + 1.6453555072203998 \cdot \color{blue}{\left(y \cdot \left(z \cdot a\right)\right)} \]
    10. Simplified75.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+19}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{-36}:\\ \;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\ \mathbf{elif}\;z \leq 44000000:\\ \;\;\;\;x + 1.6453555072203998 \cdot \left(y \cdot \left(z \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot 3.13060547623\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 83.2% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot 3.13060547623\\ \mathbf{if}\;z \leq -8 \cdot 10^{+19}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-37}:\\ \;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\ \mathbf{elif}\;z \leq 42000000:\\ \;\;\;\;x + 1.6453555072203998 \cdot \left(a \cdot \left(y \cdot z\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 -8e+19)
     t_1
     (if (<= z 5e-37)
       (+ x (* y (* b 1.6453555072203998)))
       (if (<= z 42000000.0)
         (+ x (* 1.6453555072203998 (* a (* y z))))
         t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (y * 3.13060547623);
	double tmp;
	if (z <= -8e+19) {
		tmp = t_1;
	} else if (z <= 5e-37) {
		tmp = x + (y * (b * 1.6453555072203998));
	} else if (z <= 42000000.0) {
		tmp = x + (1.6453555072203998 * (a * (y * z)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (y * 3.13060547623d0)
    if (z <= (-8d+19)) then
        tmp = t_1
    else if (z <= 5d-37) then
        tmp = x + (y * (b * 1.6453555072203998d0))
    else if (z <= 42000000.0d0) then
        tmp = x + (1.6453555072203998d0 * (a * (y * z)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (y * 3.13060547623);
	double tmp;
	if (z <= -8e+19) {
		tmp = t_1;
	} else if (z <= 5e-37) {
		tmp = x + (y * (b * 1.6453555072203998));
	} else if (z <= 42000000.0) {
		tmp = x + (1.6453555072203998 * (a * (y * z)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (y * 3.13060547623)
	tmp = 0
	if z <= -8e+19:
		tmp = t_1
	elif z <= 5e-37:
		tmp = x + (y * (b * 1.6453555072203998))
	elif z <= 42000000.0:
		tmp = x + (1.6453555072203998 * (a * (y * z)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(y * 3.13060547623))
	tmp = 0.0
	if (z <= -8e+19)
		tmp = t_1;
	elseif (z <= 5e-37)
		tmp = Float64(x + Float64(y * Float64(b * 1.6453555072203998)));
	elseif (z <= 42000000.0)
		tmp = Float64(x + Float64(1.6453555072203998 * Float64(a * Float64(y * z))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (y * 3.13060547623);
	tmp = 0.0;
	if (z <= -8e+19)
		tmp = t_1;
	elseif (z <= 5e-37)
		tmp = x + (y * (b * 1.6453555072203998));
	elseif (z <= 42000000.0)
		tmp = x + (1.6453555072203998 * (a * (y * z)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e+19], t$95$1, If[LessEqual[z, 5e-37], N[(x + N[(y * N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 42000000.0], N[(x + N[(1.6453555072203998 * N[(a * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 42000000:\\
\;\;\;\;x + 1.6453555072203998 \cdot \left(a \cdot \left(y \cdot z\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8e19 or 4.2e7 < z

    1. Initial program 8.9%

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

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

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

    if -8e19 < z < 4.9999999999999997e-37

    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 z around 0 79.9%

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

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

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

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

    if 4.9999999999999997e-37 < z < 4.2e7

    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.6%

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

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

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

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

Alternative 16: 83.3% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+18} \lor \neg \left(z \leq 21500000\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 -3e+18) (not (<= z 21500000.0)))
   (+ 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 <= -3e+18) || !(z <= 21500000.0)) {
		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 <= (-3d+18)) .or. (.not. (z <= 21500000.0d0))) 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 <= -3e+18) || !(z <= 21500000.0)) {
		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 <= -3e+18) or not (z <= 21500000.0):
		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 <= -3e+18) || !(z <= 21500000.0))
		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 <= -3e+18) || ~((z <= 21500000.0)))
		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, -3e+18], N[Not[LessEqual[z, 21500000.0]], $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 -3 \cdot 10^{+18} \lor \neg \left(z \leq 21500000\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 < -3e18 or 2.15e7 < z

    1. Initial program 8.9%

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

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

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

    if -3e18 < z < 2.15e7

    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 z around 0 76.4%

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

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

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

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

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

Alternative 17: 83.3% accurate, 2.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+18} \lor \neg \left(z \leq 33000000\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.5e18 or 3.3e7 < z

    1. Initial program 8.9%

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

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

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

    if -2.5e18 < z < 3.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. 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 z around 0 76.4%

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

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

Alternative 18: 63.7% accurate, 2.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1900000 \lor \neg \left(z \leq 3.7 \cdot 10^{-61}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.9e6 or 3.7e-61 < z

    1. Initial program 25.4%

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

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

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

    if -1.9e6 < z < 3.7e-61

    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 z around 0 79.5%

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

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

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

        \[\leadsto \color{blue}{y \cdot \left(1.6453555072203998 \cdot b\right)} \]
    7. Simplified41.9%

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

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

Alternative 19: 51.7% accurate, 2.8× speedup?

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

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

\mathbf{elif}\;x \leq 1.85 \cdot 10^{-127}:\\
\;\;\;\;y \cdot 3.13060547623\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.39999999999999995e-80 or 1.8500000000000002e-127 < x

    1. Initial program 56.9%

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

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

    if -1.39999999999999995e-80 < x < 1.8500000000000002e-127

    1. Initial program 61.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. Simplified63.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 40.0%

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

      \[\leadsto \color{blue}{3.13060547623 \cdot y} \]
    6. Step-by-step derivation
      1. *-commutative35.0%

        \[\leadsto \color{blue}{y \cdot 3.13060547623} \]
    7. Simplified35.0%

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

Alternative 20: 45.4% accurate, 37.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 58.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.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 46.2%

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

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

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

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

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

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


\end{array}
\end{array}

Reproduce

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

  :alt
  (! :herbie-platform default (if (< z -649934499625263200000000000000000000000000000000000000) (+ x (* (+ (- 313060547623/100000000000 (/ 18263520849403207/500000000000000 z)) (/ t (* z z))) (/ y 1))) (if (< z 706696543691428700000000000000000000000000000000000000000000) (+ x (/ y (/ (+ (* (+ (* (+ (* (+ z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000) (+ (* (+ (* (+ (* (+ (* z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)))) (+ x (* (+ (- 313060547623/100000000000 (/ 18263520849403207/500000000000000 z)) (/ t (* z z))) (/ y 1))))))

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