Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, B

Percentage Accurate: 99.8% → 99.8%
Time: 23.9s
Alternatives: 26
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: c
    real(8), intent (in) :: i
    code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i):
	return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\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 26 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: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: c
    real(8), intent (in) :: i
    code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i):
	return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}

Alternative 1: 99.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, z + \mathsf{fma}\left(x, \log y, t + a\right)\right)\right) \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (fma y i (fma (+ b -0.5) (log c) (+ z (fma x (log y) (+ t a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return fma(y, i, fma((b + -0.5), log(c), (z + fma(x, log(y), (t + a)))));
}
function code(x, y, z, t, a, b, c, i)
	return fma(y, i, fma(Float64(b + -0.5), log(c), Float64(z + fma(x, log(y), Float64(t + a)))))
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, z + \mathsf{fma}\left(x, \log y, t + a\right)\right)\right)
\end{array}
Derivation
  1. Initial program 99.9%

    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
  2. Step-by-step derivation
    1. associate-+l+99.9%

      \[\leadsto \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right)} \]
    2. associate-+l+99.9%

      \[\leadsto \color{blue}{\left(\left(x \cdot \log y + z\right) + \left(t + a\right)\right)} + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right) \]
    3. +-commutative99.9%

      \[\leadsto \left(\color{blue}{\left(z + x \cdot \log y\right)} + \left(t + a\right)\right) + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right) \]
    4. associate-+l+99.9%

      \[\leadsto \color{blue}{\left(z + \left(x \cdot \log y + \left(t + a\right)\right)\right)} + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right) \]
    5. +-commutative99.9%

      \[\leadsto \left(z + \left(x \cdot \log y + \color{blue}{\left(a + t\right)}\right)\right) + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right) \]
    6. associate-+l+99.9%

      \[\leadsto \left(z + \color{blue}{\left(\left(x \cdot \log y + a\right) + t\right)}\right) + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right) \]
    7. +-commutative99.9%

      \[\leadsto \color{blue}{\left(\left(\left(x \cdot \log y + a\right) + t\right) + z\right)} + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right) \]
    8. associate-+l+99.9%

      \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + a\right) + t\right) + z\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i} \]
    9. +-commutative99.9%

      \[\leadsto \color{blue}{y \cdot i + \left(\left(\left(\left(x \cdot \log y + a\right) + t\right) + z\right) + \left(b - 0.5\right) \cdot \log c\right)} \]
    10. fma-define99.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \left(\left(\left(x \cdot \log y + a\right) + t\right) + z\right) + \left(b - 0.5\right) \cdot \log c\right)} \]
    11. +-commutative99.9%

      \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\left(b - 0.5\right) \cdot \log c + \left(\left(\left(x \cdot \log y + a\right) + t\right) + z\right)}\right) \]
    12. fma-define99.9%

      \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\mathsf{fma}\left(b - 0.5, \log c, \left(\left(x \cdot \log y + a\right) + t\right) + z\right)}\right) \]
  3. Simplified99.9%

    \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, z + \mathsf{fma}\left(x, \log y, t + a\right)\right)\right)} \]
  4. Add Preprocessing
  5. Final simplification99.9%

    \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, z + \mathsf{fma}\left(x, \log y, t + a\right)\right)\right) \]
  6. Add Preprocessing

Alternative 2: 99.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \left(\left(t + a\right) + \mathsf{fma}\left(x, \log y, z\right)\right) + \left(\left(b + -0.5\right) \cdot \log c + y \cdot i\right) \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (+ (+ (+ t a) (fma x (log y) z)) (+ (* (+ b -0.5) (log c)) (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return ((t + a) + fma(x, log(y), z)) + (((b + -0.5) * log(c)) + (y * i));
}
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(Float64(t + a) + fma(x, log(y), z)) + Float64(Float64(Float64(b + -0.5) * log(c)) + Float64(y * i)))
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(t + a), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(t + a\right) + \mathsf{fma}\left(x, \log y, z\right)\right) + \left(\left(b + -0.5\right) \cdot \log c + y \cdot i\right)
\end{array}
Derivation
  1. Initial program 99.9%

    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
  2. Step-by-step derivation
    1. associate-+l+99.9%

      \[\leadsto \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right)} \]
    2. associate-+l+99.9%

      \[\leadsto \color{blue}{\left(\left(x \cdot \log y + z\right) + \left(t + a\right)\right)} + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right) \]
    3. fma-define99.9%

      \[\leadsto \left(\color{blue}{\mathsf{fma}\left(x, \log y, z\right)} + \left(t + a\right)\right) + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right) \]
    4. sub-neg99.9%

      \[\leadsto \left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \left(\color{blue}{\left(b + \left(-0.5\right)\right)} \cdot \log c + y \cdot i\right) \]
    5. metadata-eval99.9%

      \[\leadsto \left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \left(\left(b + \color{blue}{-0.5}\right) \cdot \log c + y \cdot i\right) \]
  3. Simplified99.9%

    \[\leadsto \color{blue}{\left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \left(\left(b + -0.5\right) \cdot \log c + y \cdot i\right)} \]
  4. Add Preprocessing
  5. Final simplification99.9%

    \[\leadsto \left(\left(t + a\right) + \mathsf{fma}\left(x, \log y, z\right)\right) + \left(\left(b + -0.5\right) \cdot \log c + y \cdot i\right) \]
  6. Add Preprocessing

Alternative 3: 94.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.5 \cdot 10^{+104}:\\ \;\;\;\;a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)\\ \mathbf{elif}\;x \leq 4.6 \cdot 10^{+123}:\\ \;\;\;\;a + \left(t + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \left(z + x \cdot \left(\log y + b \cdot \frac{\log c}{x}\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= x -2.5e+104)
   (+ a (+ t (+ z (fma i y (* x (log y))))))
   (if (<= x 4.6e+123)
     (+ a (+ t (+ z (+ (* y i) (* (log c) (- b 0.5))))))
     (+ a (+ t (+ z (* x (+ (log y) (* b (/ (log c) x))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (x <= -2.5e+104) {
		tmp = a + (t + (z + fma(i, y, (x * log(y)))));
	} else if (x <= 4.6e+123) {
		tmp = a + (t + (z + ((y * i) + (log(c) * (b - 0.5)))));
	} else {
		tmp = a + (t + (z + (x * (log(y) + (b * (log(c) / x))))));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (x <= -2.5e+104)
		tmp = Float64(a + Float64(t + Float64(z + fma(i, y, Float64(x * log(y))))));
	elseif (x <= 4.6e+123)
		tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(y * i) + Float64(log(c) * Float64(b - 0.5))))));
	else
		tmp = Float64(a + Float64(t + Float64(z + Float64(x * Float64(log(y) + Float64(b * Float64(log(c) / x)))))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -2.5e+104], N[(a + N[(t + N[(z + N[(i * y + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.6e+123], N[(a + N[(t + N[(z + N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(x * N[(N[Log[y], $MachinePrecision] + N[(b * N[(N[Log[c], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.5 \cdot 10^{+104}:\\
\;\;\;\;a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)\\

\mathbf{elif}\;x \leq 4.6 \cdot 10^{+123}:\\
\;\;\;\;a + \left(t + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.4999999999999998e104

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 99.8%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified99.8%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in b around 0 92.8%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + x \cdot \log y\right)\right)\right)} \]
    7. Step-by-step derivation
      1. fma-define92.9%

        \[\leadsto a + \left(t + \left(z + \color{blue}{\mathsf{fma}\left(i, y, x \cdot \log y\right)}\right)\right) \]
    8. Simplified92.9%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)} \]

    if -2.4999999999999998e104 < x < 4.59999999999999981e123

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 97.9%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]

    if 4.59999999999999981e123 < x

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 99.9%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative99.9%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified99.9%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in y around 0 94.7%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(b \cdot \log c + x \cdot \log y\right)\right)\right)} \]
    7. Taylor expanded in x around inf 94.7%

      \[\leadsto a + \left(t + \left(z + \color{blue}{x \cdot \left(\log y + \frac{b \cdot \log c}{x}\right)}\right)\right) \]
    8. Step-by-step derivation
      1. associate-/l*94.7%

        \[\leadsto a + \left(t + \left(z + x \cdot \left(\log y + \color{blue}{b \cdot \frac{\log c}{x}}\right)\right)\right) \]
    9. Simplified94.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.5 \cdot 10^{+104}:\\ \;\;\;\;a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)\\ \mathbf{elif}\;x \leq 4.6 \cdot 10^{+123}:\\ \;\;\;\;a + \left(t + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \left(z + x \cdot \left(\log y + b \cdot \frac{\log c}{x}\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 94.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -1.6 \cdot 10^{+104}:\\ \;\;\;\;a + \left(t + \left(z + \mathsf{fma}\left(i, y, t\_1\right)\right)\right)\\ \mathbf{elif}\;x \leq 2 \cdot 10^{+125}:\\ \;\;\;\;a + \left(t + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \left(z + \left(t\_1 + b \cdot \log c\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* x (log y))))
   (if (<= x -1.6e+104)
     (+ a (+ t (+ z (fma i y t_1))))
     (if (<= x 2e+125)
       (+ a (+ t (+ z (+ (* y i) (* (log c) (- b 0.5))))))
       (+ a (+ t (+ z (+ t_1 (* b (log c))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = x * log(y);
	double tmp;
	if (x <= -1.6e+104) {
		tmp = a + (t + (z + fma(i, y, t_1)));
	} else if (x <= 2e+125) {
		tmp = a + (t + (z + ((y * i) + (log(c) * (b - 0.5)))));
	} else {
		tmp = a + (t + (z + (t_1 + (b * log(c)))));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(x * log(y))
	tmp = 0.0
	if (x <= -1.6e+104)
		tmp = Float64(a + Float64(t + Float64(z + fma(i, y, t_1))));
	elseif (x <= 2e+125)
		tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(y * i) + Float64(log(c) * Float64(b - 0.5))))));
	else
		tmp = Float64(a + Float64(t + Float64(z + Float64(t_1 + Float64(b * log(c))))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.6e+104], N[(a + N[(t + N[(z + N[(i * y + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2e+125], N[(a + N[(t + N[(z + N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(t$95$1 + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -1.6 \cdot 10^{+104}:\\
\;\;\;\;a + \left(t + \left(z + \mathsf{fma}\left(i, y, t\_1\right)\right)\right)\\

\mathbf{elif}\;x \leq 2 \cdot 10^{+125}:\\
\;\;\;\;a + \left(t + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \left(t\_1 + b \cdot \log c\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.6e104

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 99.8%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified99.8%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in b around 0 92.8%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + x \cdot \log y\right)\right)\right)} \]
    7. Step-by-step derivation
      1. fma-define92.9%

        \[\leadsto a + \left(t + \left(z + \color{blue}{\mathsf{fma}\left(i, y, x \cdot \log y\right)}\right)\right) \]
    8. Simplified92.9%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)} \]

    if -1.6e104 < x < 1.9999999999999998e125

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 97.9%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]

    if 1.9999999999999998e125 < x

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 99.9%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative99.9%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified99.9%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in y around 0 94.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.6 \cdot 10^{+104}:\\ \;\;\;\;a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)\\ \mathbf{elif}\;x \leq 2 \cdot 10^{+125}:\\ \;\;\;\;a + \left(t + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + b \cdot \log c\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\right) \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (+ (* y i) (+ (* (log c) (- b 0.5)) (+ a (+ t (+ z (* x (log y))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (y * i) + ((log(c) * (b - 0.5)) + (a + (t + (z + (x * log(y))))));
}
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: c
    real(8), intent (in) :: i
    code = (y * i) + ((log(c) * (b - 0.5d0)) + (a + (t + (z + (x * log(y))))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (y * i) + ((Math.log(c) * (b - 0.5)) + (a + (t + (z + (x * Math.log(y))))));
}
def code(x, y, z, t, a, b, c, i):
	return (y * i) + ((math.log(c) * (b - 0.5)) + (a + (t + (z + (x * math.log(y))))))
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(t + Float64(z + Float64(x * log(y)))))))
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (t + (z + (x * log(y))))));
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 99.9%

    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
  2. Add Preprocessing
  3. Final simplification99.9%

    \[\leadsto y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\right) \]
  4. Add Preprocessing

Alternative 6: 98.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ y \cdot i + \left(b \cdot \log c + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\right) \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (+ (* y i) (+ (* b (log c)) (+ a (+ t (+ z (* x (log y))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (y * i) + ((b * log(c)) + (a + (t + (z + (x * log(y))))));
}
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: c
    real(8), intent (in) :: i
    code = (y * i) + ((b * log(c)) + (a + (t + (z + (x * log(y))))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (y * i) + ((b * Math.log(c)) + (a + (t + (z + (x * Math.log(y))))));
}
def code(x, y, z, t, a, b, c, i):
	return (y * i) + ((b * math.log(c)) + (a + (t + (z + (x * math.log(y))))))
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(y * i) + Float64(Float64(b * log(c)) + Float64(a + Float64(t + Float64(z + Float64(x * log(y)))))))
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = (y * i) + ((b * log(c)) + (a + (t + (z + (x * log(y))))));
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
y \cdot i + \left(b \cdot \log c + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 99.9%

    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
  2. Add Preprocessing
  3. Taylor expanded in b around inf 98.0%

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

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
  5. Simplified98.0%

    \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
  6. Final simplification98.0%

    \[\leadsto y \cdot i + \left(b \cdot \log c + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\right) \]
  7. Add Preprocessing

Alternative 7: 95.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -2.15 \cdot 10^{+104}:\\ \;\;\;\;a + \left(t + \left(z + \mathsf{fma}\left(i, y, t\_1\right)\right)\right)\\ \mathbf{elif}\;x \leq 1.9 \cdot 10^{+114}:\\ \;\;\;\;a + \left(t + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(a + \left(t + \left(z + t\_1\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* x (log y))))
   (if (<= x -2.15e+104)
     (+ a (+ t (+ z (fma i y t_1))))
     (if (<= x 1.9e+114)
       (+ a (+ t (+ z (+ (* y i) (* (log c) (- b 0.5))))))
       (+ (* y i) (+ a (+ t (+ z t_1))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = x * log(y);
	double tmp;
	if (x <= -2.15e+104) {
		tmp = a + (t + (z + fma(i, y, t_1)));
	} else if (x <= 1.9e+114) {
		tmp = a + (t + (z + ((y * i) + (log(c) * (b - 0.5)))));
	} else {
		tmp = (y * i) + (a + (t + (z + t_1)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(x * log(y))
	tmp = 0.0
	if (x <= -2.15e+104)
		tmp = Float64(a + Float64(t + Float64(z + fma(i, y, t_1))));
	elseif (x <= 1.9e+114)
		tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(y * i) + Float64(log(c) * Float64(b - 0.5))))));
	else
		tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + t_1))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.15e+104], N[(a + N[(t + N[(z + N[(i * y + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.9e+114], N[(a + N[(t + N[(z + N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -2.15 \cdot 10^{+104}:\\
\;\;\;\;a + \left(t + \left(z + \mathsf{fma}\left(i, y, t\_1\right)\right)\right)\\

\mathbf{elif}\;x \leq 1.9 \cdot 10^{+114}:\\
\;\;\;\;a + \left(t + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + t\_1\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.1500000000000001e104

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 99.8%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified99.8%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in b around 0 92.8%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + x \cdot \log y\right)\right)\right)} \]
    7. Step-by-step derivation
      1. fma-define92.9%

        \[\leadsto a + \left(t + \left(z + \color{blue}{\mathsf{fma}\left(i, y, x \cdot \log y\right)}\right)\right) \]
    8. Simplified92.9%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)} \]

    if -2.1500000000000001e104 < x < 1.9e114

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 97.8%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]

    if 1.9e114 < x

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 99.9%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative99.9%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified99.9%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in b around 0 88.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.15 \cdot 10^{+104}:\\ \;\;\;\;a + \left(t + \left(z + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\right)\\ \mathbf{elif}\;x \leq 1.9 \cdot 10^{+114}:\\ \;\;\;\;a + \left(t + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 49.2% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + \left(t + b \cdot \log c\right)\\ t_2 := y \cdot i + x \cdot \log y\\ t_3 := a + \left(z + t\right)\\ \mathbf{if}\;z \leq -1.28 \cdot 10^{+222}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{+207}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -1.02 \cdot 10^{+176}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq -0.016:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-125}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-266}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-296}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-138}:\\ \;\;\;\;a + \left(t + y \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ a (+ t (* b (log c)))))
        (t_2 (+ (* y i) (* x (log y))))
        (t_3 (+ a (+ z t))))
   (if (<= z -1.28e+222)
     t_3
     (if (<= z -9.2e+207)
       t_2
       (if (<= z -1.02e+176)
         t_3
         (if (<= z -0.016)
           t_1
           (if (<= z -9e-125)
             t_2
             (if (<= z -2.4e-266)
               t_1
               (if (<= z -9.2e-296)
                 t_2
                 (if (<= z 6e-138) (+ a (+ t (* y i))) t_1))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = a + (t + (b * log(c)));
	double t_2 = (y * i) + (x * log(y));
	double t_3 = a + (z + t);
	double tmp;
	if (z <= -1.28e+222) {
		tmp = t_3;
	} else if (z <= -9.2e+207) {
		tmp = t_2;
	} else if (z <= -1.02e+176) {
		tmp = t_3;
	} else if (z <= -0.016) {
		tmp = t_1;
	} else if (z <= -9e-125) {
		tmp = t_2;
	} else if (z <= -2.4e-266) {
		tmp = t_1;
	} else if (z <= -9.2e-296) {
		tmp = t_2;
	} else if (z <= 6e-138) {
		tmp = a + (t + (y * i));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = a + (t + (b * log(c)))
    t_2 = (y * i) + (x * log(y))
    t_3 = a + (z + t)
    if (z <= (-1.28d+222)) then
        tmp = t_3
    else if (z <= (-9.2d+207)) then
        tmp = t_2
    else if (z <= (-1.02d+176)) then
        tmp = t_3
    else if (z <= (-0.016d0)) then
        tmp = t_1
    else if (z <= (-9d-125)) then
        tmp = t_2
    else if (z <= (-2.4d-266)) then
        tmp = t_1
    else if (z <= (-9.2d-296)) then
        tmp = t_2
    else if (z <= 6d-138) then
        tmp = a + (t + (y * i))
    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 c, double i) {
	double t_1 = a + (t + (b * Math.log(c)));
	double t_2 = (y * i) + (x * Math.log(y));
	double t_3 = a + (z + t);
	double tmp;
	if (z <= -1.28e+222) {
		tmp = t_3;
	} else if (z <= -9.2e+207) {
		tmp = t_2;
	} else if (z <= -1.02e+176) {
		tmp = t_3;
	} else if (z <= -0.016) {
		tmp = t_1;
	} else if (z <= -9e-125) {
		tmp = t_2;
	} else if (z <= -2.4e-266) {
		tmp = t_1;
	} else if (z <= -9.2e-296) {
		tmp = t_2;
	} else if (z <= 6e-138) {
		tmp = a + (t + (y * i));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = a + (t + (b * math.log(c)))
	t_2 = (y * i) + (x * math.log(y))
	t_3 = a + (z + t)
	tmp = 0
	if z <= -1.28e+222:
		tmp = t_3
	elif z <= -9.2e+207:
		tmp = t_2
	elif z <= -1.02e+176:
		tmp = t_3
	elif z <= -0.016:
		tmp = t_1
	elif z <= -9e-125:
		tmp = t_2
	elif z <= -2.4e-266:
		tmp = t_1
	elif z <= -9.2e-296:
		tmp = t_2
	elif z <= 6e-138:
		tmp = a + (t + (y * i))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(a + Float64(t + Float64(b * log(c))))
	t_2 = Float64(Float64(y * i) + Float64(x * log(y)))
	t_3 = Float64(a + Float64(z + t))
	tmp = 0.0
	if (z <= -1.28e+222)
		tmp = t_3;
	elseif (z <= -9.2e+207)
		tmp = t_2;
	elseif (z <= -1.02e+176)
		tmp = t_3;
	elseif (z <= -0.016)
		tmp = t_1;
	elseif (z <= -9e-125)
		tmp = t_2;
	elseif (z <= -2.4e-266)
		tmp = t_1;
	elseif (z <= -9.2e-296)
		tmp = t_2;
	elseif (z <= 6e-138)
		tmp = Float64(a + Float64(t + Float64(y * i)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = a + (t + (b * log(c)));
	t_2 = (y * i) + (x * log(y));
	t_3 = a + (z + t);
	tmp = 0.0;
	if (z <= -1.28e+222)
		tmp = t_3;
	elseif (z <= -9.2e+207)
		tmp = t_2;
	elseif (z <= -1.02e+176)
		tmp = t_3;
	elseif (z <= -0.016)
		tmp = t_1;
	elseif (z <= -9e-125)
		tmp = t_2;
	elseif (z <= -2.4e-266)
		tmp = t_1;
	elseif (z <= -9.2e-296)
		tmp = t_2;
	elseif (z <= 6e-138)
		tmp = a + (t + (y * i));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(t + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * i), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.28e+222], t$95$3, If[LessEqual[z, -9.2e+207], t$95$2, If[LessEqual[z, -1.02e+176], t$95$3, If[LessEqual[z, -0.016], t$95$1, If[LessEqual[z, -9e-125], t$95$2, If[LessEqual[z, -2.4e-266], t$95$1, If[LessEqual[z, -9.2e-296], t$95$2, If[LessEqual[z, 6e-138], N[(a + N[(t + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a + \left(t + b \cdot \log c\right)\\
t_2 := y \cdot i + x \cdot \log y\\
t_3 := a + \left(z + t\right)\\
\mathbf{if}\;z \leq -1.28 \cdot 10^{+222}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;z \leq -9.2 \cdot 10^{+207}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -1.02 \cdot 10^{+176}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;z \leq -0.016:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -9 \cdot 10^{-125}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -2.4 \cdot 10^{-266}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -9.2 \cdot 10^{-296}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 6 \cdot 10^{-138}:\\
\;\;\;\;a + \left(t + y \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.28e222 or -9.19999999999999979e207 < z < -1.02000000000000001e176

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 98.8%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
    4. Taylor expanded in z around inf 84.6%

      \[\leadsto a + \left(t + \color{blue}{z}\right) \]

    if -1.28e222 < z < -9.19999999999999979e207 or -0.016 < z < -9.00000000000000024e-125 or -2.4e-266 < z < -9.20000000000000016e-296

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 99.9%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative99.9%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified99.9%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in x around -inf 64.5%

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(-1 \cdot \log y + -1 \cdot \frac{a + \left(t + \left(z + b \cdot \log c\right)\right)}{x}\right)\right)} + y \cdot i \]
    7. Step-by-step derivation
      1. mul-1-neg64.5%

        \[\leadsto \color{blue}{\left(-x \cdot \left(-1 \cdot \log y + -1 \cdot \frac{a + \left(t + \left(z + b \cdot \log c\right)\right)}{x}\right)\right)} + y \cdot i \]
      2. distribute-lft-out64.5%

        \[\leadsto \left(-x \cdot \color{blue}{\left(-1 \cdot \left(\log y + \frac{a + \left(t + \left(z + b \cdot \log c\right)\right)}{x}\right)\right)}\right) + y \cdot i \]
      3. +-commutative64.5%

        \[\leadsto \left(-x \cdot \left(-1 \cdot \left(\log y + \frac{a + \left(t + \color{blue}{\left(b \cdot \log c + z\right)}\right)}{x}\right)\right)\right) + y \cdot i \]
    8. Simplified64.5%

      \[\leadsto \color{blue}{\left(-x \cdot \left(-1 \cdot \left(\log y + \frac{a + \left(t + \left(b \cdot \log c + z\right)\right)}{x}\right)\right)\right)} + y \cdot i \]
    9. Taylor expanded in x around inf 36.5%

      \[\leadsto \left(-\color{blue}{-1 \cdot \left(x \cdot \log y\right)}\right) + y \cdot i \]
    10. Step-by-step derivation
      1. associate-*r*36.5%

        \[\leadsto \left(-\color{blue}{\left(-1 \cdot x\right) \cdot \log y}\right) + y \cdot i \]
      2. neg-mul-136.5%

        \[\leadsto \left(-\color{blue}{\left(-x\right)} \cdot \log y\right) + y \cdot i \]
    11. Simplified36.5%

      \[\leadsto \left(-\color{blue}{\left(-x\right) \cdot \log y}\right) + y \cdot i \]
    12. Taylor expanded in x around 0 36.5%

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

    if -1.02000000000000001e176 < z < -0.016 or -9.00000000000000024e-125 < z < -2.4e-266 or 6.0000000000000001e-138 < z

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 81.8%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
    4. Taylor expanded in b around inf 54.5%

      \[\leadsto a + \left(t + \color{blue}{b \cdot \log c}\right) \]
    5. Step-by-step derivation
      1. *-commutative54.5%

        \[\leadsto a + \left(t + \color{blue}{\log c \cdot b}\right) \]
    6. Simplified54.5%

      \[\leadsto a + \left(t + \color{blue}{\log c \cdot b}\right) \]

    if -9.20000000000000016e-296 < z < 6.0000000000000001e-138

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 85.0%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
    4. Taylor expanded in i around inf 56.2%

      \[\leadsto a + \left(t + \color{blue}{i \cdot y}\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification55.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.28 \cdot 10^{+222}:\\ \;\;\;\;a + \left(z + t\right)\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{+207}:\\ \;\;\;\;y \cdot i + x \cdot \log y\\ \mathbf{elif}\;z \leq -1.02 \cdot 10^{+176}:\\ \;\;\;\;a + \left(z + t\right)\\ \mathbf{elif}\;z \leq -0.016:\\ \;\;\;\;a + \left(t + b \cdot \log c\right)\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-125}:\\ \;\;\;\;y \cdot i + x \cdot \log y\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-266}:\\ \;\;\;\;a + \left(t + b \cdot \log c\right)\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-296}:\\ \;\;\;\;y \cdot i + x \cdot \log y\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-138}:\\ \;\;\;\;a + \left(t + y \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + b \cdot \log c\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 47.1% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \log c\\ t_2 := a + \left(z + t\right)\\ t_3 := a + \left(t + y \cdot i\right)\\ \mathbf{if}\;z \leq -5.2 \cdot 10^{+227}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -4.9 \cdot 10^{+209}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.18 \cdot 10^{+176}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{+96}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq -3.9 \cdot 10^{+50}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-49} \lor \neg \left(z \leq 2.65 \cdot 10^{-287}\right):\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log y + \frac{a}{x}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* b (log c))) (t_2 (+ a (+ z t))) (t_3 (+ a (+ t (* y i)))))
   (if (<= z -5.2e+227)
     t_2
     (if (<= z -4.9e+209)
       t_1
       (if (<= z -1.18e+176)
         t_2
         (if (<= z -6.8e+96)
           t_3
           (if (<= z -3.9e+50)
             t_1
             (if (or (<= z -5.5e-49) (not (<= z 2.65e-287)))
               t_3
               (* x (+ (log y) (/ a x)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = b * log(c);
	double t_2 = a + (z + t);
	double t_3 = a + (t + (y * i));
	double tmp;
	if (z <= -5.2e+227) {
		tmp = t_2;
	} else if (z <= -4.9e+209) {
		tmp = t_1;
	} else if (z <= -1.18e+176) {
		tmp = t_2;
	} else if (z <= -6.8e+96) {
		tmp = t_3;
	} else if (z <= -3.9e+50) {
		tmp = t_1;
	} else if ((z <= -5.5e-49) || !(z <= 2.65e-287)) {
		tmp = t_3;
	} else {
		tmp = x * (log(y) + (a / x));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = b * log(c)
    t_2 = a + (z + t)
    t_3 = a + (t + (y * i))
    if (z <= (-5.2d+227)) then
        tmp = t_2
    else if (z <= (-4.9d+209)) then
        tmp = t_1
    else if (z <= (-1.18d+176)) then
        tmp = t_2
    else if (z <= (-6.8d+96)) then
        tmp = t_3
    else if (z <= (-3.9d+50)) then
        tmp = t_1
    else if ((z <= (-5.5d-49)) .or. (.not. (z <= 2.65d-287))) then
        tmp = t_3
    else
        tmp = x * (log(y) + (a / x))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = b * Math.log(c);
	double t_2 = a + (z + t);
	double t_3 = a + (t + (y * i));
	double tmp;
	if (z <= -5.2e+227) {
		tmp = t_2;
	} else if (z <= -4.9e+209) {
		tmp = t_1;
	} else if (z <= -1.18e+176) {
		tmp = t_2;
	} else if (z <= -6.8e+96) {
		tmp = t_3;
	} else if (z <= -3.9e+50) {
		tmp = t_1;
	} else if ((z <= -5.5e-49) || !(z <= 2.65e-287)) {
		tmp = t_3;
	} else {
		tmp = x * (Math.log(y) + (a / x));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = b * math.log(c)
	t_2 = a + (z + t)
	t_3 = a + (t + (y * i))
	tmp = 0
	if z <= -5.2e+227:
		tmp = t_2
	elif z <= -4.9e+209:
		tmp = t_1
	elif z <= -1.18e+176:
		tmp = t_2
	elif z <= -6.8e+96:
		tmp = t_3
	elif z <= -3.9e+50:
		tmp = t_1
	elif (z <= -5.5e-49) or not (z <= 2.65e-287):
		tmp = t_3
	else:
		tmp = x * (math.log(y) + (a / x))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(b * log(c))
	t_2 = Float64(a + Float64(z + t))
	t_3 = Float64(a + Float64(t + Float64(y * i)))
	tmp = 0.0
	if (z <= -5.2e+227)
		tmp = t_2;
	elseif (z <= -4.9e+209)
		tmp = t_1;
	elseif (z <= -1.18e+176)
		tmp = t_2;
	elseif (z <= -6.8e+96)
		tmp = t_3;
	elseif (z <= -3.9e+50)
		tmp = t_1;
	elseif ((z <= -5.5e-49) || !(z <= 2.65e-287))
		tmp = t_3;
	else
		tmp = Float64(x * Float64(log(y) + Float64(a / x)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = b * log(c);
	t_2 = a + (z + t);
	t_3 = a + (t + (y * i));
	tmp = 0.0;
	if (z <= -5.2e+227)
		tmp = t_2;
	elseif (z <= -4.9e+209)
		tmp = t_1;
	elseif (z <= -1.18e+176)
		tmp = t_2;
	elseif (z <= -6.8e+96)
		tmp = t_3;
	elseif (z <= -3.9e+50)
		tmp = t_1;
	elseif ((z <= -5.5e-49) || ~((z <= 2.65e-287)))
		tmp = t_3;
	else
		tmp = x * (log(y) + (a / x));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a + N[(t + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e+227], t$95$2, If[LessEqual[z, -4.9e+209], t$95$1, If[LessEqual[z, -1.18e+176], t$95$2, If[LessEqual[z, -6.8e+96], t$95$3, If[LessEqual[z, -3.9e+50], t$95$1, If[Or[LessEqual[z, -5.5e-49], N[Not[LessEqual[z, 2.65e-287]], $MachinePrecision]], t$95$3, N[(x * N[(N[Log[y], $MachinePrecision] + N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b \cdot \log c\\
t_2 := a + \left(z + t\right)\\
t_3 := a + \left(t + y \cdot i\right)\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{+227}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -4.9 \cdot 10^{+209}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.18 \cdot 10^{+176}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -6.8 \cdot 10^{+96}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;z \leq -3.9 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -5.5 \cdot 10^{-49} \lor \neg \left(z \leq 2.65 \cdot 10^{-287}\right):\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log y + \frac{a}{x}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.19999999999999964e227 or -4.8999999999999998e209 < z < -1.18000000000000006e176

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 98.8%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
    4. Taylor expanded in z around inf 84.6%

      \[\leadsto a + \left(t + \color{blue}{z}\right) \]

    if -5.19999999999999964e227 < z < -4.8999999999999998e209 or -6.8000000000000002e96 < z < -3.89999999999999967e50

    1. Initial program 99.6%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in a around -inf 82.7%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)}{a} - 1\right)\right)} \]
    4. Taylor expanded in b around inf 46.8%

      \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot \left(b \cdot \log c\right)\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg46.8%

        \[\leadsto -1 \cdot \color{blue}{\left(-b \cdot \log c\right)} \]
      2. distribute-rgt-neg-in46.8%

        \[\leadsto -1 \cdot \color{blue}{\left(b \cdot \left(-\log c\right)\right)} \]
    6. Simplified46.8%

      \[\leadsto -1 \cdot \color{blue}{\left(b \cdot \left(-\log c\right)\right)} \]

    if -1.18000000000000006e176 < z < -6.8000000000000002e96 or -3.89999999999999967e50 < z < -5.50000000000000031e-49 or 2.64999999999999974e-287 < z

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 84.6%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
    4. Taylor expanded in i around inf 54.0%

      \[\leadsto a + \left(t + \color{blue}{i \cdot y}\right) \]

    if -5.50000000000000031e-49 < z < 2.64999999999999974e-287

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 96.6%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative96.6%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified96.6%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in x around -inf 72.8%

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(-1 \cdot \log y + -1 \cdot \frac{a + \left(t + \left(z + b \cdot \log c\right)\right)}{x}\right)\right)} + y \cdot i \]
    7. Step-by-step derivation
      1. mul-1-neg72.8%

        \[\leadsto \color{blue}{\left(-x \cdot \left(-1 \cdot \log y + -1 \cdot \frac{a + \left(t + \left(z + b \cdot \log c\right)\right)}{x}\right)\right)} + y \cdot i \]
      2. distribute-lft-out72.8%

        \[\leadsto \left(-x \cdot \color{blue}{\left(-1 \cdot \left(\log y + \frac{a + \left(t + \left(z + b \cdot \log c\right)\right)}{x}\right)\right)}\right) + y \cdot i \]
      3. +-commutative72.8%

        \[\leadsto \left(-x \cdot \left(-1 \cdot \left(\log y + \frac{a + \left(t + \color{blue}{\left(b \cdot \log c + z\right)}\right)}{x}\right)\right)\right) + y \cdot i \]
    8. Simplified72.8%

      \[\leadsto \color{blue}{\left(-x \cdot \left(-1 \cdot \left(\log y + \frac{a + \left(t + \left(b \cdot \log c + z\right)\right)}{x}\right)\right)\right)} + y \cdot i \]
    9. Taylor expanded in a around inf 48.0%

      \[\leadsto \left(-x \cdot \left(-1 \cdot \left(\log y + \color{blue}{\frac{a}{x}}\right)\right)\right) + y \cdot i \]
    10. Taylor expanded in y around 0 34.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+227}:\\ \;\;\;\;a + \left(z + t\right)\\ \mathbf{elif}\;z \leq -4.9 \cdot 10^{+209}:\\ \;\;\;\;b \cdot \log c\\ \mathbf{elif}\;z \leq -1.18 \cdot 10^{+176}:\\ \;\;\;\;a + \left(z + t\right)\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{+96}:\\ \;\;\;\;a + \left(t + y \cdot i\right)\\ \mathbf{elif}\;z \leq -3.9 \cdot 10^{+50}:\\ \;\;\;\;b \cdot \log c\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-49} \lor \neg \left(z \leq 2.65 \cdot 10^{-287}\right):\\ \;\;\;\;a + \left(t + y \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log y + \frac{a}{x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 43.6% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \log c\\ t_2 := a + \left(z + t\right)\\ \mathbf{if}\;z \leq -5.2 \cdot 10^{+227}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -4.9 \cdot 10^{+209}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.18 \cdot 10^{+176}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -0.016 \lor \neg \left(z \leq 2.65 \cdot 10^{-287}\right):\\ \;\;\;\;a + \left(t + t\_1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log y + \frac{a}{x}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* b (log c))) (t_2 (+ a (+ z t))))
   (if (<= z -5.2e+227)
     t_2
     (if (<= z -4.9e+209)
       t_1
       (if (<= z -1.18e+176)
         t_2
         (if (or (<= z -0.016) (not (<= z 2.65e-287)))
           (+ a (+ t t_1))
           (* x (+ (log y) (/ a x)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = b * log(c);
	double t_2 = a + (z + t);
	double tmp;
	if (z <= -5.2e+227) {
		tmp = t_2;
	} else if (z <= -4.9e+209) {
		tmp = t_1;
	} else if (z <= -1.18e+176) {
		tmp = t_2;
	} else if ((z <= -0.016) || !(z <= 2.65e-287)) {
		tmp = a + (t + t_1);
	} else {
		tmp = x * (log(y) + (a / x));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = b * log(c)
    t_2 = a + (z + t)
    if (z <= (-5.2d+227)) then
        tmp = t_2
    else if (z <= (-4.9d+209)) then
        tmp = t_1
    else if (z <= (-1.18d+176)) then
        tmp = t_2
    else if ((z <= (-0.016d0)) .or. (.not. (z <= 2.65d-287))) then
        tmp = a + (t + t_1)
    else
        tmp = x * (log(y) + (a / x))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = b * Math.log(c);
	double t_2 = a + (z + t);
	double tmp;
	if (z <= -5.2e+227) {
		tmp = t_2;
	} else if (z <= -4.9e+209) {
		tmp = t_1;
	} else if (z <= -1.18e+176) {
		tmp = t_2;
	} else if ((z <= -0.016) || !(z <= 2.65e-287)) {
		tmp = a + (t + t_1);
	} else {
		tmp = x * (Math.log(y) + (a / x));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = b * math.log(c)
	t_2 = a + (z + t)
	tmp = 0
	if z <= -5.2e+227:
		tmp = t_2
	elif z <= -4.9e+209:
		tmp = t_1
	elif z <= -1.18e+176:
		tmp = t_2
	elif (z <= -0.016) or not (z <= 2.65e-287):
		tmp = a + (t + t_1)
	else:
		tmp = x * (math.log(y) + (a / x))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(b * log(c))
	t_2 = Float64(a + Float64(z + t))
	tmp = 0.0
	if (z <= -5.2e+227)
		tmp = t_2;
	elseif (z <= -4.9e+209)
		tmp = t_1;
	elseif (z <= -1.18e+176)
		tmp = t_2;
	elseif ((z <= -0.016) || !(z <= 2.65e-287))
		tmp = Float64(a + Float64(t + t_1));
	else
		tmp = Float64(x * Float64(log(y) + Float64(a / x)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = b * log(c);
	t_2 = a + (z + t);
	tmp = 0.0;
	if (z <= -5.2e+227)
		tmp = t_2;
	elseif (z <= -4.9e+209)
		tmp = t_1;
	elseif (z <= -1.18e+176)
		tmp = t_2;
	elseif ((z <= -0.016) || ~((z <= 2.65e-287)))
		tmp = a + (t + t_1);
	else
		tmp = x * (log(y) + (a / x));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e+227], t$95$2, If[LessEqual[z, -4.9e+209], t$95$1, If[LessEqual[z, -1.18e+176], t$95$2, If[Or[LessEqual[z, -0.016], N[Not[LessEqual[z, 2.65e-287]], $MachinePrecision]], N[(a + N[(t + t$95$1), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Log[y], $MachinePrecision] + N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b \cdot \log c\\
t_2 := a + \left(z + t\right)\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{+227}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -4.9 \cdot 10^{+209}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.18 \cdot 10^{+176}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -0.016 \lor \neg \left(z \leq 2.65 \cdot 10^{-287}\right):\\
\;\;\;\;a + \left(t + t\_1\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log y + \frac{a}{x}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.19999999999999964e227 or -4.8999999999999998e209 < z < -1.18000000000000006e176

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 98.8%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
    4. Taylor expanded in z around inf 84.6%

      \[\leadsto a + \left(t + \color{blue}{z}\right) \]

    if -5.19999999999999964e227 < z < -4.8999999999999998e209

    1. Initial program 99.7%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in a around -inf 81.2%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)}{a} - 1\right)\right)} \]
    4. Taylor expanded in b around inf 41.8%

      \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot \left(b \cdot \log c\right)\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg41.8%

        \[\leadsto -1 \cdot \color{blue}{\left(-b \cdot \log c\right)} \]
      2. distribute-rgt-neg-in41.8%

        \[\leadsto -1 \cdot \color{blue}{\left(b \cdot \left(-\log c\right)\right)} \]
    6. Simplified41.8%

      \[\leadsto -1 \cdot \color{blue}{\left(b \cdot \left(-\log c\right)\right)} \]

    if -1.18000000000000006e176 < z < -0.016 or 2.64999999999999974e-287 < z

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 84.6%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
    4. Taylor expanded in b around inf 52.5%

      \[\leadsto a + \left(t + \color{blue}{b \cdot \log c}\right) \]
    5. Step-by-step derivation
      1. *-commutative52.5%

        \[\leadsto a + \left(t + \color{blue}{\log c \cdot b}\right) \]
    6. Simplified52.5%

      \[\leadsto a + \left(t + \color{blue}{\log c \cdot b}\right) \]

    if -0.016 < z < 2.64999999999999974e-287

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 97.0%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative97.0%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified97.0%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in x around -inf 70.5%

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(-1 \cdot \log y + -1 \cdot \frac{a + \left(t + \left(z + b \cdot \log c\right)\right)}{x}\right)\right)} + y \cdot i \]
    7. Step-by-step derivation
      1. mul-1-neg70.5%

        \[\leadsto \color{blue}{\left(-x \cdot \left(-1 \cdot \log y + -1 \cdot \frac{a + \left(t + \left(z + b \cdot \log c\right)\right)}{x}\right)\right)} + y \cdot i \]
      2. distribute-lft-out70.5%

        \[\leadsto \left(-x \cdot \color{blue}{\left(-1 \cdot \left(\log y + \frac{a + \left(t + \left(z + b \cdot \log c\right)\right)}{x}\right)\right)}\right) + y \cdot i \]
      3. +-commutative70.5%

        \[\leadsto \left(-x \cdot \left(-1 \cdot \left(\log y + \frac{a + \left(t + \color{blue}{\left(b \cdot \log c + z\right)}\right)}{x}\right)\right)\right) + y \cdot i \]
    8. Simplified70.5%

      \[\leadsto \color{blue}{\left(-x \cdot \left(-1 \cdot \left(\log y + \frac{a + \left(t + \left(b \cdot \log c + z\right)\right)}{x}\right)\right)\right)} + y \cdot i \]
    9. Taylor expanded in a around inf 45.6%

      \[\leadsto \left(-x \cdot \left(-1 \cdot \left(\log y + \color{blue}{\frac{a}{x}}\right)\right)\right) + y \cdot i \]
    10. Taylor expanded in y around 0 31.0%

      \[\leadsto \color{blue}{x \cdot \left(\log y + \frac{a}{x}\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification49.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+227}:\\ \;\;\;\;a + \left(z + t\right)\\ \mathbf{elif}\;z \leq -4.9 \cdot 10^{+209}:\\ \;\;\;\;b \cdot \log c\\ \mathbf{elif}\;z \leq -1.18 \cdot 10^{+176}:\\ \;\;\;\;a + \left(z + t\right)\\ \mathbf{elif}\;z \leq -0.016 \lor \neg \left(z \leq 2.65 \cdot 10^{-287}\right):\\ \;\;\;\;a + \left(t + b \cdot \log c\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log y + \frac{a}{x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 70.0% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + \left(t + \left(z + \left(b + -0.5\right) \cdot \log c\right)\right)\\ t_2 := a + \left(t + \left(z + x \cdot \log y\right)\right)\\ \mathbf{if}\;x \leq -2.5 \cdot 10^{+104}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq 5.5 \cdot 10^{-242}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 9.2 \cdot 10^{-102}:\\ \;\;\;\;y \cdot i + b \cdot \left(\log c + \frac{a}{b}\right)\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{+112}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ a (+ t (+ z (* (+ b -0.5) (log c))))))
        (t_2 (+ a (+ t (+ z (* x (log y)))))))
   (if (<= x -2.5e+104)
     t_2
     (if (<= x 5.5e-242)
       t_1
       (if (<= x 9.2e-102)
         (+ (* y i) (* b (+ (log c) (/ a b))))
         (if (<= x 5.8e+112) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = a + (t + (z + ((b + -0.5) * log(c))));
	double t_2 = a + (t + (z + (x * log(y))));
	double tmp;
	if (x <= -2.5e+104) {
		tmp = t_2;
	} else if (x <= 5.5e-242) {
		tmp = t_1;
	} else if (x <= 9.2e-102) {
		tmp = (y * i) + (b * (log(c) + (a / b)));
	} else if (x <= 5.8e+112) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = a + (t + (z + ((b + (-0.5d0)) * log(c))))
    t_2 = a + (t + (z + (x * log(y))))
    if (x <= (-2.5d+104)) then
        tmp = t_2
    else if (x <= 5.5d-242) then
        tmp = t_1
    else if (x <= 9.2d-102) then
        tmp = (y * i) + (b * (log(c) + (a / b)))
    else if (x <= 5.8d+112) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = a + (t + (z + ((b + -0.5) * Math.log(c))));
	double t_2 = a + (t + (z + (x * Math.log(y))));
	double tmp;
	if (x <= -2.5e+104) {
		tmp = t_2;
	} else if (x <= 5.5e-242) {
		tmp = t_1;
	} else if (x <= 9.2e-102) {
		tmp = (y * i) + (b * (Math.log(c) + (a / b)));
	} else if (x <= 5.8e+112) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = a + (t + (z + ((b + -0.5) * math.log(c))))
	t_2 = a + (t + (z + (x * math.log(y))))
	tmp = 0
	if x <= -2.5e+104:
		tmp = t_2
	elif x <= 5.5e-242:
		tmp = t_1
	elif x <= 9.2e-102:
		tmp = (y * i) + (b * (math.log(c) + (a / b)))
	elif x <= 5.8e+112:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(a + Float64(t + Float64(z + Float64(Float64(b + -0.5) * log(c)))))
	t_2 = Float64(a + Float64(t + Float64(z + Float64(x * log(y)))))
	tmp = 0.0
	if (x <= -2.5e+104)
		tmp = t_2;
	elseif (x <= 5.5e-242)
		tmp = t_1;
	elseif (x <= 9.2e-102)
		tmp = Float64(Float64(y * i) + Float64(b * Float64(log(c) + Float64(a / b))));
	elseif (x <= 5.8e+112)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = a + (t + (z + ((b + -0.5) * log(c))));
	t_2 = a + (t + (z + (x * log(y))));
	tmp = 0.0;
	if (x <= -2.5e+104)
		tmp = t_2;
	elseif (x <= 5.5e-242)
		tmp = t_1;
	elseif (x <= 9.2e-102)
		tmp = (y * i) + (b * (log(c) + (a / b)));
	elseif (x <= 5.8e+112)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(t + N[(z + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.5e+104], t$95$2, If[LessEqual[x, 5.5e-242], t$95$1, If[LessEqual[x, 9.2e-102], N[(N[(y * i), $MachinePrecision] + N[(b * N[(N[Log[c], $MachinePrecision] + N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.8e+112], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a + \left(t + \left(z + \left(b + -0.5\right) \cdot \log c\right)\right)\\
t_2 := a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{if}\;x \leq -2.5 \cdot 10^{+104}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 5.5 \cdot 10^{-242}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 9.2 \cdot 10^{-102}:\\
\;\;\;\;y \cdot i + b \cdot \left(\log c + \frac{a}{b}\right)\\

\mathbf{elif}\;x \leq 5.8 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.4999999999999998e104 or 5.8000000000000004e112 < x

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 99.8%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified99.8%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in y around 0 89.2%

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

      \[\leadsto a + \left(t + \color{blue}{\left(z + x \cdot \log y\right)}\right) \]
    8. Step-by-step derivation
      1. +-commutative80.1%

        \[\leadsto a + \left(t + \color{blue}{\left(x \cdot \log y + z\right)}\right) \]
    9. Simplified80.1%

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

    if -2.4999999999999998e104 < x < 5.4999999999999998e-242 or 9.19999999999999946e-102 < x < 5.8000000000000004e112

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 97.5%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
    4. Taylor expanded in i around 0 78.7%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)} \]
    5. Step-by-step derivation
      1. +-commutative78.7%

        \[\leadsto a + \color{blue}{\left(\left(z + \log c \cdot \left(b - 0.5\right)\right) + t\right)} \]
      2. +-commutative78.7%

        \[\leadsto a + \left(\color{blue}{\left(\log c \cdot \left(b - 0.5\right) + z\right)} + t\right) \]
      3. sub-neg78.7%

        \[\leadsto a + \left(\left(\log c \cdot \color{blue}{\left(b + \left(-0.5\right)\right)} + z\right) + t\right) \]
      4. metadata-eval78.7%

        \[\leadsto a + \left(\left(\log c \cdot \left(b + \color{blue}{-0.5}\right) + z\right) + t\right) \]
    6. Simplified78.7%

      \[\leadsto \color{blue}{a + \left(\left(\log c \cdot \left(b + -0.5\right) + z\right) + t\right)} \]

    if 5.4999999999999998e-242 < x < 9.19999999999999946e-102

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 95.7%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative95.7%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified95.7%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in b around inf 79.1%

      \[\leadsto \color{blue}{b \cdot \left(\log c + \left(\frac{a}{b} + \left(\frac{t}{b} + \left(\frac{z}{b} + \frac{x \cdot \log y}{b}\right)\right)\right)\right)} + y \cdot i \]
    7. Step-by-step derivation
      1. associate-+r+79.1%

        \[\leadsto b \cdot \left(\log c + \left(\frac{a}{b} + \color{blue}{\left(\left(\frac{t}{b} + \frac{z}{b}\right) + \frac{x \cdot \log y}{b}\right)}\right)\right) + y \cdot i \]
      2. associate-/l*79.1%

        \[\leadsto b \cdot \left(\log c + \left(\frac{a}{b} + \left(\left(\frac{t}{b} + \frac{z}{b}\right) + \color{blue}{x \cdot \frac{\log y}{b}}\right)\right)\right) + y \cdot i \]
    8. Simplified79.1%

      \[\leadsto \color{blue}{b \cdot \left(\log c + \left(\frac{a}{b} + \left(\left(\frac{t}{b} + \frac{z}{b}\right) + x \cdot \frac{\log y}{b}\right)\right)\right)} + y \cdot i \]
    9. Taylor expanded in a around inf 74.2%

      \[\leadsto b \cdot \left(\log c + \color{blue}{\frac{a}{b}}\right) + y \cdot i \]
  3. Recombined 3 regimes into one program.
  4. Final simplification78.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.5 \cdot 10^{+104}:\\ \;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\ \mathbf{elif}\;x \leq 5.5 \cdot 10^{-242}:\\ \;\;\;\;a + \left(t + \left(z + \left(b + -0.5\right) \cdot \log c\right)\right)\\ \mathbf{elif}\;x \leq 9.2 \cdot 10^{-102}:\\ \;\;\;\;y \cdot i + b \cdot \left(\log c + \frac{a}{b}\right)\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{+112}:\\ \;\;\;\;a + \left(t + \left(z + \left(b + -0.5\right) \cdot \log c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 70.7% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + \left(t + \left(z + x \cdot \log y\right)\right)\\ \mathbf{if}\;x \leq -2.45 \cdot 10^{+104}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -1.45 \cdot 10^{-61}:\\ \;\;\;\;a + \left(t + \left(z + b \cdot \log c\right)\right)\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{-189}:\\ \;\;\;\;y \cdot i + b \cdot \left(\log c + \frac{z}{b}\right)\\ \mathbf{elif}\;x \leq 3.1 \cdot 10^{+113}:\\ \;\;\;\;a + \left(t + \left(z + \left(b + -0.5\right) \cdot \log c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ a (+ t (+ z (* x (log y)))))))
   (if (<= x -2.45e+104)
     t_1
     (if (<= x -1.45e-61)
       (+ a (+ t (+ z (* b (log c)))))
       (if (<= x -1.9e-189)
         (+ (* y i) (* b (+ (log c) (/ z b))))
         (if (<= x 3.1e+113) (+ a (+ t (+ z (* (+ b -0.5) (log c))))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = a + (t + (z + (x * log(y))));
	double tmp;
	if (x <= -2.45e+104) {
		tmp = t_1;
	} else if (x <= -1.45e-61) {
		tmp = a + (t + (z + (b * log(c))));
	} else if (x <= -1.9e-189) {
		tmp = (y * i) + (b * (log(c) + (z / b)));
	} else if (x <= 3.1e+113) {
		tmp = a + (t + (z + ((b + -0.5) * log(c))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: tmp
    t_1 = a + (t + (z + (x * log(y))))
    if (x <= (-2.45d+104)) then
        tmp = t_1
    else if (x <= (-1.45d-61)) then
        tmp = a + (t + (z + (b * log(c))))
    else if (x <= (-1.9d-189)) then
        tmp = (y * i) + (b * (log(c) + (z / b)))
    else if (x <= 3.1d+113) then
        tmp = a + (t + (z + ((b + (-0.5d0)) * log(c))))
    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 c, double i) {
	double t_1 = a + (t + (z + (x * Math.log(y))));
	double tmp;
	if (x <= -2.45e+104) {
		tmp = t_1;
	} else if (x <= -1.45e-61) {
		tmp = a + (t + (z + (b * Math.log(c))));
	} else if (x <= -1.9e-189) {
		tmp = (y * i) + (b * (Math.log(c) + (z / b)));
	} else if (x <= 3.1e+113) {
		tmp = a + (t + (z + ((b + -0.5) * Math.log(c))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = a + (t + (z + (x * math.log(y))))
	tmp = 0
	if x <= -2.45e+104:
		tmp = t_1
	elif x <= -1.45e-61:
		tmp = a + (t + (z + (b * math.log(c))))
	elif x <= -1.9e-189:
		tmp = (y * i) + (b * (math.log(c) + (z / b)))
	elif x <= 3.1e+113:
		tmp = a + (t + (z + ((b + -0.5) * math.log(c))))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(a + Float64(t + Float64(z + Float64(x * log(y)))))
	tmp = 0.0
	if (x <= -2.45e+104)
		tmp = t_1;
	elseif (x <= -1.45e-61)
		tmp = Float64(a + Float64(t + Float64(z + Float64(b * log(c)))));
	elseif (x <= -1.9e-189)
		tmp = Float64(Float64(y * i) + Float64(b * Float64(log(c) + Float64(z / b))));
	elseif (x <= 3.1e+113)
		tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(b + -0.5) * log(c)))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = a + (t + (z + (x * log(y))));
	tmp = 0.0;
	if (x <= -2.45e+104)
		tmp = t_1;
	elseif (x <= -1.45e-61)
		tmp = a + (t + (z + (b * log(c))));
	elseif (x <= -1.9e-189)
		tmp = (y * i) + (b * (log(c) + (z / b)));
	elseif (x <= 3.1e+113)
		tmp = a + (t + (z + ((b + -0.5) * log(c))));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.45e+104], t$95$1, If[LessEqual[x, -1.45e-61], N[(a + N[(t + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.9e-189], N[(N[(y * i), $MachinePrecision] + N[(b * N[(N[Log[c], $MachinePrecision] + N[(z / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.1e+113], N[(a + N[(t + N[(z + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{if}\;x \leq -2.45 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -1.45 \cdot 10^{-61}:\\
\;\;\;\;a + \left(t + \left(z + b \cdot \log c\right)\right)\\

\mathbf{elif}\;x \leq -1.9 \cdot 10^{-189}:\\
\;\;\;\;y \cdot i + b \cdot \left(\log c + \frac{z}{b}\right)\\

\mathbf{elif}\;x \leq 3.1 \cdot 10^{+113}:\\
\;\;\;\;a + \left(t + \left(z + \left(b + -0.5\right) \cdot \log c\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2.44999999999999993e104 or 3.09999999999999991e113 < x

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 99.8%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified99.8%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in y around 0 89.2%

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

      \[\leadsto a + \left(t + \color{blue}{\left(z + x \cdot \log y\right)}\right) \]
    8. Step-by-step derivation
      1. +-commutative80.1%

        \[\leadsto a + \left(t + \color{blue}{\left(x \cdot \log y + z\right)}\right) \]
    9. Simplified80.1%

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

    if -2.44999999999999993e104 < x < -1.45e-61

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 99.9%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative99.9%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified99.9%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in y around 0 89.0%

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

      \[\leadsto a + \left(t + \color{blue}{\left(z + b \cdot \log c\right)}\right) \]
    8. Step-by-step derivation
      1. +-commutative86.1%

        \[\leadsto a + \left(t + \color{blue}{\left(b \cdot \log c + z\right)}\right) \]
    9. Simplified86.1%

      \[\leadsto a + \left(t + \color{blue}{\left(b \cdot \log c + z\right)}\right) \]

    if -1.45e-61 < x < -1.90000000000000011e-189

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 95.9%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative95.9%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified95.9%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in b around inf 88.7%

      \[\leadsto \color{blue}{b \cdot \left(\log c + \left(\frac{a}{b} + \left(\frac{t}{b} + \left(\frac{z}{b} + \frac{x \cdot \log y}{b}\right)\right)\right)\right)} + y \cdot i \]
    7. Step-by-step derivation
      1. associate-+r+88.7%

        \[\leadsto b \cdot \left(\log c + \left(\frac{a}{b} + \color{blue}{\left(\left(\frac{t}{b} + \frac{z}{b}\right) + \frac{x \cdot \log y}{b}\right)}\right)\right) + y \cdot i \]
      2. associate-/l*88.7%

        \[\leadsto b \cdot \left(\log c + \left(\frac{a}{b} + \left(\left(\frac{t}{b} + \frac{z}{b}\right) + \color{blue}{x \cdot \frac{\log y}{b}}\right)\right)\right) + y \cdot i \]
    8. Simplified88.7%

      \[\leadsto \color{blue}{b \cdot \left(\log c + \left(\frac{a}{b} + \left(\left(\frac{t}{b} + \frac{z}{b}\right) + x \cdot \frac{\log y}{b}\right)\right)\right)} + y \cdot i \]
    9. Taylor expanded in z around inf 84.9%

      \[\leadsto b \cdot \left(\log c + \color{blue}{\frac{z}{b}}\right) + y \cdot i \]

    if -1.90000000000000011e-189 < x < 3.09999999999999991e113

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 97.6%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
    4. Taylor expanded in i around 0 75.6%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)} \]
    5. Step-by-step derivation
      1. +-commutative75.6%

        \[\leadsto a + \color{blue}{\left(\left(z + \log c \cdot \left(b - 0.5\right)\right) + t\right)} \]
      2. +-commutative75.6%

        \[\leadsto a + \left(\color{blue}{\left(\log c \cdot \left(b - 0.5\right) + z\right)} + t\right) \]
      3. sub-neg75.6%

        \[\leadsto a + \left(\left(\log c \cdot \color{blue}{\left(b + \left(-0.5\right)\right)} + z\right) + t\right) \]
      4. metadata-eval75.6%

        \[\leadsto a + \left(\left(\log c \cdot \left(b + \color{blue}{-0.5}\right) + z\right) + t\right) \]
    6. Simplified75.6%

      \[\leadsto \color{blue}{a + \left(\left(\log c \cdot \left(b + -0.5\right) + z\right) + t\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification79.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.45 \cdot 10^{+104}:\\ \;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\ \mathbf{elif}\;x \leq -1.45 \cdot 10^{-61}:\\ \;\;\;\;a + \left(t + \left(z + b \cdot \log c\right)\right)\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{-189}:\\ \;\;\;\;y \cdot i + b \cdot \left(\log c + \frac{z}{b}\right)\\ \mathbf{elif}\;x \leq 3.1 \cdot 10^{+113}:\\ \;\;\;\;a + \left(t + \left(z + \left(b + -0.5\right) \cdot \log c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 71.2% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + \left(t + \left(z + b \cdot \log c\right)\right)\\ t_2 := a + \left(t + \left(z + x \cdot \log y\right)\right)\\ \mathbf{if}\;x \leq -1.8 \cdot 10^{+104}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq 5.5 \cdot 10^{-242}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2 \cdot 10^{-193}:\\ \;\;\;\;a + \left(t + y \cdot i\right)\\ \mathbf{elif}\;x \leq 1.32 \cdot 10^{+113}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ a (+ t (+ z (* b (log c))))))
        (t_2 (+ a (+ t (+ z (* x (log y)))))))
   (if (<= x -1.8e+104)
     t_2
     (if (<= x 5.5e-242)
       t_1
       (if (<= x 2e-193) (+ a (+ t (* y i))) (if (<= x 1.32e+113) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = a + (t + (z + (b * log(c))));
	double t_2 = a + (t + (z + (x * log(y))));
	double tmp;
	if (x <= -1.8e+104) {
		tmp = t_2;
	} else if (x <= 5.5e-242) {
		tmp = t_1;
	} else if (x <= 2e-193) {
		tmp = a + (t + (y * i));
	} else if (x <= 1.32e+113) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = a + (t + (z + (b * log(c))))
    t_2 = a + (t + (z + (x * log(y))))
    if (x <= (-1.8d+104)) then
        tmp = t_2
    else if (x <= 5.5d-242) then
        tmp = t_1
    else if (x <= 2d-193) then
        tmp = a + (t + (y * i))
    else if (x <= 1.32d+113) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = a + (t + (z + (b * Math.log(c))));
	double t_2 = a + (t + (z + (x * Math.log(y))));
	double tmp;
	if (x <= -1.8e+104) {
		tmp = t_2;
	} else if (x <= 5.5e-242) {
		tmp = t_1;
	} else if (x <= 2e-193) {
		tmp = a + (t + (y * i));
	} else if (x <= 1.32e+113) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = a + (t + (z + (b * math.log(c))))
	t_2 = a + (t + (z + (x * math.log(y))))
	tmp = 0
	if x <= -1.8e+104:
		tmp = t_2
	elif x <= 5.5e-242:
		tmp = t_1
	elif x <= 2e-193:
		tmp = a + (t + (y * i))
	elif x <= 1.32e+113:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(a + Float64(t + Float64(z + Float64(b * log(c)))))
	t_2 = Float64(a + Float64(t + Float64(z + Float64(x * log(y)))))
	tmp = 0.0
	if (x <= -1.8e+104)
		tmp = t_2;
	elseif (x <= 5.5e-242)
		tmp = t_1;
	elseif (x <= 2e-193)
		tmp = Float64(a + Float64(t + Float64(y * i)));
	elseif (x <= 1.32e+113)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = a + (t + (z + (b * log(c))));
	t_2 = a + (t + (z + (x * log(y))));
	tmp = 0.0;
	if (x <= -1.8e+104)
		tmp = t_2;
	elseif (x <= 5.5e-242)
		tmp = t_1;
	elseif (x <= 2e-193)
		tmp = a + (t + (y * i));
	elseif (x <= 1.32e+113)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(t + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.8e+104], t$95$2, If[LessEqual[x, 5.5e-242], t$95$1, If[LessEqual[x, 2e-193], N[(a + N[(t + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.32e+113], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a + \left(t + \left(z + b \cdot \log c\right)\right)\\
t_2 := a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{if}\;x \leq -1.8 \cdot 10^{+104}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 5.5 \cdot 10^{-242}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 2 \cdot 10^{-193}:\\
\;\;\;\;a + \left(t + y \cdot i\right)\\

\mathbf{elif}\;x \leq 1.32 \cdot 10^{+113}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.8e104 or 1.31999999999999996e113 < x

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 99.8%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified99.8%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in y around 0 89.2%

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

      \[\leadsto a + \left(t + \color{blue}{\left(z + x \cdot \log y\right)}\right) \]
    8. Step-by-step derivation
      1. +-commutative80.1%

        \[\leadsto a + \left(t + \color{blue}{\left(x \cdot \log y + z\right)}\right) \]
    9. Simplified80.1%

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

    if -1.8e104 < x < 5.4999999999999998e-242 or 2.0000000000000001e-193 < x < 1.31999999999999996e113

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 97.5%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative97.5%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified97.5%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in y around 0 77.3%

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

      \[\leadsto a + \left(t + \color{blue}{\left(z + b \cdot \log c\right)}\right) \]
    8. Step-by-step derivation
      1. +-commutative75.1%

        \[\leadsto a + \left(t + \color{blue}{\left(b \cdot \log c + z\right)}\right) \]
    9. Simplified75.1%

      \[\leadsto a + \left(t + \color{blue}{\left(b \cdot \log c + z\right)}\right) \]

    if 5.4999999999999998e-242 < x < 2.0000000000000001e-193

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 99.8%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
    4. Taylor expanded in i around inf 90.2%

      \[\leadsto a + \left(t + \color{blue}{i \cdot y}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification77.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.8 \cdot 10^{+104}:\\ \;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\ \mathbf{elif}\;x \leq 5.5 \cdot 10^{-242}:\\ \;\;\;\;a + \left(t + \left(z + b \cdot \log c\right)\right)\\ \mathbf{elif}\;x \leq 2 \cdot 10^{-193}:\\ \;\;\;\;a + \left(t + y \cdot i\right)\\ \mathbf{elif}\;x \leq 1.32 \cdot 10^{+113}:\\ \;\;\;\;a + \left(t + \left(z + b \cdot \log c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 95.1% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.3 \cdot 10^{+104} \lor \neg \left(x \leq 2.35 \cdot 10^{+114}\right):\\ \;\;\;\;y \cdot i + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (or (<= x -2.3e+104) (not (<= x 2.35e+114)))
   (+ (* y i) (+ a (+ t (+ z (* x (log y))))))
   (+ a (+ t (+ z (+ (* y i) (* (log c) (- b 0.5))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((x <= -2.3e+104) || !(x <= 2.35e+114)) {
		tmp = (y * i) + (a + (t + (z + (x * log(y)))));
	} else {
		tmp = a + (t + (z + ((y * i) + (log(c) * (b - 0.5)))));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if ((x <= (-2.3d+104)) .or. (.not. (x <= 2.35d+114))) then
        tmp = (y * i) + (a + (t + (z + (x * log(y)))))
    else
        tmp = a + (t + (z + ((y * i) + (log(c) * (b - 0.5d0)))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((x <= -2.3e+104) || !(x <= 2.35e+114)) {
		tmp = (y * i) + (a + (t + (z + (x * Math.log(y)))));
	} else {
		tmp = a + (t + (z + ((y * i) + (Math.log(c) * (b - 0.5)))));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (x <= -2.3e+104) or not (x <= 2.35e+114):
		tmp = (y * i) + (a + (t + (z + (x * math.log(y)))))
	else:
		tmp = a + (t + (z + ((y * i) + (math.log(c) * (b - 0.5)))))
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if ((x <= -2.3e+104) || !(x <= 2.35e+114))
		tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(x * log(y))))));
	else
		tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(y * i) + Float64(log(c) * Float64(b - 0.5))))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((x <= -2.3e+104) || ~((x <= 2.35e+114)))
		tmp = (y * i) + (a + (t + (z + (x * log(y)))));
	else
		tmp = a + (t + (z + ((y * i) + (log(c) * (b - 0.5)))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.3e+104], N[Not[LessEqual[x, 2.35e+114]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{+104} \lor \neg \left(x \leq 2.35 \cdot 10^{+114}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.29999999999999985e104 or 2.35e114 < x

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 99.8%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified99.8%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in b around 0 90.7%

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

    if -2.29999999999999985e104 < x < 2.35e114

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 97.8%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification95.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.3 \cdot 10^{+104} \lor \neg \left(x \leq 2.35 \cdot 10^{+114}\right):\\ \;\;\;\;y \cdot i + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 88.8% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.1 \cdot 10^{+139} \lor \neg \left(x \leq 3.9 \cdot 10^{+155}\right):\\ \;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \left(z + \left(y \cdot i + b \cdot \log c\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (or (<= x -2.1e+139) (not (<= x 3.9e+155)))
   (+ a (+ t (+ z (* x (log y)))))
   (+ a (+ t (+ z (+ (* y i) (* b (log c))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((x <= -2.1e+139) || !(x <= 3.9e+155)) {
		tmp = a + (t + (z + (x * log(y))));
	} else {
		tmp = a + (t + (z + ((y * i) + (b * log(c)))));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if ((x <= (-2.1d+139)) .or. (.not. (x <= 3.9d+155))) then
        tmp = a + (t + (z + (x * log(y))))
    else
        tmp = a + (t + (z + ((y * i) + (b * log(c)))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((x <= -2.1e+139) || !(x <= 3.9e+155)) {
		tmp = a + (t + (z + (x * Math.log(y))));
	} else {
		tmp = a + (t + (z + ((y * i) + (b * Math.log(c)))));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (x <= -2.1e+139) or not (x <= 3.9e+155):
		tmp = a + (t + (z + (x * math.log(y))))
	else:
		tmp = a + (t + (z + ((y * i) + (b * math.log(c)))))
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if ((x <= -2.1e+139) || !(x <= 3.9e+155))
		tmp = Float64(a + Float64(t + Float64(z + Float64(x * log(y)))));
	else
		tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(y * i) + Float64(b * log(c))))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((x <= -2.1e+139) || ~((x <= 3.9e+155)))
		tmp = a + (t + (z + (x * log(y))));
	else
		tmp = a + (t + (z + ((y * i) + (b * log(c)))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.1e+139], N[Not[LessEqual[x, 3.9e+155]], $MachinePrecision]], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{+139} \lor \neg \left(x \leq 3.9 \cdot 10^{+155}\right):\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\

\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \left(y \cdot i + b \cdot \log c\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.0999999999999999e139 or 3.8999999999999998e155 < x

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 99.8%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified99.8%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in y around 0 92.6%

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

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

        \[\leadsto a + \left(t + \color{blue}{\left(x \cdot \log y + z\right)}\right) \]
    9. Simplified82.9%

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

    if -2.0999999999999999e139 < x < 3.8999999999999998e155

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 97.3%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative97.3%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified97.3%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in x around 0 93.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.1 \cdot 10^{+139} \lor \neg \left(x \leq 3.9 \cdot 10^{+155}\right):\\ \;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \left(z + \left(y \cdot i + b \cdot \log c\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 93.5% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.5 \cdot 10^{+104} \lor \neg \left(x \leq 5.7 \cdot 10^{+113}\right):\\ \;\;\;\;y \cdot i + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \left(z + \left(y \cdot i + b \cdot \log c\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (or (<= x -2.5e+104) (not (<= x 5.7e+113)))
   (+ (* y i) (+ a (+ t (+ z (* x (log y))))))
   (+ a (+ t (+ z (+ (* y i) (* b (log c))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((x <= -2.5e+104) || !(x <= 5.7e+113)) {
		tmp = (y * i) + (a + (t + (z + (x * log(y)))));
	} else {
		tmp = a + (t + (z + ((y * i) + (b * log(c)))));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if ((x <= (-2.5d+104)) .or. (.not. (x <= 5.7d+113))) then
        tmp = (y * i) + (a + (t + (z + (x * log(y)))))
    else
        tmp = a + (t + (z + ((y * i) + (b * log(c)))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((x <= -2.5e+104) || !(x <= 5.7e+113)) {
		tmp = (y * i) + (a + (t + (z + (x * Math.log(y)))));
	} else {
		tmp = a + (t + (z + ((y * i) + (b * Math.log(c)))));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (x <= -2.5e+104) or not (x <= 5.7e+113):
		tmp = (y * i) + (a + (t + (z + (x * math.log(y)))))
	else:
		tmp = a + (t + (z + ((y * i) + (b * math.log(c)))))
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if ((x <= -2.5e+104) || !(x <= 5.7e+113))
		tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(x * log(y))))));
	else
		tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(y * i) + Float64(b * log(c))))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((x <= -2.5e+104) || ~((x <= 5.7e+113)))
		tmp = (y * i) + (a + (t + (z + (x * log(y)))));
	else
		tmp = a + (t + (z + ((y * i) + (b * log(c)))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.5e+104], N[Not[LessEqual[x, 5.7e+113]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.5 \cdot 10^{+104} \lor \neg \left(x \leq 5.7 \cdot 10^{+113}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \left(y \cdot i + b \cdot \log c\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.4999999999999998e104 or 5.6999999999999998e113 < x

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 99.8%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified99.8%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in b around 0 90.7%

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

    if -2.4999999999999998e104 < x < 5.6999999999999998e113

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 97.1%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative97.1%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified97.1%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in x around 0 95.1%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(b \cdot \log c + i \cdot y\right)\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification93.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.5 \cdot 10^{+104} \lor \neg \left(x \leq 5.7 \cdot 10^{+113}\right):\\ \;\;\;\;y \cdot i + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \left(z + \left(y \cdot i + b \cdot \log c\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 72.9% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.5 \cdot 10^{+104} \lor \neg \left(x \leq 1.55 \cdot 10^{+114}\right):\\ \;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \left(z + \left(b + -0.5\right) \cdot \log c\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (or (<= x -2.5e+104) (not (<= x 1.55e+114)))
   (+ a (+ t (+ z (* x (log y)))))
   (+ a (+ t (+ z (* (+ b -0.5) (log c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((x <= -2.5e+104) || !(x <= 1.55e+114)) {
		tmp = a + (t + (z + (x * log(y))));
	} else {
		tmp = a + (t + (z + ((b + -0.5) * log(c))));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if ((x <= (-2.5d+104)) .or. (.not. (x <= 1.55d+114))) then
        tmp = a + (t + (z + (x * log(y))))
    else
        tmp = a + (t + (z + ((b + (-0.5d0)) * log(c))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((x <= -2.5e+104) || !(x <= 1.55e+114)) {
		tmp = a + (t + (z + (x * Math.log(y))));
	} else {
		tmp = a + (t + (z + ((b + -0.5) * Math.log(c))));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (x <= -2.5e+104) or not (x <= 1.55e+114):
		tmp = a + (t + (z + (x * math.log(y))))
	else:
		tmp = a + (t + (z + ((b + -0.5) * math.log(c))))
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if ((x <= -2.5e+104) || !(x <= 1.55e+114))
		tmp = Float64(a + Float64(t + Float64(z + Float64(x * log(y)))));
	else
		tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(b + -0.5) * log(c)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((x <= -2.5e+104) || ~((x <= 1.55e+114)))
		tmp = a + (t + (z + (x * log(y))));
	else
		tmp = a + (t + (z + ((b + -0.5) * log(c))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.5e+104], N[Not[LessEqual[x, 1.55e+114]], $MachinePrecision]], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.5 \cdot 10^{+104} \lor \neg \left(x \leq 1.55 \cdot 10^{+114}\right):\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\

\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \left(b + -0.5\right) \cdot \log c\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.4999999999999998e104 or 1.55e114 < x

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 99.8%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified99.8%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in y around 0 89.2%

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

      \[\leadsto a + \left(t + \color{blue}{\left(z + x \cdot \log y\right)}\right) \]
    8. Step-by-step derivation
      1. +-commutative80.1%

        \[\leadsto a + \left(t + \color{blue}{\left(x \cdot \log y + z\right)}\right) \]
    9. Simplified80.1%

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

    if -2.4999999999999998e104 < x < 1.55e114

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 97.8%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
    4. Taylor expanded in i around 0 75.5%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)} \]
    5. Step-by-step derivation
      1. +-commutative75.5%

        \[\leadsto a + \color{blue}{\left(\left(z + \log c \cdot \left(b - 0.5\right)\right) + t\right)} \]
      2. +-commutative75.5%

        \[\leadsto a + \left(\color{blue}{\left(\log c \cdot \left(b - 0.5\right) + z\right)} + t\right) \]
      3. sub-neg75.5%

        \[\leadsto a + \left(\left(\log c \cdot \color{blue}{\left(b + \left(-0.5\right)\right)} + z\right) + t\right) \]
      4. metadata-eval75.5%

        \[\leadsto a + \left(\left(\log c \cdot \left(b + \color{blue}{-0.5}\right) + z\right) + t\right) \]
    6. Simplified75.5%

      \[\leadsto \color{blue}{a + \left(\left(\log c \cdot \left(b + -0.5\right) + z\right) + t\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification76.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.5 \cdot 10^{+104} \lor \neg \left(x \leq 1.55 \cdot 10^{+114}\right):\\ \;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \left(z + \left(b + -0.5\right) \cdot \log c\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 66.2% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;i \leq -1.55 \cdot 10^{+79}:\\ \;\;\;\;y \cdot i + x \cdot \log y\\ \mathbf{elif}\;i \leq 2.2 \cdot 10^{+219}:\\ \;\;\;\;a + \left(t + \left(z + b \cdot \log c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + y \cdot i\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= i -1.55e+79)
   (+ (* y i) (* x (log y)))
   (if (<= i 2.2e+219) (+ a (+ t (+ z (* b (log c))))) (+ a (+ t (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (i <= -1.55e+79) {
		tmp = (y * i) + (x * log(y));
	} else if (i <= 2.2e+219) {
		tmp = a + (t + (z + (b * log(c))));
	} else {
		tmp = a + (t + (y * i));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if (i <= (-1.55d+79)) then
        tmp = (y * i) + (x * log(y))
    else if (i <= 2.2d+219) then
        tmp = a + (t + (z + (b * log(c))))
    else
        tmp = a + (t + (y * i))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (i <= -1.55e+79) {
		tmp = (y * i) + (x * Math.log(y));
	} else if (i <= 2.2e+219) {
		tmp = a + (t + (z + (b * Math.log(c))));
	} else {
		tmp = a + (t + (y * i));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if i <= -1.55e+79:
		tmp = (y * i) + (x * math.log(y))
	elif i <= 2.2e+219:
		tmp = a + (t + (z + (b * math.log(c))))
	else:
		tmp = a + (t + (y * i))
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (i <= -1.55e+79)
		tmp = Float64(Float64(y * i) + Float64(x * log(y)));
	elseif (i <= 2.2e+219)
		tmp = Float64(a + Float64(t + Float64(z + Float64(b * log(c)))));
	else
		tmp = Float64(a + Float64(t + Float64(y * i)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (i <= -1.55e+79)
		tmp = (y * i) + (x * log(y));
	elseif (i <= 2.2e+219)
		tmp = a + (t + (z + (b * log(c))));
	else
		tmp = a + (t + (y * i));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[i, -1.55e+79], N[(N[(y * i), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 2.2e+219], N[(a + N[(t + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;i \leq -1.55 \cdot 10^{+79}:\\
\;\;\;\;y \cdot i + x \cdot \log y\\

\mathbf{elif}\;i \leq 2.2 \cdot 10^{+219}:\\
\;\;\;\;a + \left(t + \left(z + b \cdot \log c\right)\right)\\

\mathbf{else}:\\
\;\;\;\;a + \left(t + y \cdot i\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -1.5499999999999999e79

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 99.9%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative99.9%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified99.9%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in x around -inf 81.4%

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(-1 \cdot \log y + -1 \cdot \frac{a + \left(t + \left(z + b \cdot \log c\right)\right)}{x}\right)\right)} + y \cdot i \]
    7. Step-by-step derivation
      1. mul-1-neg81.4%

        \[\leadsto \color{blue}{\left(-x \cdot \left(-1 \cdot \log y + -1 \cdot \frac{a + \left(t + \left(z + b \cdot \log c\right)\right)}{x}\right)\right)} + y \cdot i \]
      2. distribute-lft-out81.4%

        \[\leadsto \left(-x \cdot \color{blue}{\left(-1 \cdot \left(\log y + \frac{a + \left(t + \left(z + b \cdot \log c\right)\right)}{x}\right)\right)}\right) + y \cdot i \]
      3. +-commutative81.4%

        \[\leadsto \left(-x \cdot \left(-1 \cdot \left(\log y + \frac{a + \left(t + \color{blue}{\left(b \cdot \log c + z\right)}\right)}{x}\right)\right)\right) + y \cdot i \]
    8. Simplified81.4%

      \[\leadsto \color{blue}{\left(-x \cdot \left(-1 \cdot \left(\log y + \frac{a + \left(t + \left(b \cdot \log c + z\right)\right)}{x}\right)\right)\right)} + y \cdot i \]
    9. Taylor expanded in x around inf 68.6%

      \[\leadsto \left(-\color{blue}{-1 \cdot \left(x \cdot \log y\right)}\right) + y \cdot i \]
    10. Step-by-step derivation
      1. associate-*r*68.6%

        \[\leadsto \left(-\color{blue}{\left(-1 \cdot x\right) \cdot \log y}\right) + y \cdot i \]
      2. neg-mul-168.6%

        \[\leadsto \left(-\color{blue}{\left(-x\right)} \cdot \log y\right) + y \cdot i \]
    11. Simplified68.6%

      \[\leadsto \left(-\color{blue}{\left(-x\right) \cdot \log y}\right) + y \cdot i \]
    12. Taylor expanded in x around 0 68.6%

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

    if -1.5499999999999999e79 < i < 2.2000000000000001e219

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 97.4%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative97.4%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified97.4%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in y around 0 89.7%

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

      \[\leadsto a + \left(t + \color{blue}{\left(z + b \cdot \log c\right)}\right) \]
    8. Step-by-step derivation
      1. +-commutative72.6%

        \[\leadsto a + \left(t + \color{blue}{\left(b \cdot \log c + z\right)}\right) \]
    9. Simplified72.6%

      \[\leadsto a + \left(t + \color{blue}{\left(b \cdot \log c + z\right)}\right) \]

    if 2.2000000000000001e219 < i

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 88.3%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
    4. Taylor expanded in i around inf 82.3%

      \[\leadsto a + \left(t + \color{blue}{i \cdot y}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification72.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -1.55 \cdot 10^{+79}:\\ \;\;\;\;y \cdot i + x \cdot \log y\\ \mathbf{elif}\;i \leq 2.2 \cdot 10^{+219}:\\ \;\;\;\;a + \left(t + \left(z + b \cdot \log c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + y \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 57.9% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + \left(z + t\right)\\ \mathbf{if}\;y \leq 1.75 \cdot 10^{-269}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-250}:\\ \;\;\;\;b \cdot \log c\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{+52}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + y \cdot i\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ a (+ z t))))
   (if (<= y 1.75e-269)
     t_1
     (if (<= y 3e-250)
       (* b (log c))
       (if (<= y 3.7e+52) t_1 (+ a (+ t (* y i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = a + (z + t);
	double tmp;
	if (y <= 1.75e-269) {
		tmp = t_1;
	} else if (y <= 3e-250) {
		tmp = b * log(c);
	} else if (y <= 3.7e+52) {
		tmp = t_1;
	} else {
		tmp = a + (t + (y * i));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: tmp
    t_1 = a + (z + t)
    if (y <= 1.75d-269) then
        tmp = t_1
    else if (y <= 3d-250) then
        tmp = b * log(c)
    else if (y <= 3.7d+52) then
        tmp = t_1
    else
        tmp = a + (t + (y * i))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = a + (z + t);
	double tmp;
	if (y <= 1.75e-269) {
		tmp = t_1;
	} else if (y <= 3e-250) {
		tmp = b * Math.log(c);
	} else if (y <= 3.7e+52) {
		tmp = t_1;
	} else {
		tmp = a + (t + (y * i));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = a + (z + t)
	tmp = 0
	if y <= 1.75e-269:
		tmp = t_1
	elif y <= 3e-250:
		tmp = b * math.log(c)
	elif y <= 3.7e+52:
		tmp = t_1
	else:
		tmp = a + (t + (y * i))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(a + Float64(z + t))
	tmp = 0.0
	if (y <= 1.75e-269)
		tmp = t_1;
	elseif (y <= 3e-250)
		tmp = Float64(b * log(c));
	elseif (y <= 3.7e+52)
		tmp = t_1;
	else
		tmp = Float64(a + Float64(t + Float64(y * i)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = a + (z + t);
	tmp = 0.0;
	if (y <= 1.75e-269)
		tmp = t_1;
	elseif (y <= 3e-250)
		tmp = b * log(c);
	elseif (y <= 3.7e+52)
		tmp = t_1;
	else
		tmp = a + (t + (y * i));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 1.75e-269], t$95$1, If[LessEqual[y, 3e-250], N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e+52], t$95$1, N[(a + N[(t + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a + \left(z + t\right)\\
\mathbf{if}\;y \leq 1.75 \cdot 10^{-269}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 3 \cdot 10^{-250}:\\
\;\;\;\;b \cdot \log c\\

\mathbf{elif}\;y \leq 3.7 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;a + \left(t + y \cdot i\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < 1.75000000000000009e-269 or 3.00000000000000016e-250 < y < 3.7e52

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 83.7%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
    4. Taylor expanded in z around inf 53.6%

      \[\leadsto a + \left(t + \color{blue}{z}\right) \]

    if 1.75000000000000009e-269 < y < 3.00000000000000016e-250

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in a around -inf 34.3%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)}{a} - 1\right)\right)} \]
    4. Taylor expanded in b around inf 60.7%

      \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot \left(b \cdot \log c\right)\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg60.7%

        \[\leadsto -1 \cdot \color{blue}{\left(-b \cdot \log c\right)} \]
      2. distribute-rgt-neg-in60.7%

        \[\leadsto -1 \cdot \color{blue}{\left(b \cdot \left(-\log c\right)\right)} \]
    6. Simplified60.7%

      \[\leadsto -1 \cdot \color{blue}{\left(b \cdot \left(-\log c\right)\right)} \]

    if 3.7e52 < y

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 84.8%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
    4. Taylor expanded in i around inf 64.0%

      \[\leadsto a + \left(t + \color{blue}{i \cdot y}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification57.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.75 \cdot 10^{-269}:\\ \;\;\;\;a + \left(z + t\right)\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-250}:\\ \;\;\;\;b \cdot \log c\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{+52}:\\ \;\;\;\;a + \left(z + t\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + y \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 49.8% accurate, 14.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;i \leq -7.5 \cdot 10^{+106} \lor \neg \left(i \leq 2.7 \cdot 10^{+257}\right):\\
\;\;\;\;y \cdot i\\

\mathbf{else}:\\
\;\;\;\;a + \left(z + t\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -7.50000000000000058e106 or 2.6999999999999997e257 < i

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 62.8%

      \[\leadsto \color{blue}{i \cdot y} \]
    4. Step-by-step derivation
      1. *-commutative62.8%

        \[\leadsto \color{blue}{y \cdot i} \]
    5. Simplified62.8%

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

    if -7.50000000000000058e106 < i < 2.6999999999999997e257

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 82.3%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
    4. Taylor expanded in z around inf 48.8%

      \[\leadsto a + \left(t + \color{blue}{z}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification51.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -7.5 \cdot 10^{+106} \lor \neg \left(i \leq 2.7 \cdot 10^{+257}\right):\\ \;\;\;\;y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a + \left(z + t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 51.4% accurate, 14.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;i \leq -8.5 \cdot 10^{+104}:\\ \;\;\;\;t + y \cdot i\\ \mathbf{elif}\;i \leq 6.4 \cdot 10^{+259}:\\ \;\;\;\;a + \left(z + t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= i -8.5e+104)
   (+ t (* y i))
   (if (<= i 6.4e+259) (+ a (+ z t)) (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (i <= -8.5e+104) {
		tmp = t + (y * i);
	} else if (i <= 6.4e+259) {
		tmp = a + (z + t);
	} else {
		tmp = y * i;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if (i <= (-8.5d+104)) then
        tmp = t + (y * i)
    else if (i <= 6.4d+259) then
        tmp = a + (z + t)
    else
        tmp = y * i
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (i <= -8.5e+104) {
		tmp = t + (y * i);
	} else if (i <= 6.4e+259) {
		tmp = a + (z + t);
	} else {
		tmp = y * i;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if i <= -8.5e+104:
		tmp = t + (y * i)
	elif i <= 6.4e+259:
		tmp = a + (z + t)
	else:
		tmp = y * i
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (i <= -8.5e+104)
		tmp = Float64(t + Float64(y * i));
	elseif (i <= 6.4e+259)
		tmp = Float64(a + Float64(z + t));
	else
		tmp = Float64(y * i);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (i <= -8.5e+104)
		tmp = t + (y * i);
	elseif (i <= 6.4e+259)
		tmp = a + (z + t);
	else
		tmp = y * i;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[i, -8.5e+104], N[(t + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 6.4e+259], N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision], N[(y * i), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;i \leq -8.5 \cdot 10^{+104}:\\
\;\;\;\;t + y \cdot i\\

\mathbf{elif}\;i \leq 6.4 \cdot 10^{+259}:\\
\;\;\;\;a + \left(z + t\right)\\

\mathbf{else}:\\
\;\;\;\;y \cdot i\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -8.4999999999999999e104

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 99.9%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative99.9%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified99.9%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in b around inf 79.9%

      \[\leadsto \color{blue}{b \cdot \left(\log c + \left(\frac{a}{b} + \left(\frac{t}{b} + \left(\frac{z}{b} + \frac{x \cdot \log y}{b}\right)\right)\right)\right)} + y \cdot i \]
    7. Step-by-step derivation
      1. associate-+r+79.9%

        \[\leadsto b \cdot \left(\log c + \left(\frac{a}{b} + \color{blue}{\left(\left(\frac{t}{b} + \frac{z}{b}\right) + \frac{x \cdot \log y}{b}\right)}\right)\right) + y \cdot i \]
      2. associate-/l*79.9%

        \[\leadsto b \cdot \left(\log c + \left(\frac{a}{b} + \left(\left(\frac{t}{b} + \frac{z}{b}\right) + \color{blue}{x \cdot \frac{\log y}{b}}\right)\right)\right) + y \cdot i \]
    8. Simplified79.9%

      \[\leadsto \color{blue}{b \cdot \left(\log c + \left(\frac{a}{b} + \left(\left(\frac{t}{b} + \frac{z}{b}\right) + x \cdot \frac{\log y}{b}\right)\right)\right)} + y \cdot i \]
    9. Taylor expanded in t around inf 69.5%

      \[\leadsto \color{blue}{t} + y \cdot i \]

    if -8.4999999999999999e104 < i < 6.40000000000000036e259

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 82.3%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
    4. Taylor expanded in z around inf 48.8%

      \[\leadsto a + \left(t + \color{blue}{z}\right) \]

    if 6.40000000000000036e259 < i

    1. Initial program 100.0%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 86.2%

      \[\leadsto \color{blue}{i \cdot y} \]
    4. Step-by-step derivation
      1. *-commutative86.2%

        \[\leadsto \color{blue}{y \cdot i} \]
    5. Simplified86.2%

      \[\leadsto \color{blue}{y \cdot i} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification52.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -8.5 \cdot 10^{+104}:\\ \;\;\;\;t + y \cdot i\\ \mathbf{elif}\;i \leq 6.4 \cdot 10^{+259}:\\ \;\;\;\;a + \left(z + t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 22.0% accurate, 16.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.18 \cdot 10^{+176}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -6.4 \cdot 10^{+29}:\\ \;\;\;\;y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= z -1.18e+176) z (if (<= z -6.4e+29) (* y i) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (z <= -1.18e+176) {
		tmp = z;
	} else if (z <= -6.4e+29) {
		tmp = y * i;
	} else {
		tmp = a;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if (z <= (-1.18d+176)) then
        tmp = z
    else if (z <= (-6.4d+29)) then
        tmp = y * i
    else
        tmp = a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (z <= -1.18e+176) {
		tmp = z;
	} else if (z <= -6.4e+29) {
		tmp = y * i;
	} else {
		tmp = a;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if z <= -1.18e+176:
		tmp = z
	elif z <= -6.4e+29:
		tmp = y * i
	else:
		tmp = a
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (z <= -1.18e+176)
		tmp = z;
	elseif (z <= -6.4e+29)
		tmp = Float64(y * i);
	else
		tmp = a;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (z <= -1.18e+176)
		tmp = z;
	elseif (z <= -6.4e+29)
		tmp = y * i;
	else
		tmp = a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.18e+176], z, If[LessEqual[z, -6.4e+29], N[(y * i), $MachinePrecision], a]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.18 \cdot 10^{+176}:\\
\;\;\;\;z\\

\mathbf{elif}\;z \leq -6.4 \cdot 10^{+29}:\\
\;\;\;\;y \cdot i\\

\mathbf{else}:\\
\;\;\;\;a\\


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

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 64.6%

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

    if -1.18000000000000006e176 < z < -6.39999999999999973e29

    1. Initial program 99.7%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 22.3%

      \[\leadsto \color{blue}{i \cdot y} \]
    4. Step-by-step derivation
      1. *-commutative22.3%

        \[\leadsto \color{blue}{y \cdot i} \]
    5. Simplified22.3%

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

    if -6.39999999999999973e29 < z

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 15.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.18 \cdot 10^{+176}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -6.4 \cdot 10^{+29}:\\ \;\;\;\;y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 59.0% accurate, 18.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 10^{+54}:\\
\;\;\;\;a + \left(z + t\right)\\

\mathbf{else}:\\
\;\;\;\;a + \left(t + y \cdot i\right)\\


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

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 83.5%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
    4. Taylor expanded in z around inf 51.0%

      \[\leadsto a + \left(t + \color{blue}{z}\right) \]

    if 1.0000000000000001e54 < y

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 84.8%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
    4. Taylor expanded in i around inf 64.0%

      \[\leadsto a + \left(t + \color{blue}{i \cdot y}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification55.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 10^{+54}:\\ \;\;\;\;a + \left(z + t\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + y \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 54.2% accurate, 21.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.45 \cdot 10^{+55}:\\
\;\;\;\;a + \left(z + t\right)\\

\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\


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

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 83.5%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
    4. Taylor expanded in z around inf 51.0%

      \[\leadsto a + \left(t + \color{blue}{z}\right) \]

    if 1.4499999999999999e55 < y

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 99.8%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    5. Simplified99.8%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\log c \cdot b}\right) + y \cdot i \]
    6. Taylor expanded in x around -inf 75.5%

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(-1 \cdot \log y + -1 \cdot \frac{a + \left(t + \left(z + b \cdot \log c\right)\right)}{x}\right)\right)} + y \cdot i \]
    7. Step-by-step derivation
      1. mul-1-neg75.5%

        \[\leadsto \color{blue}{\left(-x \cdot \left(-1 \cdot \log y + -1 \cdot \frac{a + \left(t + \left(z + b \cdot \log c\right)\right)}{x}\right)\right)} + y \cdot i \]
      2. distribute-lft-out75.5%

        \[\leadsto \left(-x \cdot \color{blue}{\left(-1 \cdot \left(\log y + \frac{a + \left(t + \left(z + b \cdot \log c\right)\right)}{x}\right)\right)}\right) + y \cdot i \]
      3. +-commutative75.5%

        \[\leadsto \left(-x \cdot \left(-1 \cdot \left(\log y + \frac{a + \left(t + \color{blue}{\left(b \cdot \log c + z\right)}\right)}{x}\right)\right)\right) + y \cdot i \]
    8. Simplified75.5%

      \[\leadsto \color{blue}{\left(-x \cdot \left(-1 \cdot \left(\log y + \frac{a + \left(t + \left(b \cdot \log c + z\right)\right)}{x}\right)\right)\right)} + y \cdot i \]
    9. Taylor expanded in a around inf 57.7%

      \[\leadsto \left(-x \cdot \left(-1 \cdot \left(\log y + \color{blue}{\frac{a}{x}}\right)\right)\right) + y \cdot i \]
    10. Taylor expanded in x around 0 52.3%

      \[\leadsto \color{blue}{i \cdot y - -1 \cdot a} \]
    11. Step-by-step derivation
      1. *-commutative52.3%

        \[\leadsto \color{blue}{y \cdot i} - -1 \cdot a \]
      2. mul-1-neg52.3%

        \[\leadsto y \cdot i - \color{blue}{\left(-a\right)} \]
    12. Simplified52.3%

      \[\leadsto \color{blue}{y \cdot i - \left(-a\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification51.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.45 \cdot 10^{+55}:\\ \;\;\;\;a + \left(z + t\right)\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 21.1% accurate, 36.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+161}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -2.5e+161) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (z <= -2.5e+161) {
		tmp = z;
	} else {
		tmp = a;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if (z <= (-2.5d+161)) then
        tmp = z
    else
        tmp = a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (z <= -2.5e+161) {
		tmp = z;
	} else {
		tmp = a;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if z <= -2.5e+161:
		tmp = z
	else:
		tmp = a
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (z <= -2.5e+161)
		tmp = z;
	else
		tmp = a;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (z <= -2.5e+161)
		tmp = z;
	else
		tmp = a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2.5e+161], z, a]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+161}:\\
\;\;\;\;z\\

\mathbf{else}:\\
\;\;\;\;a\\


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

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 58.7%

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

    if -2.4999999999999998e161 < z

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 16.2%

      \[\leadsto \color{blue}{a} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification21.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+161}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 16.2% accurate, 219.0× speedup?

\[\begin{array}{l} \\ a \end{array} \]
(FPCore (x y z t a b c i) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return a;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: c
    real(8), intent (in) :: i
    code = a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return a;
}
def code(x, y, z, t, a, b, c, i):
	return a
function code(x, y, z, t, a, b, c, i)
	return a
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = a;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}

\\
a
\end{array}
Derivation
  1. Initial program 99.9%

    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
  2. Add Preprocessing
  3. Taylor expanded in a around inf 15.2%

    \[\leadsto \color{blue}{a} \]
  4. Final simplification15.2%

    \[\leadsto a \]
  5. Add Preprocessing

Reproduce

?
herbie shell --seed 2024066 
(FPCore (x y z t a b c i)
  :name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, B"
  :precision binary64
  (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))