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

Percentage Accurate: 99.8% → 99.8%
Time: 16.1s
Alternatives: 21
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 21 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 76.2% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+104}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\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 (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -9.9999999999999997e199

    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. Step-by-step derivation
      1. add-cbrt-cube99.7%

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

        \[\leadsto \left(\left(\left(\left(x \cdot \sqrt[3]{\color{blue}{{\log y}^{3}}} + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    4. Applied egg-rr99.7%

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

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

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

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

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

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

    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. Step-by-step derivation
      1. add-cbrt-cube99.8%

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

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

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

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

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

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

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

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

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

    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. Step-by-step derivation
      1. add-cbrt-cube99.7%

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

        \[\leadsto \left(\left(\left(\left(x \cdot \sqrt[3]{\color{blue}{{\log y}^{3}}} + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    4. Applied egg-rr99.7%

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

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

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

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

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

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

Alternative 3: 92.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;x \leq -2.5 \cdot 10^{+162} \lor \neg \left(x \leq 1.85 \cdot 10^{+125}\right):\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + t\_1\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.4999999999999998e162 or 1.8499999999999999e125 < 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. Step-by-step derivation
      1. associate-+l+99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.4999999999999998e162 < x < 1.8499999999999999e125

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 92.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.8 \cdot 10^{+160}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\right)\right)\\

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

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


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

    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. Step-by-step derivation
      1. add-cbrt-cube99.4%

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

        \[\leadsto \left(\left(\left(\left(x \cdot \sqrt[3]{\color{blue}{{\log y}^{3}}} + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    4. Applied egg-rr99.4%

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

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

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

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

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

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

    if -3.80000000000000012e160 < x < 2.99999999999999991e152

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.99999999999999991e152 < 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. Step-by-step derivation
      1. add-cbrt-cube99.6%

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

        \[\leadsto \left(\left(\left(\left(x \cdot \sqrt[3]{\color{blue}{{\log y}^{3}}} + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    4. Applied egg-rr99.6%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(a + \left(z + x \cdot \log y\right)\right)} + y \cdot i \]
    10. Step-by-step derivation
      1. +-commutative88.0%

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

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

        \[\leadsto \left(z + \color{blue}{\mathsf{fma}\left(x, \log y, a\right)}\right) + y \cdot i \]
    11. Simplified88.0%

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

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

Alternative 5: 77.0% accurate, 1.0× speedup?

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

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

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


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

    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. Step-by-step derivation
      1. add-cbrt-cube99.8%

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

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

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

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

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

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

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

    if -9.9999999999999993e44 < z

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 76.6% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.3999999999999999e93 < z

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 92.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.38 \cdot 10^{+160}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\right)\right)\\

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

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


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

    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. Step-by-step derivation
      1. add-cbrt-cube99.4%

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

        \[\leadsto \left(\left(\left(\left(x \cdot \sqrt[3]{\color{blue}{{\log y}^{3}}} + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    4. Applied egg-rr99.4%

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

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

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

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

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

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

    if -1.38e160 < x < 7.50000000000000065e153

    1. Initial program 99.9%

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

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

    if 7.50000000000000065e153 < 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. Step-by-step derivation
      1. add-cbrt-cube99.6%

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

        \[\leadsto \left(\left(\left(\left(x \cdot \sqrt[3]{\color{blue}{{\log y}^{3}}} + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    4. Applied egg-rr99.6%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(a + \left(z + x \cdot \log y\right)\right)} + y \cdot i \]
    10. Step-by-step derivation
      1. +-commutative88.0%

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

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

        \[\leadsto \left(z + \color{blue}{\mathsf{fma}\left(x, \log y, a\right)}\right) + y \cdot i \]
    11. Simplified88.0%

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

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

Alternative 8: 99.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 9: 43.3% accurate, 1.7× speedup?

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

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

\mathbf{elif}\;a \leq 2.3 \cdot 10^{-52}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 1.6 \cdot 10^{+156}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < 6.49999999999999962e-186

    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. Step-by-step derivation
      1. add-cbrt-cube99.8%

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

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

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

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

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

        \[\leadsto \left(z + \color{blue}{\log c \cdot -0.5}\right) + y \cdot i \]
    8. Simplified41.1%

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

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

    if 6.49999999999999962e-186 < a < 2.29999999999999994e-52 or 5.39999999999999969e104 < a < 1.60000000000000001e156

    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. Step-by-step derivation
      1. add-cbrt-cube99.8%

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

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

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

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

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

    if 2.29999999999999994e-52 < a < 5.39999999999999969e104

    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. Step-by-step derivation
      1. add-cbrt-cube99.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\log c \cdot b} + y \cdot i \]
    11. Simplified43.9%

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

    if 1.60000000000000001e156 < 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. Step-by-step derivation
      1. add-cbrt-cube99.9%

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

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

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

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

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

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

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

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

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

Alternative 10: 42.6% accurate, 1.7× speedup?

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

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

\mathbf{elif}\;a \leq 1.95 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 1.52 \cdot 10^{+156}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < 3.7500000000000002e-187

    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. Step-by-step derivation
      1. add-cbrt-cube99.8%

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

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

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

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

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

        \[\leadsto \left(z + \color{blue}{\log c \cdot -0.5}\right) + y \cdot i \]
    8. Simplified41.1%

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

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

    if 3.7500000000000002e-187 < a < 1.95000000000000016e-61 or 2.04999999999999984e54 < a < 1.52e156

    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. Step-by-step derivation
      1. add-cbrt-cube99.8%

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

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

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

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

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

    if 1.95000000000000016e-61 < a < 2.04999999999999984e54

    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. Step-by-step derivation
      1. add-cbrt-cube99.7%

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

        \[\leadsto \left(\left(\left(\left(x \cdot \sqrt[3]{\color{blue}{{\log y}^{3}}} + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    4. Applied egg-rr99.7%

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

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

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

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

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

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

    if 1.52e156 < 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. Step-by-step derivation
      1. add-cbrt-cube99.9%

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

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

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

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

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

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

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

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

Alternative 11: 92.8% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.4 \cdot 10^{+160} \lor \neg \left(x \leq 2.6 \cdot 10^{+153}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.40000000000000033e160 or 2.5999999999999999e153 < 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. Step-by-step derivation
      1. add-cbrt-cube99.5%

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

        \[\leadsto \left(\left(\left(\left(x \cdot \sqrt[3]{\color{blue}{{\log y}^{3}}} + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    4. Applied egg-rr99.5%

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

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

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

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

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

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

    if -7.40000000000000033e160 < x < 2.5999999999999999e153

    1. Initial program 99.9%

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

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

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

Alternative 12: 43.9% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;a \leq 6.8 \cdot 10^{+104}:\\
\;\;\;\;t\_1 + y \cdot i\\

\mathbf{elif}\;a \leq 1.52 \cdot 10^{+156}:\\
\;\;\;\;z + t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < 4.6e-175

    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. Step-by-step derivation
      1. add-cbrt-cube99.8%

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

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

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

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

      \[\leadsto \color{blue}{\left(z + -0.5 \cdot \log c\right)} + y \cdot i \]
    7. Step-by-step derivation
      1. *-commutative40.9%

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

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

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

    if 4.6e-175 < a < 6.7999999999999994e104

    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. Step-by-step derivation
      1. add-cbrt-cube99.8%

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

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

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

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

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

    if 6.7999999999999994e104 < a < 1.52e156

    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. Step-by-step derivation
      1. add-cbrt-cube99.7%

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

        \[\leadsto \left(\left(\left(\left(x \cdot \sqrt[3]{\color{blue}{{\log y}^{3}}} + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    4. Applied egg-rr99.7%

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

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

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

    if 1.52e156 < 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. Step-by-step derivation
      1. add-cbrt-cube99.9%

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

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

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

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

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

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

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

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

Alternative 13: 42.5% accurate, 1.9× speedup?

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

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

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

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


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

    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. Step-by-step derivation
      1. add-cbrt-cube99.8%

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

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

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

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

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

        \[\leadsto \left(z + \color{blue}{\log c \cdot -0.5}\right) + y \cdot i \]
    8. Simplified41.1%

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

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

    if 1.90000000000000013e-187 < a < 3.8999999999999998e155

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube99.8%

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

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

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

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

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

    if 3.8999999999999998e155 < 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. Step-by-step derivation
      1. add-cbrt-cube99.9%

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

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

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

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

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

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

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

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

Alternative 14: 59.8% accurate, 1.9× speedup?

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

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

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


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

    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. Step-by-step derivation
      1. add-cbrt-cube99.8%

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

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

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

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

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

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

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

    if -7.6000000000000001e151 < z

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube99.8%

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

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

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

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

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

Alternative 15: 59.0% accurate, 1.9× speedup?

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

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

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


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

    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. Step-by-step derivation
      1. add-cbrt-cube99.8%

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

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

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

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

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

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

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

    if 1.30000000000000001e145 < 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. Step-by-step derivation
      1. add-cbrt-cube99.8%

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

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

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

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

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

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

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

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

Alternative 16: 57.2% accurate, 1.9× speedup?

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

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

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


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

    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. Step-by-step derivation
      1. add-cbrt-cube99.7%

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

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

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

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

      \[\leadsto \color{blue}{\left(z + -0.5 \cdot \log c\right)} + y \cdot i \]
    7. Step-by-step derivation
      1. *-commutative60.3%

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

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

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

    if -3.59999999999999985e181 < z

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube99.8%

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

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

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

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

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

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

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

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

Alternative 17: 23.5% accurate, 16.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.25 \cdot 10^{-254}:\\
\;\;\;\;z\\

\mathbf{elif}\;a \leq 9.8 \cdot 10^{+104}:\\
\;\;\;\;y \cdot i\\

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


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

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

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

    if 3.25e-254 < a < 9.7999999999999997e104

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.7999999999999997e104 < a

    1. Initial program 99.8%

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

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

      \[\leadsto \color{blue}{a} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 18: 43.6% accurate, 21.9× speedup?

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

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

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


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

    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. Step-by-step derivation
      1. add-cbrt-cube99.8%

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

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

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

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

      \[\leadsto \color{blue}{\left(z + -0.5 \cdot \log c\right)} + y \cdot i \]
    7. Step-by-step derivation
      1. *-commutative41.8%

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

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

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

    if 4.99999999999999967e145 < 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. Step-by-step derivation
      1. add-cbrt-cube99.8%

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

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

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

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

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

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

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

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

Alternative 19: 40.3% accurate, 21.9× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

        \[\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+100.0%

        \[\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+100.0%

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

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

        \[\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+100.0%

        \[\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+100.0%

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

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

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

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

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

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

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

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

      \[\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 z around inf 70.3%

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

    if -5.4999999999999997e245 < z

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube99.8%

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

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

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

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

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

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

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

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

Alternative 20: 21.9% accurate, 36.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.2 \cdot 10^{+145}:\\
\;\;\;\;z\\

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.19999999999999996e145 < a

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 21: 16.2% accurate, 219.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{a} \]
  6. Add Preprocessing

Reproduce

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