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

Percentage Accurate: 99.8% → 99.8%
Time: 17.4s
Alternatives: 22
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 22 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, \mathsf{fma}\left(x, \log y, a\right) + \left(z + t\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) (+ (fma x (log y) a) (+ z t)))))
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), (fma(x, log(y), a) + (z + t))));
}
function code(x, y, z, t, a, b, c, i)
	return fma(y, i, fma(Float64(b + -0.5), log(c), Float64(fma(x, log(y), a) + Float64(z + t))))
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision] + a), $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, \mathsf{fma}\left(x, \log y, a\right) + \left(z + t\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. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.8% accurate, 0.7× speedup?

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

\\
\left(\left(\mathsf{fma}\left(x, \log y, a\right) + \left(z + t\right)\right) + y \cdot i\right) + \left(b + -0.5\right) \cdot \log c
\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. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 99.8% accurate, 1.0× speedup?

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

\\
y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \log c \cdot \left(b - 0.5\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. Final simplification99.9%

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

Alternative 4: 95.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4.6 \cdot 10^{+89} \lor \neg \left(x \leq 3.1 \cdot 10^{+135}\right):\\ \;\;\;\;a + \left(t + \left(z + \left(y \cdot i + x \cdot \log y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, a + \left(t + \left(z + \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 -4.6e+89) (not (<= x 3.1e+135)))
   (+ a (+ t (+ z (+ (* y i) (* x (log y))))))
   (fma y i (+ a (+ t (+ z (* (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 <= -4.6e+89) || !(x <= 3.1e+135)) {
		tmp = a + (t + (z + ((y * i) + (x * log(y)))));
	} else {
		tmp = fma(y, i, (a + (t + (z + (log(c) * (b - 0.5))))));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if ((x <= -4.6e+89) || !(x <= 3.1e+135))
		tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(y * i) + Float64(x * log(y))))));
	else
		tmp = fma(y, i, Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5))))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -4.6e+89], N[Not[LessEqual[x, 3.1e+135]], $MachinePrecision]], N[(a + N[(t + N[(z + N[(N[(y * i), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(a + N[(t + N[(z + 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 -4.6 \cdot 10^{+89} \lor \neg \left(x \leq 3.1 \cdot 10^{+135}\right):\\
\;\;\;\;a + \left(t + \left(z + \left(y \cdot i + x \cdot \log y\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, a + \left(t + \left(z + \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 < -4.5999999999999998e89 or 3.10000000000000022e135 < 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. 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 \]
    3. 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 \]
    4. 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 \]
    5. Taylor expanded in b around 0 90.9%

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

    if -4.5999999999999998e89 < x < 3.10000000000000022e135

    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. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.6 \cdot 10^{+89} \lor \neg \left(x \leq 3.1 \cdot 10^{+135}\right):\\ \;\;\;\;a + \left(t + \left(z + \left(y \cdot i + x \cdot \log y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\ \end{array} \]

Alternative 5: 98.2% accurate, 1.0× speedup?

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

\\
y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + b \cdot \log c\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. 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 \]
  3. 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 \]
  4. 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 \]
  5. Final simplification98.0%

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

Alternative 6: 75.4% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\ t_2 := x \cdot \log y\\ t_3 := \left(z + y \cdot i\right) + \left(a + t\right)\\ \mathbf{if}\;x \leq -2.5 \cdot 10^{+88}:\\ \;\;\;\;t + \left(z + \left(y \cdot i + t_2\right)\right)\\ \mathbf{elif}\;x \leq -1.5 \cdot 10^{-184}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 2.05 \cdot 10^{-268}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 4.4 \cdot 10^{+36}:\\ \;\;\;\;t + \left(a + \mathsf{fma}\left(i, y, z\right)\right)\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{+115}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{+123}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;a + \left(t_2 + \left(z + t\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ a (+ t (+ z (* (log c) (- b 0.5))))))
        (t_2 (* x (log y)))
        (t_3 (+ (+ z (* y i)) (+ a t))))
   (if (<= x -2.5e+88)
     (+ t (+ z (+ (* y i) t_2)))
     (if (<= x -1.5e-184)
       t_3
       (if (<= x 2.05e-268)
         t_1
         (if (<= x 4.4e+36)
           (+ t (+ a (fma i y z)))
           (if (<= x 1.8e+115)
             t_1
             (if (<= x 2.3e+123) t_3 (+ a (+ t_2 (+ z t)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = a + (t + (z + (log(c) * (b - 0.5))));
	double t_2 = x * log(y);
	double t_3 = (z + (y * i)) + (a + t);
	double tmp;
	if (x <= -2.5e+88) {
		tmp = t + (z + ((y * i) + t_2));
	} else if (x <= -1.5e-184) {
		tmp = t_3;
	} else if (x <= 2.05e-268) {
		tmp = t_1;
	} else if (x <= 4.4e+36) {
		tmp = t + (a + fma(i, y, z));
	} else if (x <= 1.8e+115) {
		tmp = t_1;
	} else if (x <= 2.3e+123) {
		tmp = t_3;
	} else {
		tmp = a + (t_2 + (z + t));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5)))))
	t_2 = Float64(x * log(y))
	t_3 = Float64(Float64(z + Float64(y * i)) + Float64(a + t))
	tmp = 0.0
	if (x <= -2.5e+88)
		tmp = Float64(t + Float64(z + Float64(Float64(y * i) + t_2)));
	elseif (x <= -1.5e-184)
		tmp = t_3;
	elseif (x <= 2.05e-268)
		tmp = t_1;
	elseif (x <= 4.4e+36)
		tmp = Float64(t + Float64(a + fma(i, y, z)));
	elseif (x <= 1.8e+115)
		tmp = t_1;
	elseif (x <= 2.3e+123)
		tmp = t_3;
	else
		tmp = Float64(a + Float64(t_2 + Float64(z + t)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.5e+88], N[(t + N[(z + N[(N[(y * i), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.5e-184], t$95$3, If[LessEqual[x, 2.05e-268], t$95$1, If[LessEqual[x, 4.4e+36], N[(t + N[(a + N[(i * y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.8e+115], t$95$1, If[LessEqual[x, 2.3e+123], t$95$3, N[(a + N[(t$95$2 + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -1.5 \cdot 10^{-184}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;x \leq 2.05 \cdot 10^{-268}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 4.4 \cdot 10^{+36}:\\
\;\;\;\;t + \left(a + \mathsf{fma}\left(i, y, z\right)\right)\\

\mathbf{elif}\;x \leq 1.8 \cdot 10^{+115}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 2.3 \cdot 10^{+123}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -2.49999999999999999e88

    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. 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 \]
    3. 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 \]
    4. 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 \]
    5. Taylor expanded in b around 0 85.0%

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

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

    if -2.49999999999999999e88 < x < -1.49999999999999996e-184 or 1.8e115 < x < 2.2999999999999999e123

    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. Taylor expanded in b around inf 97.2%

      \[\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 \]
    3. Step-by-step derivation
      1. *-commutative97.2%

        \[\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 \]
    4. Simplified97.2%

      \[\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. Taylor expanded in b around 0 88.4%

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

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

        \[\leadsto \color{blue}{\left(a + t\right) + \left(z + i \cdot y\right)} \]
      2. +-commutative87.6%

        \[\leadsto \color{blue}{\left(t + a\right)} + \left(z + i \cdot y\right) \]
    8. Simplified87.6%

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

    if -1.49999999999999996e-184 < x < 2.0499999999999999e-268 or 4.40000000000000001e36 < x < 1.8e115

    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. Taylor expanded in x around 0 97.3%

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

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

    if 2.0499999999999999e-268 < x < 4.40000000000000001e36

    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. Taylor expanded in b around inf 97.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 \]
    3. Step-by-step derivation
      1. *-commutative97.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 \]
    4. Simplified97.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. Taylor expanded in b around 0 85.4%

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

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

        \[\leadsto \color{blue}{\left(a + t\right) + \left(z + i \cdot y\right)} \]
      2. +-commutative85.4%

        \[\leadsto \color{blue}{\left(t + a\right)} + \left(z + i \cdot y\right) \]
      3. associate-+l+85.4%

        \[\leadsto \color{blue}{t + \left(a + \left(z + i \cdot y\right)\right)} \]
      4. +-commutative85.4%

        \[\leadsto t + \left(a + \color{blue}{\left(i \cdot y + z\right)}\right) \]
      5. fma-def85.5%

        \[\leadsto t + \left(a + \color{blue}{\mathsf{fma}\left(i, y, z\right)}\right) \]
    8. Simplified85.5%

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

    if 2.2999999999999999e123 < x

    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. Taylor expanded in b around inf 99.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 \]
    3. Step-by-step derivation
      1. *-commutative99.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 \]
    4. Simplified99.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. Taylor expanded in b around 0 91.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.5 \cdot 10^{+88}:\\ \;\;\;\;t + \left(z + \left(y \cdot i + x \cdot \log y\right)\right)\\ \mathbf{elif}\;x \leq -1.5 \cdot 10^{-184}:\\ \;\;\;\;\left(z + y \cdot i\right) + \left(a + t\right)\\ \mathbf{elif}\;x \leq 2.05 \cdot 10^{-268}:\\ \;\;\;\;a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\ \mathbf{elif}\;x \leq 4.4 \cdot 10^{+36}:\\ \;\;\;\;t + \left(a + \mathsf{fma}\left(i, y, z\right)\right)\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{+115}:\\ \;\;\;\;a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{+123}:\\ \;\;\;\;\left(z + y \cdot i\right) + \left(a + t\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(x \cdot \log y + \left(z + t\right)\right)\\ \end{array} \]

Alternative 7: 72.2% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;i \leq -4.9 \cdot 10^{-163}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;i \leq -6.8 \cdot 10^{-234}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;i \leq 6.8 \cdot 10^{-44}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;i \leq 5.4 \cdot 10^{+80}:\\
\;\;\;\;a + t_1\\

\mathbf{else}:\\
\;\;\;\;t + \left(a + \mathsf{fma}\left(i, y, z\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if i < -1.04999999999999997e27

    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. Taylor expanded in b around inf 98.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 \]
    3. Step-by-step derivation
      1. *-commutative98.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 \]
    4. Simplified98.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. Taylor expanded in b around 0 87.4%

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

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

        \[\leadsto \color{blue}{\left(a + t\right) + \left(z + i \cdot y\right)} \]
      2. +-commutative78.4%

        \[\leadsto \color{blue}{\left(t + a\right)} + \left(z + i \cdot y\right) \]
    8. Simplified78.4%

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

    if -1.04999999999999997e27 < i < -4.9000000000000003e-163 or -6.79999999999999971e-234 < i < 6.80000000000000033e-44

    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. Taylor expanded in b around inf 99.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 \]
    3. Step-by-step derivation
      1. *-commutative99.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 \]
    4. Simplified99.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. Taylor expanded in b around 0 89.1%

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

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

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

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

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

    if -4.9000000000000003e-163 < i < -6.79999999999999971e-234

    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. Taylor expanded in x around 0 88.4%

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

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

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

    if 6.80000000000000033e-44 < i < 5.39999999999999966e80

    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. Taylor expanded in x around 0 81.3%

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

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

    if 5.39999999999999966e80 < 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. 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 \]
    3. 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 \]
    4. 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 \]
    5. Taylor expanded in b around 0 92.4%

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

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

        \[\leadsto \color{blue}{\left(a + t\right) + \left(z + i \cdot y\right)} \]
      2. +-commutative87.4%

        \[\leadsto \color{blue}{\left(t + a\right)} + \left(z + i \cdot y\right) \]
      3. associate-+l+87.4%

        \[\leadsto \color{blue}{t + \left(a + \left(z + i \cdot y\right)\right)} \]
      4. +-commutative87.4%

        \[\leadsto t + \left(a + \color{blue}{\left(i \cdot y + z\right)}\right) \]
      5. fma-def87.4%

        \[\leadsto t + \left(a + \color{blue}{\mathsf{fma}\left(i, y, z\right)}\right) \]
    8. Simplified87.4%

      \[\leadsto \color{blue}{t + \left(a + \mathsf{fma}\left(i, y, z\right)\right)} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification82.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -1.05 \cdot 10^{+27}:\\ \;\;\;\;\left(z + y \cdot i\right) + \left(a + t\right)\\ \mathbf{elif}\;i \leq -4.9 \cdot 10^{-163}:\\ \;\;\;\;a + \left(x \cdot \log y + \left(z + t\right)\right)\\ \mathbf{elif}\;i \leq -6.8 \cdot 10^{-234}:\\ \;\;\;\;t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\ \mathbf{elif}\;i \leq 6.8 \cdot 10^{-44}:\\ \;\;\;\;a + \left(x \cdot \log y + \left(z + t\right)\right)\\ \mathbf{elif}\;i \leq 5.4 \cdot 10^{+80}:\\ \;\;\;\;a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t + \left(a + \mathsf{fma}\left(i, y, z\right)\right)\\ \end{array} \]

Alternative 8: 95.0% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{+95} \lor \neg \left(x \leq 6.3 \cdot 10^{+133}\right):\\ \;\;\;\;a + \left(t + \left(z + \left(y \cdot i + 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 -1.7e+95) (not (<= x 6.3e+133)))
   (+ a (+ t (+ z (+ (* y i) (* 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 <= -1.7e+95) || !(x <= 6.3e+133)) {
		tmp = a + (t + (z + ((y * i) + (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 <= (-1.7d+95)) .or. (.not. (x <= 6.3d+133))) then
        tmp = a + (t + (z + ((y * i) + (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 <= -1.7e+95) || !(x <= 6.3e+133)) {
		tmp = a + (t + (z + ((y * i) + (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 <= -1.7e+95) or not (x <= 6.3e+133):
		tmp = a + (t + (z + ((y * i) + (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 <= -1.7e+95) || !(x <= 6.3e+133))
		tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(y * i) + 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 <= -1.7e+95) || ~((x <= 6.3e+133)))
		tmp = a + (t + (z + ((y * i) + (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, -1.7e+95], N[Not[LessEqual[x, 6.3e+133]], $MachinePrecision]], N[(a + N[(t + N[(z + N[(N[(y * i), $MachinePrecision] + 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 -1.7 \cdot 10^{+95} \lor \neg \left(x \leq 6.3 \cdot 10^{+133}\right):\\
\;\;\;\;a + \left(t + \left(z + \left(y \cdot i + 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 < -1.70000000000000011e95 or 6.30000000000000049e133 < 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. 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 \]
    3. 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 \]
    4. 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 \]
    5. Taylor expanded in b around 0 90.9%

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

    if -1.70000000000000011e95 < x < 6.30000000000000049e133

    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. Taylor expanded in x around 0 98.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{+95} \lor \neg \left(x \leq 6.3 \cdot 10^{+133}\right):\\ \;\;\;\;a + \left(t + \left(z + \left(y \cdot i + 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} \]

Alternative 9: 72.3% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;i \leq -2.3 \cdot 10^{-159}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;i \leq 9.5 \cdot 10^{+77}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t + \left(a + \mathsf{fma}\left(i, y, z\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if i < -1.4000000000000001e25

    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. Taylor expanded in b around inf 98.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 \]
    3. Step-by-step derivation
      1. *-commutative98.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 \]
    4. Simplified98.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. Taylor expanded in b around 0 87.4%

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

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

        \[\leadsto \color{blue}{\left(a + t\right) + \left(z + i \cdot y\right)} \]
      2. +-commutative78.4%

        \[\leadsto \color{blue}{\left(t + a\right)} + \left(z + i \cdot y\right) \]
    8. Simplified78.4%

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

    if -1.4000000000000001e25 < i < -2.29999999999999978e-159 or -1.9e-233 < i < 9.4999999999999998e77

    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. Taylor expanded in b around inf 99.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 \]
    3. Step-by-step derivation
      1. *-commutative99.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 \]
    4. Simplified99.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. Taylor expanded in b around 0 84.3%

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

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

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

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

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

    if -2.29999999999999978e-159 < i < -1.9e-233

    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. Taylor expanded in x around 0 88.4%

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

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

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

    if 9.4999999999999998e77 < 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. 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 \]
    3. 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 \]
    4. 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 \]
    5. Taylor expanded in b around 0 92.4%

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

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

        \[\leadsto \color{blue}{\left(a + t\right) + \left(z + i \cdot y\right)} \]
      2. +-commutative87.4%

        \[\leadsto \color{blue}{\left(t + a\right)} + \left(z + i \cdot y\right) \]
      3. associate-+l+87.4%

        \[\leadsto \color{blue}{t + \left(a + \left(z + i \cdot y\right)\right)} \]
      4. +-commutative87.4%

        \[\leadsto t + \left(a + \color{blue}{\left(i \cdot y + z\right)}\right) \]
      5. fma-def87.4%

        \[\leadsto t + \left(a + \color{blue}{\mathsf{fma}\left(i, y, z\right)}\right) \]
    8. Simplified87.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -1.4 \cdot 10^{+25}:\\ \;\;\;\;\left(z + y \cdot i\right) + \left(a + t\right)\\ \mathbf{elif}\;i \leq -2.3 \cdot 10^{-159}:\\ \;\;\;\;a + \left(x \cdot \log y + \left(z + t\right)\right)\\ \mathbf{elif}\;i \leq -1.9 \cdot 10^{-233}:\\ \;\;\;\;t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\ \mathbf{elif}\;i \leq 9.5 \cdot 10^{+77}:\\ \;\;\;\;a + \left(x \cdot \log y + \left(z + t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t + \left(a + \mathsf{fma}\left(i, y, z\right)\right)\\ \end{array} \]

Alternative 10: 87.1% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.2 \cdot 10^{+214} \lor \neg \left(b \leq 1.5 \cdot 10^{+56}\right):\\
\;\;\;\;z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -7.2000000000000002e214 or 1.50000000000000003e56 < b

    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. Taylor expanded in x around 0 90.7%

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

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

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

    if -7.2000000000000002e214 < b < 1.50000000000000003e56

    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. 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 \]
    3. 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 \]
    4. 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 \]
    5. Taylor expanded in b around 0 95.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -7.2 \cdot 10^{+214} \lor \neg \left(b \leq 1.5 \cdot 10^{+56}\right):\\ \;\;\;\;z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \left(z + \left(y \cdot i + x \cdot \log y\right)\right)\right)\\ \end{array} \]

Alternative 11: 83.8% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -5.3 \cdot 10^{+88} \lor \neg \left(x \leq 2.5 \cdot 10^{+132}\right):\\ \;\;\;\;a + \left(t + \left(z + \left(y \cdot i + x \cdot \log y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (or (<= x -5.3e+88) (not (<= x 2.5e+132)))
   (+ a (+ t (+ z (+ (* y i) (* x (log y))))))
   (+ a (+ 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 <= -5.3e+88) || !(x <= 2.5e+132)) {
		tmp = a + (t + (z + ((y * i) + (x * log(y)))));
	} else {
		tmp = a + (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 <= (-5.3d+88)) .or. (.not. (x <= 2.5d+132))) then
        tmp = a + (t + (z + ((y * i) + (x * log(y)))))
    else
        tmp = a + (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 <= -5.3e+88) || !(x <= 2.5e+132)) {
		tmp = a + (t + (z + ((y * i) + (x * Math.log(y)))));
	} else {
		tmp = a + (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 <= -5.3e+88) or not (x <= 2.5e+132):
		tmp = a + (t + (z + ((y * i) + (x * math.log(y)))))
	else:
		tmp = a + (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 <= -5.3e+88) || !(x <= 2.5e+132))
		tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(y * i) + Float64(x * log(y))))));
	else
		tmp = Float64(a + 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 <= -5.3e+88) || ~((x <= 2.5e+132)))
		tmp = a + (t + (z + ((y * i) + (x * log(y)))));
	else
		tmp = a + (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, -5.3e+88], N[Not[LessEqual[x, 2.5e+132]], $MachinePrecision]], N[(a + N[(t + N[(z + N[(N[(y * i), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(z + N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.29999999999999987e88 or 2.5000000000000001e132 < 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. 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 \]
    3. 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 \]
    4. 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 \]
    5. Taylor expanded in b around 0 90.9%

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

    if -5.29999999999999987e88 < x < 2.5000000000000001e132

    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. Taylor expanded in x around 0 98.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.3 \cdot 10^{+88} \lor \neg \left(x \leq 2.5 \cdot 10^{+132}\right):\\ \;\;\;\;a + \left(t + \left(z + \left(y \cdot i + x \cdot \log y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\\ \end{array} \]

Alternative 12: 62.8% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.1 \cdot 10^{+17}:\\
\;\;\;\;z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\\

\mathbf{elif}\;a \leq 1.55 \cdot 10^{+174}:\\
\;\;\;\;t + \left(z + \left(y \cdot i + x \cdot \log y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < 2.1e17

    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. Taylor expanded in x around 0 84.7%

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

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

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

    if 2.1e17 < a < 1.55e174

    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. Taylor expanded in b around inf 99.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 \]
    3. Step-by-step derivation
      1. *-commutative99.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 \]
    4. Simplified99.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. Taylor expanded in b around 0 93.7%

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

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

    if 1.55e174 < a

    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. Taylor expanded in b around inf 100.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 \]
    3. Step-by-step derivation
      1. *-commutative100.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 \]
    4. Simplified100.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. Taylor expanded in b around 0 100.0%

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

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

        \[\leadsto \color{blue}{\left(a + t\right) + \left(z + i \cdot y\right)} \]
      2. +-commutative95.1%

        \[\leadsto \color{blue}{\left(t + a\right)} + \left(z + i \cdot y\right) \]
    8. Simplified95.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 2.1 \cdot 10^{+17}:\\ \;\;\;\;z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+174}:\\ \;\;\;\;t + \left(z + \left(y \cdot i + x \cdot \log y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z + y \cdot i\right) + \left(a + t\right)\\ \end{array} \]

Alternative 13: 73.0% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.35 \cdot 10^{+197} \lor \neg \left(x \leq 3.5 \cdot 10^{+197}\right):\\ \;\;\;\;a + x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;t + \left(a + \mathsf{fma}\left(i, y, z\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (or (<= x -1.35e+197) (not (<= x 3.5e+197)))
   (+ a (* x (log y)))
   (+ t (+ a (fma i y z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((x <= -1.35e+197) || !(x <= 3.5e+197)) {
		tmp = a + (x * log(y));
	} else {
		tmp = t + (a + fma(i, y, z));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if ((x <= -1.35e+197) || !(x <= 3.5e+197))
		tmp = Float64(a + Float64(x * log(y)));
	else
		tmp = Float64(t + Float64(a + fma(i, y, z)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.35e+197], N[Not[LessEqual[x, 3.5e+197]], $MachinePrecision]], N[(a + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(a + N[(i * y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{+197} \lor \neg \left(x \leq 3.5 \cdot 10^{+197}\right):\\
\;\;\;\;a + x \cdot \log y\\

\mathbf{else}:\\
\;\;\;\;t + \left(a + \mathsf{fma}\left(i, y, z\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.35e197 or 3.49999999999999999e197 < x

    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. Taylor expanded in b around inf 99.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 \]
    3. Step-by-step derivation
      1. *-commutative99.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 \]
    4. Simplified99.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. Taylor expanded in b around 0 90.8%

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

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

    if -1.35e197 < x < 3.49999999999999999e197

    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. Taylor expanded in b around inf 97.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 \]
    3. Step-by-step derivation
      1. *-commutative97.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 \]
    4. Simplified97.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. Taylor expanded in b around 0 82.4%

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

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

        \[\leadsto \color{blue}{\left(a + t\right) + \left(z + i \cdot y\right)} \]
      2. +-commutative77.7%

        \[\leadsto \color{blue}{\left(t + a\right)} + \left(z + i \cdot y\right) \]
      3. associate-+l+77.7%

        \[\leadsto \color{blue}{t + \left(a + \left(z + i \cdot y\right)\right)} \]
      4. +-commutative77.7%

        \[\leadsto t + \left(a + \color{blue}{\left(i \cdot y + z\right)}\right) \]
      5. fma-def77.7%

        \[\leadsto t + \left(a + \color{blue}{\mathsf{fma}\left(i, y, z\right)}\right) \]
    8. Simplified77.7%

      \[\leadsto \color{blue}{t + \left(a + \mathsf{fma}\left(i, y, z\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification76.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.35 \cdot 10^{+197} \lor \neg \left(x \leq 3.5 \cdot 10^{+197}\right):\\ \;\;\;\;a + x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;t + \left(a + \mathsf{fma}\left(i, y, z\right)\right)\\ \end{array} \]

Alternative 14: 73.0% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{+198} \lor \neg \left(x \leq 4.1 \cdot 10^{+197}\right):\\
\;\;\;\;a + x \cdot \log y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.3000000000000001e198 or 4.1000000000000003e197 < x

    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. Taylor expanded in b around inf 99.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 \]
    3. Step-by-step derivation
      1. *-commutative99.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 \]
    4. Simplified99.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. Taylor expanded in b around 0 90.8%

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

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

    if -2.3000000000000001e198 < x < 4.1000000000000003e197

    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. Taylor expanded in b around inf 97.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 \]
    3. Step-by-step derivation
      1. *-commutative97.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 \]
    4. Simplified97.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. Taylor expanded in b around 0 82.4%

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

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

        \[\leadsto \color{blue}{\left(a + t\right) + \left(z + i \cdot y\right)} \]
      2. +-commutative77.7%

        \[\leadsto \color{blue}{\left(t + a\right)} + \left(z + i \cdot y\right) \]
    8. Simplified77.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.3 \cdot 10^{+198} \lor \neg \left(x \leq 4.1 \cdot 10^{+197}\right):\\ \;\;\;\;a + x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;\left(z + y \cdot i\right) + \left(a + t\right)\\ \end{array} \]

Alternative 15: 71.9% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.5 \cdot 10^{+198} \lor \neg \left(x \leq 3.3 \cdot 10^{+198}\right):\\
\;\;\;\;x \cdot \log y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.50000000000000013e198 or 3.29999999999999994e198 < x

    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. Taylor expanded in x around inf 63.8%

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

    if -3.50000000000000013e198 < x < 3.29999999999999994e198

    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. Taylor expanded in b around inf 97.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 \]
    3. Step-by-step derivation
      1. *-commutative97.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 \]
    4. Simplified97.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. Taylor expanded in b around 0 82.5%

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

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

        \[\leadsto \color{blue}{\left(a + t\right) + \left(z + i \cdot y\right)} \]
      2. +-commutative77.6%

        \[\leadsto \color{blue}{\left(t + a\right)} + \left(z + i \cdot y\right) \]
    8. Simplified77.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.5 \cdot 10^{+198} \lor \neg \left(x \leq 3.3 \cdot 10^{+198}\right):\\ \;\;\;\;x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;\left(z + y \cdot i\right) + \left(a + t\right)\\ \end{array} \]

Alternative 16: 67.5% accurate, 24.3× speedup?

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

\\
\left(z + y \cdot i\right) + \left(a + t\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. 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 \]
  3. 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 \]
  4. 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 \]
  5. Taylor expanded in b around 0 83.8%

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

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

      \[\leadsto \color{blue}{\left(a + t\right) + \left(z + i \cdot y\right)} \]
    2. +-commutative68.7%

      \[\leadsto \color{blue}{\left(t + a\right)} + \left(z + i \cdot y\right) \]
  8. Simplified68.7%

    \[\leadsto \color{blue}{\left(t + a\right) + \left(z + i \cdot y\right)} \]
  9. Final simplification68.7%

    \[\leadsto \left(z + y \cdot i\right) + \left(a + t\right) \]

Alternative 17: 39.6% accurate, 30.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -1.1200000000000001e106 or 6.6e201 < 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. Taylor expanded in y around inf 58.9%

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

        \[\leadsto \color{blue}{y \cdot i} \]
    4. Simplified58.9%

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

    if -1.1200000000000001e106 < i < 6.6e201

    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. Taylor expanded in b around inf 97.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 \]
    3. Step-by-step derivation
      1. *-commutative97.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 \]
    4. Simplified97.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. Taylor expanded in b around 0 81.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -1.12 \cdot 10^{+106} \lor \neg \left(i \leq 6.6 \cdot 10^{+201}\right):\\ \;\;\;\;y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a + z\\ \end{array} \]

Alternative 18: 23.4% accurate, 30.7× speedup?

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

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

\mathbf{elif}\;z \leq -1.6 \cdot 10^{-185}:\\
\;\;\;\;y \cdot i\\

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


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

    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. Taylor expanded in z around inf 43.0%

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

    if -7.0000000000000001e97 < z < -1.5999999999999999e-185

    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. Taylor expanded in y around inf 25.0%

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

        \[\leadsto \color{blue}{y \cdot i} \]
    4. Simplified25.0%

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

    if -1.5999999999999999e-185 < 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. Taylor expanded in a around inf 20.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+97}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-185}:\\ \;\;\;\;y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]

Alternative 19: 31.6% accurate, 30.7× speedup?

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

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

\mathbf{elif}\;z \leq -1.44 \cdot 10^{-185}:\\
\;\;\;\;y \cdot i\\

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


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

    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. Taylor expanded in z around inf 43.0%

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

    if -3.80000000000000036e97 < z < -1.4399999999999999e-185

    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. Taylor expanded in y around inf 25.0%

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

        \[\leadsto \color{blue}{y \cdot i} \]
    4. Simplified25.0%

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

    if -1.4399999999999999e-185 < 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. Taylor expanded in b around inf 98.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 \]
    3. Step-by-step derivation
      1. *-commutative98.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 \]
    4. Simplified98.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. Taylor expanded in b around 0 85.4%

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

      \[\leadsto a + \color{blue}{t} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification33.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+97}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -1.44 \cdot 10^{-185}:\\ \;\;\;\;y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a + t\\ \end{array} \]

Alternative 20: 43.2% accurate, 31.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+97}:\\
\;\;\;\;a + z\\

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


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

    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. 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 \]
    3. 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 \]
    4. 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 \]
    5. Taylor expanded in b around 0 87.4%

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

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

    if -3.80000000000000036e97 < 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. Taylor expanded in b around inf 97.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 \]
    3. Step-by-step derivation
      1. *-commutative97.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 \]
    4. Simplified97.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. Taylor expanded in b around 0 83.1%

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

      \[\leadsto a + \color{blue}{i \cdot y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification45.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+97}:\\ \;\;\;\;a + z\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \]

Alternative 21: 21.5% accurate, 71.5× speedup?

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

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

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


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

    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. Taylor expanded in z around inf 41.4%

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

    if -2.0000000000000001e97 < 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. Taylor expanded in a around inf 19.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+97}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]

Alternative 22: 16.7% 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. Taylor expanded in a around inf 18.7%

    \[\leadsto \color{blue}{a} \]
  3. Final simplification18.7%

    \[\leadsto a \]

Reproduce

?
herbie shell --seed 2023336 
(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)))