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

Percentage Accurate: 99.8% → 99.8%
Time: 22.0s
Alternatives: 18
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 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, 1.0× speedup?

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

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

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

Alternative 2: 89.8% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -5.0000000000000003e177

    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 x around 0 89.9%

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

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000003e177 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 2e153

    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 96.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. *-commutative96.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. Simplified96.8%

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

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

    if 2e153 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))

    1. Initial program 99.8%

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

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

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

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

Alternative 3: 92.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y + z\\ \mathbf{if}\;x \leq -1.7 \cdot 10^{+63}:\\ \;\;\;\;\left(a + \left(t + t\_1\right)\right) + y \cdot i\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{+54}:\\ \;\;\;\;y \cdot i + \left(t + \left(z + \mathsf{fma}\left(\log c, b + -0.5, a\right)\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 (+ (* x (log y)) z)))
   (if (<= x -1.7e+63)
     (+ (+ a (+ t t_1)) (* y i))
     (if (<= x 1.05e+54)
       (+ (* y i) (+ t (+ z (fma (log c) (+ b -0.5) a))))
       (+ (* 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 = (x * log(y)) + z;
	double tmp;
	if (x <= -1.7e+63) {
		tmp = (a + (t + t_1)) + (y * i);
	} else if (x <= 1.05e+54) {
		tmp = (y * i) + (t + (z + fma(log(c), (b + -0.5), a)));
	} else {
		tmp = (y * i) + (a + t_1);
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(x * log(y)) + z)
	tmp = 0.0
	if (x <= -1.7e+63)
		tmp = Float64(Float64(a + Float64(t + t_1)) + Float64(y * i));
	elseif (x <= 1.05e+54)
		tmp = Float64(Float64(y * i) + Float64(t + Float64(z + fma(log(c), Float64(b + -0.5), a))));
	else
		tmp = Float64(Float64(y * i) + Float64(a + t_1));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]}, If[LessEqual[x, -1.7e+63], N[(N[(a + N[(t + t$95$1), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e+54], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq 1.05 \cdot 10^{+54}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + \mathsf{fma}\left(\log c, b + -0.5, a\right)\right)\right)\\

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


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

    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 b around 0 90.3%

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

    if -1.6999999999999999e63 < x < 1.04999999999999993e54

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

    if 1.04999999999999993e54 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

Alternative 4: 97.9% accurate, 1.0× speedup?

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

\\
y \cdot i + \left(\left(a + \left(t + \left(x \cdot \log y + z\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 97.5%

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

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

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

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

Alternative 5: 47.4% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot i + b \cdot \log c\\ \mathbf{if}\;a \leq 2.4 \cdot 10^{-196}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{elif}\;a \leq 6.7 \cdot 10^{-115}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-104}:\\ \;\;\;\;z \cdot \left(1 + i \cdot \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{+30}:\\ \;\;\;\;x \cdot \log y + y \cdot i\\ \mathbf{elif}\;a \leq 9.8 \cdot 10^{+67}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + a \cdot \left(1 + \left(\frac{t}{a} + \frac{z}{a}\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ (* y i) (* b (log c)))))
   (if (<= a 2.4e-196)
     (+ z (* y i))
     (if (<= a 6.7e-115)
       t_1
       (if (<= a 1.55e-104)
         (* z (+ 1.0 (* i (/ y z))))
         (if (<= a 2.2e+30)
           (+ (* x (log y)) (* y i))
           (if (<= a 9.8e+67)
             t_1
             (+ (* y i) (* a (+ 1.0 (+ (/ t a) (/ z a))))))))))))
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 tmp;
	if (a <= 2.4e-196) {
		tmp = z + (y * i);
	} else if (a <= 6.7e-115) {
		tmp = t_1;
	} else if (a <= 1.55e-104) {
		tmp = z * (1.0 + (i * (y / z)));
	} else if (a <= 2.2e+30) {
		tmp = (x * log(y)) + (y * i);
	} else if (a <= 9.8e+67) {
		tmp = t_1;
	} else {
		tmp = (y * i) + (a * (1.0 + ((t / a) + (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) :: t_1
    real(8) :: tmp
    t_1 = (y * i) + (b * log(c))
    if (a <= 2.4d-196) then
        tmp = z + (y * i)
    else if (a <= 6.7d-115) then
        tmp = t_1
    else if (a <= 1.55d-104) then
        tmp = z * (1.0d0 + (i * (y / z)))
    else if (a <= 2.2d+30) then
        tmp = (x * log(y)) + (y * i)
    else if (a <= 9.8d+67) then
        tmp = t_1
    else
        tmp = (y * i) + (a * (1.0d0 + ((t / a) + (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 t_1 = (y * i) + (b * Math.log(c));
	double tmp;
	if (a <= 2.4e-196) {
		tmp = z + (y * i);
	} else if (a <= 6.7e-115) {
		tmp = t_1;
	} else if (a <= 1.55e-104) {
		tmp = z * (1.0 + (i * (y / z)));
	} else if (a <= 2.2e+30) {
		tmp = (x * Math.log(y)) + (y * i);
	} else if (a <= 9.8e+67) {
		tmp = t_1;
	} else {
		tmp = (y * i) + (a * (1.0 + ((t / a) + (z / a))));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (y * i) + (b * math.log(c))
	tmp = 0
	if a <= 2.4e-196:
		tmp = z + (y * i)
	elif a <= 6.7e-115:
		tmp = t_1
	elif a <= 1.55e-104:
		tmp = z * (1.0 + (i * (y / z)))
	elif a <= 2.2e+30:
		tmp = (x * math.log(y)) + (y * i)
	elif a <= 9.8e+67:
		tmp = t_1
	else:
		tmp = (y * i) + (a * (1.0 + ((t / a) + (z / a))))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(y * i) + Float64(b * log(c)))
	tmp = 0.0
	if (a <= 2.4e-196)
		tmp = Float64(z + Float64(y * i));
	elseif (a <= 6.7e-115)
		tmp = t_1;
	elseif (a <= 1.55e-104)
		tmp = Float64(z * Float64(1.0 + Float64(i * Float64(y / z))));
	elseif (a <= 2.2e+30)
		tmp = Float64(Float64(x * log(y)) + Float64(y * i));
	elseif (a <= 9.8e+67)
		tmp = t_1;
	else
		tmp = Float64(Float64(y * i) + Float64(a * Float64(1.0 + Float64(Float64(t / a) + Float64(z / a)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = (y * i) + (b * log(c));
	tmp = 0.0;
	if (a <= 2.4e-196)
		tmp = z + (y * i);
	elseif (a <= 6.7e-115)
		tmp = t_1;
	elseif (a <= 1.55e-104)
		tmp = z * (1.0 + (i * (y / z)));
	elseif (a <= 2.2e+30)
		tmp = (x * log(y)) + (y * i);
	elseif (a <= 9.8e+67)
		tmp = t_1;
	else
		tmp = (y * i) + (a * (1.0 + ((t / a) + (z / a))));
	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]}, If[LessEqual[a, 2.4e-196], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.7e-115], t$95$1, If[LessEqual[a, 1.55e-104], N[(z * N[(1.0 + N[(i * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.2e+30], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.8e+67], t$95$1, N[(N[(y * i), $MachinePrecision] + N[(a * N[(1.0 + N[(N[(t / a), $MachinePrecision] + N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot i + b \cdot \log c\\
\mathbf{if}\;a \leq 2.4 \cdot 10^{-196}:\\
\;\;\;\;z + y \cdot i\\

\mathbf{elif}\;a \leq 6.7 \cdot 10^{-115}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.55 \cdot 10^{-104}:\\
\;\;\;\;z \cdot \left(1 + i \cdot \frac{y}{z}\right)\\

\mathbf{elif}\;a \leq 2.2 \cdot 10^{+30}:\\
\;\;\;\;x \cdot \log y + y \cdot i\\

\mathbf{elif}\;a \leq 9.8 \cdot 10^{+67}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < 2.40000000000000021e-196

    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 z around inf 38.0%

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

    if 2.40000000000000021e-196 < a < 6.7000000000000002e-115 or 2.2e30 < a < 9.7999999999999998e67

    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 x around 0 85.1%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(b + -0.5, \log c, a + \color{blue}{\left(z + t\right)}\right) + y \cdot i \]
    5. Applied egg-rr85.1%

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

      \[\leadsto \color{blue}{b \cdot \log c} + y \cdot i \]
    7. Step-by-step derivation
      1. *-commutative54.6%

        \[\leadsto \color{blue}{\log c \cdot b} + y \cdot i \]
    8. Simplified54.6%

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

    if 6.7000000000000002e-115 < a < 1.54999999999999988e-104

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{z} + y \cdot i \]
    4. Taylor expanded in z around inf 1.7%

      \[\leadsto \color{blue}{z \cdot \left(1 + \frac{i \cdot y}{z}\right)} \]
    5. Step-by-step derivation
      1. associate-/l*1.7%

        \[\leadsto z \cdot \left(1 + \color{blue}{i \cdot \frac{y}{z}}\right) \]
    6. Simplified1.7%

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

    if 1.54999999999999988e-104 < a < 2.2e30

    1. Initial program 100.0%

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

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

    if 9.7999999999999998e67 < 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 a around inf 99.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 2.4 \cdot 10^{-196}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{elif}\;a \leq 6.7 \cdot 10^{-115}:\\ \;\;\;\;y \cdot i + b \cdot \log c\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-104}:\\ \;\;\;\;z \cdot \left(1 + i \cdot \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{+30}:\\ \;\;\;\;x \cdot \log y + y \cdot i\\ \mathbf{elif}\;a \leq 9.8 \cdot 10^{+67}:\\ \;\;\;\;y \cdot i + b \cdot \log c\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + a \cdot \left(1 + \left(\frac{t}{a} + \frac{z}{a}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 62.6% accurate, 1.7× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot i + \left(a + \left(b - 0.5\right) \cdot \log c\right)\\
\mathbf{if}\;x \leq -1.7 \cdot 10^{+63}:\\
\;\;\;\;y \cdot i + x \cdot \left(\log y + \frac{a}{x}\right)\\

\mathbf{elif}\;x \leq -7.1 \cdot 10^{-156}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -6 \cdot 10^{-261}:\\
\;\;\;\;z \cdot \left(1 + i \cdot \frac{y}{z}\right)\\

\mathbf{elif}\;x \leq 2.7 \cdot 10^{+159}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.6999999999999999e63

    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 x around inf 99.6%

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

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

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

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

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

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

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

    if -1.6999999999999999e63 < x < -7.1000000000000005e-156 or -6.0000000000000001e-261 < x < 2.70000000000000008e159

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.1000000000000005e-156 < x < -6.0000000000000001e-261

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{z} + y \cdot i \]
    4. Taylor expanded in z around inf 57.3%

      \[\leadsto \color{blue}{z \cdot \left(1 + \frac{i \cdot y}{z}\right)} \]
    5. Step-by-step derivation
      1. associate-/l*57.4%

        \[\leadsto z \cdot \left(1 + \color{blue}{i \cdot \frac{y}{z}}\right) \]
    6. Simplified57.4%

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

    if 2.70000000000000008e159 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{+63}:\\ \;\;\;\;y \cdot i + x \cdot \left(\log y + \frac{a}{x}\right)\\ \mathbf{elif}\;x \leq -7.1 \cdot 10^{-156}:\\ \;\;\;\;y \cdot i + \left(a + \left(b - 0.5\right) \cdot \log c\right)\\ \mathbf{elif}\;x \leq -6 \cdot 10^{-261}:\\ \;\;\;\;z \cdot \left(1 + i \cdot \frac{y}{z}\right)\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{+159}:\\ \;\;\;\;y \cdot i + \left(a + \left(b - 0.5\right) \cdot \log c\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + x \cdot \left(\log y + \frac{z}{x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 88.4% accurate, 1.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -1 \cdot 10^{+154} \lor \neg \left(b - 0.5 \leq 10^{+148}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(b - 0.5\right) \cdot \log c\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 b #s(literal 1/2 binary64)) < -1.00000000000000004e154 or 1e148 < (-.f64 b #s(literal 1/2 binary64))

    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 x around 0 92.7%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(b + -0.5, \log c, a + \color{blue}{\left(z + t\right)}\right) + y \cdot i \]
    5. Applied egg-rr92.7%

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

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

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

    if -1.00000000000000004e154 < (-.f64 b #s(literal 1/2 binary64)) < 1e148

    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 96.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. *-commutative96.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. Simplified96.8%

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

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

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

Alternative 8: 60.0% accurate, 1.7× speedup?

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

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

\mathbf{elif}\;x \leq 2.55 \cdot 10^{-182}:\\
\;\;\;\;y \cdot i + a \cdot \left(1 + \left(\frac{t}{a} + \frac{z}{a}\right)\right)\\

\mathbf{elif}\;x \leq 0.78:\\
\;\;\;\;y \cdot i + b \cdot \log c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.99999999999999992e88 or 0.78000000000000003 < x

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

    if -1.99999999999999992e88 < x < 2.55000000000000009e-182

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

    if 2.55000000000000009e-182 < x < 0.78000000000000003

    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 99.9%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{b \cdot \log c} + y \cdot i \]
    7. Step-by-step derivation
      1. *-commutative61.0%

        \[\leadsto \color{blue}{\log c \cdot b} + y \cdot i \]
    8. Simplified61.0%

      \[\leadsto \color{blue}{\log c \cdot b} + y \cdot i \]
  3. Recombined 3 regimes into one program.
  4. Final simplification64.2%

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

Alternative 9: 75.9% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -1 \cdot 10^{+154} \lor \neg \left(b - 0.5 \leq 10^{+148}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(b - 0.5\right) \cdot \log c\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 b #s(literal 1/2 binary64)) < -1.00000000000000004e154 or 1e148 < (-.f64 b #s(literal 1/2 binary64))

    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 x around 0 92.7%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(b + -0.5, \log c, a + \color{blue}{\left(z + t\right)}\right) + y \cdot i \]
    5. Applied egg-rr92.7%

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

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

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

    if -1.00000000000000004e154 < (-.f64 b #s(literal 1/2 binary64)) < 1e148

    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 96.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. *-commutative96.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. Simplified96.8%

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

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

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

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

Alternative 10: 92.1% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y + z\\ \mathbf{if}\;x \leq -1.12 \cdot 10^{+63}:\\ \;\;\;\;\left(a + \left(t + t\_1\right)\right) + y \cdot i\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{+53}:\\ \;\;\;\;y \cdot i + \left(\left(b - 0.5\right) \cdot \log c + \left(a + \left(z + t\right)\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 (+ (* x (log y)) z)))
   (if (<= x -1.12e+63)
     (+ (+ a (+ t t_1)) (* y i))
     (if (<= x 2.7e+53)
       (+ (* y i) (+ (* (- b 0.5) (log c)) (+ a (+ 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 = (x * log(y)) + z;
	double tmp;
	if (x <= -1.12e+63) {
		tmp = (a + (t + t_1)) + (y * i);
	} else if (x <= 2.7e+53) {
		tmp = (y * i) + (((b - 0.5) * log(c)) + (a + (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 = (x * log(y)) + z
    if (x <= (-1.12d+63)) then
        tmp = (a + (t + t_1)) + (y * i)
    else if (x <= 2.7d+53) then
        tmp = (y * i) + (((b - 0.5d0) * log(c)) + (a + (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 = (x * Math.log(y)) + z;
	double tmp;
	if (x <= -1.12e+63) {
		tmp = (a + (t + t_1)) + (y * i);
	} else if (x <= 2.7e+53) {
		tmp = (y * i) + (((b - 0.5) * Math.log(c)) + (a + (z + t)));
	} else {
		tmp = (y * i) + (a + t_1);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (x * math.log(y)) + z
	tmp = 0
	if x <= -1.12e+63:
		tmp = (a + (t + t_1)) + (y * i)
	elif x <= 2.7e+53:
		tmp = (y * i) + (((b - 0.5) * math.log(c)) + (a + (z + t)))
	else:
		tmp = (y * i) + (a + t_1)
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(x * log(y)) + z)
	tmp = 0.0
	if (x <= -1.12e+63)
		tmp = Float64(Float64(a + Float64(t + t_1)) + Float64(y * i));
	elseif (x <= 2.7e+53)
		tmp = Float64(Float64(y * i) + Float64(Float64(Float64(b - 0.5) * log(c)) + Float64(a + 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 = (x * log(y)) + z;
	tmp = 0.0;
	if (x <= -1.12e+63)
		tmp = (a + (t + t_1)) + (y * i);
	elseif (x <= 2.7e+53)
		tmp = (y * i) + (((b - 0.5) * log(c)) + (a + (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[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]}, If[LessEqual[x, -1.12e+63], N[(N[(a + N[(t + t$95$1), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.7e+53], N[(N[(y * i), $MachinePrecision] + N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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

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


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

    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 b around 0 90.3%

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

    if -1.12000000000000006e63 < x < 2.70000000000000019e53

    1. Initial program 99.8%

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

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

    if 2.70000000000000019e53 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

Alternative 11: 81.5% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y + z\\ \mathbf{if}\;x \leq -1.65 \cdot 10^{+63}:\\ \;\;\;\;\left(a + \left(t + t\_1\right)\right) + y \cdot i\\ \mathbf{elif}\;x \leq 1.15 \cdot 10^{+54}:\\ \;\;\;\;y \cdot i + \left(\left(b - 0.5\right) \cdot \log c + \left(z + a\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 (+ (* x (log y)) z)))
   (if (<= x -1.65e+63)
     (+ (+ a (+ t t_1)) (* y i))
     (if (<= x 1.15e+54)
       (+ (* y i) (+ (* (- b 0.5) (log c)) (+ z a)))
       (+ (* 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 = (x * log(y)) + z;
	double tmp;
	if (x <= -1.65e+63) {
		tmp = (a + (t + t_1)) + (y * i);
	} else if (x <= 1.15e+54) {
		tmp = (y * i) + (((b - 0.5) * log(c)) + (z + a));
	} 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 = (x * log(y)) + z
    if (x <= (-1.65d+63)) then
        tmp = (a + (t + t_1)) + (y * i)
    else if (x <= 1.15d+54) then
        tmp = (y * i) + (((b - 0.5d0) * log(c)) + (z + a))
    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 = (x * Math.log(y)) + z;
	double tmp;
	if (x <= -1.65e+63) {
		tmp = (a + (t + t_1)) + (y * i);
	} else if (x <= 1.15e+54) {
		tmp = (y * i) + (((b - 0.5) * Math.log(c)) + (z + a));
	} else {
		tmp = (y * i) + (a + t_1);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (x * math.log(y)) + z
	tmp = 0
	if x <= -1.65e+63:
		tmp = (a + (t + t_1)) + (y * i)
	elif x <= 1.15e+54:
		tmp = (y * i) + (((b - 0.5) * math.log(c)) + (z + a))
	else:
		tmp = (y * i) + (a + t_1)
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(x * log(y)) + z)
	tmp = 0.0
	if (x <= -1.65e+63)
		tmp = Float64(Float64(a + Float64(t + t_1)) + Float64(y * i));
	elseif (x <= 1.15e+54)
		tmp = Float64(Float64(y * i) + Float64(Float64(Float64(b - 0.5) * log(c)) + Float64(z + a)));
	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 = (x * log(y)) + z;
	tmp = 0.0;
	if (x <= -1.65e+63)
		tmp = (a + (t + t_1)) + (y * i);
	elseif (x <= 1.15e+54)
		tmp = (y * i) + (((b - 0.5) * log(c)) + (z + a));
	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[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]}, If[LessEqual[x, -1.65e+63], N[(N[(a + N[(t + t$95$1), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.15e+54], N[(N[(y * i), $MachinePrecision] + N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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

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


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

    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 b around 0 90.3%

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

    if -1.6500000000000001e63 < x < 1.14999999999999997e54

    1. Initial program 99.8%

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

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

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

    if 1.14999999999999997e54 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

Alternative 12: 48.8% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.82 \cdot 10^{-152}:\\
\;\;\;\;z + y \cdot i\\

\mathbf{elif}\;a \leq 1.08 \cdot 10^{-26}:\\
\;\;\;\;x \cdot \log y + y \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < 1.82000000000000009e-152

    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 z around inf 38.9%

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

    if 1.82000000000000009e-152 < a < 1.07999999999999996e-26

    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 inf 49.7%

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

    if 1.07999999999999996e-26 < 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 a around inf 99.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 1.82 \cdot 10^{-152}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{elif}\;a \leq 1.08 \cdot 10^{-26}:\\ \;\;\;\;x \cdot \log y + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + a \cdot \left(1 + \left(\frac{t}{a} + \frac{z}{a}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 48.8% accurate, 10.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.4 \cdot 10^{-9}:\\
\;\;\;\;z + y \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 3.3999999999999998e-9

    1. Initial program 99.8%

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

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

    if 3.3999999999999998e-9 < 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 a around inf 99.8%

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

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

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

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

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

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

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

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

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

Alternative 14: 43.0% accurate, 21.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 1.25 \cdot 10^{+96}:\\ \;\;\;\;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 1.25e+96) (+ 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 <= 1.25e+96) {
		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 <= 1.25d+96) 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 <= 1.25e+96) {
		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 <= 1.25e+96:
		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 <= 1.25e+96)
		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 <= 1.25e+96)
		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, 1.25e+96], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


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

    1. Initial program 99.8%

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

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

    if 1.2500000000000001e96 < 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 a around inf 52.5%

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

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

Alternative 15: 27.8% accurate, 27.3× speedup?

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

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

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


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

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

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(x \cdot \log y + a\right)} + \left(t + z\right)\right) + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right) \]
      7. associate-+l+99.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) \]
      13. sub-neg99.8%

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

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

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

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

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

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

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

    if 6.2e125 < 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 a around inf 55.0%

      \[\leadsto \color{blue}{a} + y \cdot i \]
    4. Taylor expanded in a around inf 55.0%

      \[\leadsto \color{blue}{a \cdot \left(1 + \frac{i \cdot y}{a}\right)} \]
    5. Step-by-step derivation
      1. +-commutative55.0%

        \[\leadsto a \cdot \color{blue}{\left(\frac{i \cdot y}{a} + 1\right)} \]
      2. associate-/l*55.0%

        \[\leadsto a \cdot \left(\color{blue}{i \cdot \frac{y}{a}} + 1\right) \]
      3. fma-define55.0%

        \[\leadsto a \cdot \color{blue}{\mathsf{fma}\left(i, \frac{y}{a}, 1\right)} \]
    6. Simplified55.0%

      \[\leadsto \color{blue}{a \cdot \mathsf{fma}\left(i, \frac{y}{a}, 1\right)} \]
    7. Taylor expanded in i around 0 48.2%

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

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

Alternative 16: 37.9% accurate, 43.8× speedup?

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

\\
a + y \cdot i
\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 a around inf 37.0%

    \[\leadsto \color{blue}{a} + y \cdot i \]
  4. Final simplification37.0%

    \[\leadsto a + y \cdot i \]
  5. Add Preprocessing

Alternative 17: 16.1% accurate, 219.0× speedup?

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

\\
t
\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 x around 0 82.5%

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

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

    \[\leadsto \color{blue}{t} \]
  6. Final simplification15.1%

    \[\leadsto t \]
  7. Add Preprocessing

Alternative 18: 16.3% 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. Add Preprocessing
  3. Taylor expanded in a around inf 37.0%

    \[\leadsto \color{blue}{a} + y \cdot i \]
  4. Taylor expanded in a around inf 33.6%

    \[\leadsto \color{blue}{a \cdot \left(1 + \frac{i \cdot y}{a}\right)} \]
  5. Step-by-step derivation
    1. +-commutative33.6%

      \[\leadsto a \cdot \color{blue}{\left(\frac{i \cdot y}{a} + 1\right)} \]
    2. associate-/l*32.8%

      \[\leadsto a \cdot \left(\color{blue}{i \cdot \frac{y}{a}} + 1\right) \]
    3. fma-define32.8%

      \[\leadsto a \cdot \color{blue}{\mathsf{fma}\left(i, \frac{y}{a}, 1\right)} \]
  6. Simplified32.8%

    \[\leadsto \color{blue}{a \cdot \mathsf{fma}\left(i, \frac{y}{a}, 1\right)} \]
  7. Taylor expanded in i around 0 16.8%

    \[\leadsto a \cdot \color{blue}{1} \]
  8. Final simplification16.8%

    \[\leadsto a \]
  9. Add Preprocessing

Reproduce

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