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

Percentage Accurate: 99.8% → 99.8%
Time: 15.5s
Alternatives: 17
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 17 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 := \log c \cdot \left(b - 0.5\right)\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+200}:\\ \;\;\;\;y \cdot i + \left(z + b \cdot \log c\right)\\ \mathbf{elif}\;t\_1 \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 (* (log c) (- b 0.5))))
   (if (<= t_1 -1e+200)
     (+ (* y i) (+ z (* b (log c))))
     (if (<= t_1 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 = log(c) * (b - 0.5);
	double tmp;
	if (t_1 <= -1e+200) {
		tmp = (y * i) + (z + (b * log(c)));
	} else if (t_1 <= 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) :: tmp
    t_1 = log(c) * (b - 0.5d0)
    if (t_1 <= (-1d+200)) then
        tmp = (y * i) + (z + (b * log(c)))
    else if (t_1 <= 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 = Math.log(c) * (b - 0.5);
	double tmp;
	if (t_1 <= -1e+200) {
		tmp = (y * i) + (z + (b * Math.log(c)));
	} else if (t_1 <= 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 = math.log(c) * (b - 0.5)
	tmp = 0
	if t_1 <= -1e+200:
		tmp = (y * i) + (z + (b * math.log(c)))
	elif t_1 <= 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(log(c) * Float64(b - 0.5))
	tmp = 0.0
	if (t_1 <= -1e+200)
		tmp = Float64(Float64(y * i) + Float64(z + Float64(b * log(c))));
	elseif (t_1 <= 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 = log(c) * (b - 0.5);
	tmp = 0.0;
	if (t_1 <= -1e+200)
		tmp = (y * i) + (z + (b * log(c)));
	elseif (t_1 <= 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[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+200], N[(N[(y * i), $MachinePrecision] + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 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 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+200}:\\
\;\;\;\;y \cdot i + \left(z + b \cdot \log c\right)\\

\mathbf{elif}\;t\_1 \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. Taylor expanded in x around 0 91.4%

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \left(1 + \color{blue}{b \cdot \frac{\log c}{z}}\right) + y \cdot i \]
    9. Simplified68.6%

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

      \[\leadsto \color{blue}{\left(z + b \cdot \log c\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. Taylor expanded in a around inf 77.7%

      \[\leadsto \left(\color{blue}{a} + \left(b - 0.5\right) \cdot \log c\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 + \log c \cdot \left(b - 0.5\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 92.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.15 \cdot 10^{+161} \lor \neg \left(x \leq 1.6 \cdot 10^{+158}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.15e161 or 1.59999999999999997e158 < 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 -1.15e161 < x < 1.59999999999999997e158

    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) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification94.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.15 \cdot 10^{+161} \lor \neg \left(x \leq 1.6 \cdot 10^{+158}\right):\\ \;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\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: 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 5: 83.4% accurate, 1.0× speedup?

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

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

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

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

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

Alternative 6: 92.8% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.3 \cdot 10^{+160} \lor \neg \left(x \leq 1.45 \cdot 10^{+155}\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 -2.3e+160) (not (<= x 1.45e+155)))
   (+ (* 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 <= -2.3e+160) || !(x <= 1.45e+155)) {
		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 <= (-2.3d+160)) .or. (.not. (x <= 1.45d+155))) 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 <= -2.3e+160) || !(x <= 1.45e+155)) {
		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 <= -2.3e+160) or not (x <= 1.45e+155):
		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 <= -2.3e+160) || !(x <= 1.45e+155))
		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 <= -2.3e+160) || ~((x <= 1.45e+155)))
		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, -2.3e+160], N[Not[LessEqual[x, 1.45e+155]], $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 -2.3 \cdot 10^{+160} \lor \neg \left(x \leq 1.45 \cdot 10^{+155}\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 < -2.29999999999999987e160 or 1.45e155 < 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 -2.29999999999999987e160 < x < 1.45e155

    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 -2.3 \cdot 10^{+160} \lor \neg \left(x \leq 1.45 \cdot 10^{+155}\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 7: 80.1% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{+160} \lor \neg \left(x \leq 10^{+157}\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(z + a\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.45e160 or 9.99999999999999983e156 < 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 -1.45e160 < x < 9.99999999999999983e156

    1. Initial program 99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.45 \cdot 10^{+160} \lor \neg \left(x \leq 10^{+157}\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(z + a\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 61.4% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.25 \cdot 10^{+179} \lor \neg \left(b \leq 1.4 \cdot 10^{+199}\right):\\
\;\;\;\;y \cdot i + b \cdot \log c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.2500000000000001e179 or 1.40000000000000005e199 < b

    1. Initial program 99.7%

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

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

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

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

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

    if -2.2500000000000001e179 < b < 1.40000000000000005e199

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a + \left(z + i \cdot y\right)} \]
    9. Step-by-step derivation
      1. *-commutative59.5%

        \[\leadsto a + \left(z + \color{blue}{y \cdot i}\right) \]
    10. Simplified59.5%

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

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

Alternative 9: 60.3% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.7 \cdot 10^{+162} \lor \neg \left(x \leq 9 \cdot 10^{+214}\right):\\
\;\;\;\;a + \left(t + x \cdot \log y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.69999999999999997e162 or 8.99999999999999935e214 < x

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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 a around inf 58.0%

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

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

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

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

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

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

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

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

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

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

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

    if -5.69999999999999997e162 < x < 8.99999999999999935e214

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a + \left(z + i \cdot y\right)} \]
    9. Step-by-step derivation
      1. *-commutative60.0%

        \[\leadsto a + \left(z + \color{blue}{y \cdot i}\right) \]
    10. Simplified60.0%

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

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

Alternative 10: 59.6% accurate, 1.9× speedup?

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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.79999999999999995e83 < z

    1. Initial program 99.8%

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

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

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

Alternative 11: 58.7% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.99999999999999947e155 < a

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a + \left(z + i \cdot y\right)} \]
    9. Step-by-step derivation
      1. *-commutative81.6%

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

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

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

Alternative 12: 58.1% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.25 \cdot 10^{+225} \lor \neg \left(x \leq 5.2 \cdot 10^{+221}\right):\\
\;\;\;\;x \cdot \log y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.24999999999999988e225 or 5.20000000000000008e221 < x

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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 a around inf 55.0%

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

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

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

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

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

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

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

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

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

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

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

    if -2.24999999999999988e225 < x < 5.20000000000000008e221

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.25 \cdot 10^{+225} \lor \neg \left(x \leq 5.2 \cdot 10^{+221}\right):\\ \;\;\;\;x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;a + \left(z + y \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 43.6% accurate, 21.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 8.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 8.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 <= 8.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 <= 8.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 <= 8.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 <= 8.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 <= 8.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 <= 8.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, 8.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 8.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 < 8.49999999999999977e145

    1. Initial program 99.9%

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

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

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

    if 8.49999999999999977e145 < a

    1. Initial program 99.9%

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

      \[\leadsto \left(\left(\color{blue}{\left(t + z\right)} + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    4. 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 14: 27.5% accurate, 27.3× speedup?

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

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

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


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

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

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

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

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

    if 6.20000000000000033e104 < a

    1. Initial program 99.8%

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

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

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

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

Alternative 15: 52.7% accurate, 31.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{a + \left(z + i \cdot y\right)} \]
  9. Step-by-step derivation
    1. *-commutative52.3%

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

    \[\leadsto \color{blue}{a + \left(z + y \cdot i\right)} \]
  11. Add Preprocessing

Alternative 16: 37.9% accurate, 43.8× speedup?

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

\\
a + y \cdot i
\end{array}
Derivation
  1. Initial program 99.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 85.5%

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

    \[\leadsto \color{blue}{a} + y \cdot i \]
  5. Add Preprocessing

Alternative 17: 16.2% accurate, 219.0× speedup?

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

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

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

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

    \[\leadsto \color{blue}{a} + y \cdot i \]
  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)))