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

Percentage Accurate: 99.8% → 99.8%
Time: 22.0s
Alternatives: 20
Speedup: 0.7×

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 20 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.4× speedup?

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

\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, z + \mathsf{fma}\left(x, \log y, t + a\right)\right)\right)
\end{array}
Derivation
  1. Initial program 99.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. Step-by-step derivation
    1. associate-+l+99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.8% accurate, 0.7× speedup?

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

\\
\left(\left(t + a\right) + \mathsf{fma}\left(x, \log y, z\right)\right) + \left(\left(b + -0.5\right) \cdot \log c + y \cdot i\right)
\end{array}
Derivation
  1. Initial program 99.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. Step-by-step derivation
    1. associate-+l+99.8%

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

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

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

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

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

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

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

Alternative 3: 89.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := b \cdot \log c\\
\mathbf{if}\;x \leq -5.3 \cdot 10^{+162} \lor \neg \left(x \leq 4.6 \cdot 10^{+158}\right):\\
\;\;\;\;y \cdot i + \left(x \cdot \log y + t\_1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.3000000000000002e162 or 4.59999999999999971e158 < x

    1. Initial program 99.6%

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

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{b \cdot \log c}\right) + y \cdot i \]
    4. Step-by-step derivation
      1. *-commutative99.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. Simplified99.6%

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

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

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

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

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

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

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

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

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

    if -5.3000000000000002e162 < x < 4.59999999999999971e158

    1. Initial program 99.9%

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

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

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

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

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

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

Alternative 4: 91.3% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;x \leq 4.6 \cdot 10^{+158}:\\
\;\;\;\;y \cdot i + \left(\left(a + \left(z + t\right)\right) + t\_2\right)\\

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


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

    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. Step-by-step derivation
      1. associate-+l+99.7%

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

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

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

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

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

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

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

    if -1.6000000000000001e93 < x < 4.59999999999999971e158

    1. Initial program 99.9%

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

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

    if 4.59999999999999971e158 < x

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 88.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := b \cdot \log c\\
\mathbf{if}\;z \leq -5 \cdot 10^{+146}:\\
\;\;\;\;y \cdot i + \left(t\_1 + \left(a + \left(z + t\right)\right)\right)\\

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


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

    1. Initial program 99.9%

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

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

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

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

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

    if -4.9999999999999999e146 < z

    1. Initial program 99.8%

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

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

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

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

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

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

Alternative 6: 98.1% 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.8%

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

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

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

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

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

Alternative 7: 42.6% accurate, 1.7× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot i + b \cdot \log c\\
t_2 := z + y \cdot i\\
\mathbf{if}\;a \leq -5.6 \cdot 10^{-263}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 4.45 \cdot 10^{-156}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.55 \cdot 10^{+143}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 8.5 \cdot 10^{+185}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.6000000000000001e-263 or 4.4500000000000001e-156 < a < 1.54999999999999995e143

    1. Initial program 99.8%

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

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

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

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

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

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

    if -5.6000000000000001e-263 < a < 4.4500000000000001e-156 or 1.54999999999999995e143 < a < 8.50000000000000013e185

    1. Initial program 99.8%

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

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

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

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

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

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

    if 8.50000000000000013e185 < a

    1. Initial program 99.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.6 \cdot 10^{-263}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{elif}\;a \leq 4.45 \cdot 10^{-156}:\\ \;\;\;\;y \cdot i + b \cdot \log c\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+143}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{+185}:\\ \;\;\;\;y \cdot i + b \cdot \log c\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 43.2% accurate, 1.7× speedup?

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

\\
\begin{array}{l}
t_1 := z + y \cdot i\\
\mathbf{if}\;a \leq -8 \cdot 10^{-262}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 2.1 \cdot 10^{-155}:\\
\;\;\;\;y \cdot i + \log c \cdot \left(b - 0.5\right)\\

\mathbf{elif}\;a \leq 3.3 \cdot 10^{+143}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 4.3 \cdot 10^{+186}:\\
\;\;\;\;y \cdot i + b \cdot \log c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -8.0000000000000001e-262 or 2.1000000000000002e-155 < a < 3.3e143

    1. Initial program 99.8%

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

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

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

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

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

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

    if -8.0000000000000001e-262 < a < 2.1000000000000002e-155

    1. Initial program 99.8%

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

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

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

    if 3.3e143 < a < 4.3e186

    1. Initial program 99.8%

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

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

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

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

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

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

    if 4.3e186 < a

    1. Initial program 99.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8 \cdot 10^{-262}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{-155}:\\ \;\;\;\;y \cdot i + \log c \cdot \left(b - 0.5\right)\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{+143}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{elif}\;a \leq 4.3 \cdot 10^{+186}:\\ \;\;\;\;y \cdot i + b \cdot \log c\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 83.6% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.25 \cdot 10^{+187} \lor \neg \left(x \leq 1.32 \cdot 10^{+246}\right):\\
\;\;\;\;z \cdot \left(1 + \frac{x \cdot \log y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.24999999999999984e187 or 1.32000000000000004e246 < x

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.24999999999999984e187 < x < 1.32000000000000004e246

    1. Initial program 99.9%

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

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

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

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

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

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

Alternative 10: 42.0% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 7.8 \cdot 10^{+149}:\\
\;\;\;\;z + y \cdot i\\

\mathbf{elif}\;a \leq 6.4 \cdot 10^{+184}:\\
\;\;\;\;t + \log c \cdot \left(b - 0.5\right)\\

\mathbf{elif}\;a \leq 3.4 \cdot 10^{+189} \lor \neg \left(a \leq 3.6 \cdot 10^{+252}\right):\\
\;\;\;\;a + y \cdot i\\

\mathbf{else}:\\
\;\;\;\;a \cdot \left(1 + \frac{z}{a}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < 7.7999999999999998e149

    1. Initial program 99.8%

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

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

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

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

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

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

    if 7.7999999999999998e149 < a < 6.39999999999999966e184

    1. Initial program 99.8%

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

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

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

    if 6.39999999999999966e184 < a < 3.39999999999999983e189 or 3.5999999999999999e252 < a

    1. Initial program 99.7%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in 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 \]
    4. 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 \]
    5. 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 \]
    6. Taylor expanded in x around 0 80.9%

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

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

    if 3.39999999999999983e189 < a < 3.5999999999999999e252

    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. Step-by-step derivation
      1. associate-+l+100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto z \cdot \left(1 + \color{blue}{\frac{a}{z}}\right) \]
    9. Taylor expanded in a around inf 50.3%

      \[\leadsto \color{blue}{a \cdot \left(1 + \frac{z}{a}\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification43.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 7.8 \cdot 10^{+149}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{elif}\;a \leq 6.4 \cdot 10^{+184}:\\ \;\;\;\;t + \log c \cdot \left(b - 0.5\right)\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{+189} \lor \neg \left(a \leq 3.6 \cdot 10^{+252}\right):\\ \;\;\;\;a + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 + \frac{z}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 58.3% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+156}:\\
\;\;\;\;z + y \cdot i\\

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

    if -3.2999999999999999e156 < z

    1. Initial program 99.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{+156}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(a + \log c \cdot \left(b - 0.5\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 71.8% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
t_1 := b \cdot \log c\\
\mathbf{if}\;a \leq 2.1 \cdot 10^{+175}:\\
\;\;\;\;y \cdot i + \left(t\_1 + \left(z + t\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 2.0999999999999999e175

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if 2.0999999999999999e175 < a

    1. Initial program 99.9%

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

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

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

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

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

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

Alternative 13: 41.5% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 7.8 \cdot 10^{+149}:\\
\;\;\;\;z + y \cdot i\\

\mathbf{elif}\;a \leq 2.3 \cdot 10^{+184}:\\
\;\;\;\;\log c \cdot \left(b - 0.5\right)\\

\mathbf{elif}\;a \leq 2.3 \cdot 10^{+189} \lor \neg \left(a \leq 3.45 \cdot 10^{+252}\right):\\
\;\;\;\;a + y \cdot i\\

\mathbf{else}:\\
\;\;\;\;a \cdot \left(1 + \frac{z}{a}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < 7.7999999999999998e149

    1. Initial program 99.8%

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

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

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

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

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

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

    if 7.7999999999999998e149 < a < 2.3e184

    1. Initial program 99.8%

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

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

      \[\leadsto \color{blue}{t + \log c \cdot \left(b - 0.5\right)} \]
    5. Taylor expanded in t around 0 11.9%

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

    if 2.3e184 < a < 2.3e189 or 3.45e252 < a

    1. Initial program 99.7%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in 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 \]
    4. 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 \]
    5. 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 \]
    6. Taylor expanded in x around 0 82.0%

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

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

    if 2.3e189 < a < 3.45e252

    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. Step-by-step derivation
      1. associate-+l+100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto z \cdot \left(1 + \color{blue}{\frac{a}{z}}\right) \]
    9. Taylor expanded in a around inf 50.3%

      \[\leadsto \color{blue}{a \cdot \left(1 + \frac{z}{a}\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification42.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 7.8 \cdot 10^{+149}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{+184}:\\ \;\;\;\;\log c \cdot \left(b - 0.5\right)\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{+189} \lor \neg \left(a \leq 3.45 \cdot 10^{+252}\right):\\ \;\;\;\;a + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 + \frac{z}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 56.8% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.05 \cdot 10^{+156}:\\
\;\;\;\;z + y \cdot i\\

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

    if -2.0500000000000001e156 < z

    1. Initial program 99.8%

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

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

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

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

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

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

Alternative 15: 41.5% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 7.8 \cdot 10^{+149}:\\
\;\;\;\;z + y \cdot i\\

\mathbf{elif}\;a \leq 2.3 \cdot 10^{+184}:\\
\;\;\;\;b \cdot \log c\\

\mathbf{elif}\;a \leq 2.8 \cdot 10^{+189} \lor \neg \left(a \leq 3.3 \cdot 10^{+252}\right):\\
\;\;\;\;a + y \cdot i\\

\mathbf{else}:\\
\;\;\;\;a \cdot \left(1 + \frac{z}{a}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < 7.7999999999999998e149

    1. Initial program 99.8%

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

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

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

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

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

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

    if 7.7999999999999998e149 < a < 2.3e184

    1. Initial program 99.8%

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

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

      \[\leadsto \color{blue}{b \cdot \log c} \]
    5. Step-by-step derivation
      1. *-commutative11.9%

        \[\leadsto \color{blue}{\log c \cdot b} \]
    6. Simplified11.9%

      \[\leadsto \color{blue}{\log c \cdot b} \]

    if 2.3e184 < a < 2.80000000000000006e189 or 3.3000000000000001e252 < a

    1. Initial program 99.7%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Taylor expanded in 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 \]
    4. 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 \]
    5. 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 \]
    6. Taylor expanded in x around 0 82.0%

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

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

    if 2.80000000000000006e189 < a < 3.3000000000000001e252

    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. Step-by-step derivation
      1. associate-+l+100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto z \cdot \left(1 + \color{blue}{\frac{a}{z}}\right) \]
    9. Taylor expanded in a around inf 50.3%

      \[\leadsto \color{blue}{a \cdot \left(1 + \frac{z}{a}\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification42.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 7.8 \cdot 10^{+149}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{+184}:\\ \;\;\;\;b \cdot \log c\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+189} \lor \neg \left(a \leq 3.3 \cdot 10^{+252}\right):\\ \;\;\;\;a + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 + \frac{z}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 44.0% accurate, 14.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;i \leq -2 \cdot 10^{+32} \lor \neg \left(i \leq 1.5 \cdot 10^{+98}\right):\\
\;\;\;\;a + y \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -2.00000000000000011e32 or 1.5000000000000001e98 < i

    1. Initial program 99.9%

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

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

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

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

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

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

    if -2.00000000000000011e32 < i < 1.5000000000000001e98

    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. Step-by-step derivation
      1. associate-+l+99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto z \cdot \left(1 + \color{blue}{\frac{a}{z}}\right) \]
    9. Taylor expanded in z around 0 29.9%

      \[\leadsto \color{blue}{a + z} \]
    10. Step-by-step derivation
      1. +-commutative29.9%

        \[\leadsto \color{blue}{z + a} \]
    11. Simplified29.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -2 \cdot 10^{+32} \lor \neg \left(i \leq 1.5 \cdot 10^{+98}\right):\\ \;\;\;\;a + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;z + a\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 39.8% accurate, 16.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -7.49999999999999959e32 or 9.9999999999999991e130 < 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. Step-by-step derivation
      1. associate-+l+99.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{i \cdot y} \]
    6. Step-by-step derivation
      1. *-commutative55.7%

        \[\leadsto \color{blue}{y \cdot i} \]
    7. Simplified55.7%

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

    if -7.49999999999999959e32 < i < 9.9999999999999991e130

    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. Step-by-step derivation
      1. associate-+l+99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto z \cdot \left(1 + \color{blue}{\frac{a}{z}}\right) \]
    9. Taylor expanded in z around 0 30.4%

      \[\leadsto \color{blue}{a + z} \]
    10. Step-by-step derivation
      1. +-commutative30.4%

        \[\leadsto \color{blue}{z + a} \]
    11. Simplified30.4%

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

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

Alternative 18: 43.3% accurate, 21.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 7.5 \cdot 10^{+113}:\\
\;\;\;\;z + y \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 7.5000000000000001e113

    1. Initial program 99.8%

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

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

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

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

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

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

    if 7.5000000000000001e113 < a

    1. Initial program 99.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 7.5 \cdot 10^{+113}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 27.2% accurate, 27.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.2 \cdot 10^{+188}:\\
\;\;\;\;y \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 1.2e188

    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. Step-by-step derivation
      1. associate-+l+99.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot i} \]
    7. Simplified26.4%

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

    if 1.2e188 < a

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto z \cdot \left(1 + \color{blue}{\frac{a}{z}}\right) \]
    9. Taylor expanded in z around 0 55.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 1.2 \cdot 10^{+188}:\\ \;\;\;\;y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 16.2% accurate, 219.0× speedup?

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

\\
a
\end{array}
Derivation
  1. Initial program 99.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. Step-by-step derivation
    1. associate-+l+99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto z \cdot \left(1 + \color{blue}{\frac{a}{z}}\right) \]
  9. Taylor expanded in z around 0 15.0%

    \[\leadsto \color{blue}{a} \]
  10. Final simplification15.0%

    \[\leadsto a \]
  11. Add Preprocessing

Reproduce

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