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

Percentage Accurate: 99.8% → 99.8%
Time: 14.9s
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: 91.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \log c \cdot \left(b - 0.5\right)\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+79} \lor \neg \left(t\_1 \leq 10^{+177}\right):\\ \;\;\;\;y \cdot i + \left(a + \left(z + t\_1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + -0.5 \cdot \log c\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* (log c) (- b 0.5))))
   (if (or (<= t_1 -4e+79) (not (<= t_1 1e+177)))
     (+ (* y i) (+ a (+ z t_1)))
     (+ (* y i) (+ (+ a (+ t (+ z (* x (log y))))) (* -0.5 (log c)))))))
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 <= -4e+79) || !(t_1 <= 1e+177)) {
		tmp = (y * i) + (a + (z + t_1));
	} else {
		tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (-0.5 * log(c)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: tmp
    t_1 = log(c) * (b - 0.5d0)
    if ((t_1 <= (-4d+79)) .or. (.not. (t_1 <= 1d+177))) then
        tmp = (y * i) + (a + (z + t_1))
    else
        tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + ((-0.5d0) * log(c)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = Math.log(c) * (b - 0.5);
	double tmp;
	if ((t_1 <= -4e+79) || !(t_1 <= 1e+177)) {
		tmp = (y * i) + (a + (z + t_1));
	} else {
		tmp = (y * i) + ((a + (t + (z + (x * Math.log(y))))) + (-0.5 * Math.log(c)));
	}
	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 <= -4e+79) or not (t_1 <= 1e+177):
		tmp = (y * i) + (a + (z + t_1))
	else:
		tmp = (y * i) + ((a + (t + (z + (x * math.log(y))))) + (-0.5 * math.log(c)))
	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 <= -4e+79) || !(t_1 <= 1e+177))
		tmp = Float64(Float64(y * i) + Float64(a + Float64(z + t_1)));
	else
		tmp = Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(-0.5 * log(c))));
	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 <= -4e+79) || ~((t_1 <= 1e+177)))
		tmp = (y * i) + (a + (z + t_1));
	else
		tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (-0.5 * log(c)));
	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[Or[LessEqual[t$95$1, -4e+79], N[Not[LessEqual[t$95$1, 1e+177]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.9%

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

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

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

Alternative 3: 92.6% accurate, 1.0× speedup?

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

\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(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 < -2.9e168 or 2.70000000000000018e140 < x

    1. Initial program 99.7%

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

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

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

    if -2.9e168 < x < 2.70000000000000018e140

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.9 \cdot 10^{+168} \lor \neg \left(x \leq 2.7 \cdot 10^{+140}\right):\\ \;\;\;\;y \cdot i + \left(a + \left(z + \left(x \cdot \log y + -0.5 \cdot \log c\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(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: 91.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.9 \cdot 10^{+214}:\\
\;\;\;\;y \cdot i + x \cdot \left(\log y + b \cdot \frac{\log c}{x}\right)\\

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\log y + \color{blue}{b \cdot \frac{\log c}{x}}\right) + y \cdot i \]
    8. Simplified94.2%

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

    if -1.89999999999999999e214 < x < 1.26000000000000004e171

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

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

    if 1.26000000000000004e171 < x

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

Alternative 6: 91.0% accurate, 1.8× speedup?

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

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if -6.3999999999999999e209 < x < 1.15000000000000009e171

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

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

    if 1.15000000000000009e171 < x

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

Alternative 7: 45.7% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;z \leq -7.2 \cdot 10^{+19}:\\
\;\;\;\;y \cdot i + x \cdot \left(\log y + \frac{a}{x}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.29999999999999994e153

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

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

    if -3.29999999999999994e153 < z < -7.2e19

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

    if -7.2e19 < z < -5.5999999999999998e-198

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

    if -5.5999999999999998e-198 < z

    1. Initial program 99.9%

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

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

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

Alternative 8: 76.7% accurate, 1.8× speedup?

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

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if -1.8000000000000001e210 < x < 1.06000000000000001e171

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

    if 1.06000000000000001e171 < x

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

Alternative 9: 44.9% accurate, 1.8× speedup?

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

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

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

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


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

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

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

    if -1.7500000000000001e158 < z < -5.5000000000000001e-198

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

    if -5.5000000000000001e-198 < z

    1. Initial program 99.9%

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

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

Alternative 10: 44.4% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;z \leq -9 \cdot 10^{-195}:\\
\;\;\;\;y \cdot i + b \cdot \log c\\

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


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

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

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

    if -2.80000000000000001e158 < z < -9e-195

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

    if -9e-195 < z

    1. Initial program 99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+158}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-195}:\\ \;\;\;\;y \cdot i + b \cdot \log c\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 59.0% accurate, 1.9× speedup?

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

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

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


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

    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-cube-cbrt99.6%

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

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

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

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

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

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

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

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

    if 1.7500000000000001e221 < a

    1. Initial program 99.9%

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

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

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

Alternative 12: 38.8% accurate, 2.0× speedup?

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

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

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


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

    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-cube-cbrt99.6%

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

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

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

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

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

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

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

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

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

    if 2.40000000000000002e147 < a

    1. Initial program 99.9%

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

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

Alternative 13: 43.8% accurate, 21.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+153}:\\ \;\;\;\;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 (<= z -2e+153) (+ 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 (z <= -2e+153) {
		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 (z <= (-2d+153)) 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 (z <= -2e+153) {
		tmp = z + (y * i);
	} else {
		tmp = a + (y * i);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if z <= -2e+153:
		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 (z <= -2e+153)
		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 (z <= -2e+153)
		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[z, -2e+153], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


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

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

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

    if -2e153 < z

    1. Initial program 99.9%

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

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

Alternative 14: 39.6% accurate, 21.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+195}:\\
\;\;\;\;i \cdot \frac{z}{i}\\

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot i + \left(\left(\left(\left(x \cdot \log y + a\right) + t\right) + z\right) + \left(b - 0.5\right) \cdot \log c\right)} \]
      10. fma-define99.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 i around inf 59.6%

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

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

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

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

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

      \[\leadsto i \cdot \color{blue}{\frac{z}{i}} \]

    if -3.19999999999999982e195 < z

    1. Initial program 99.9%

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

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

Alternative 15: 18.2% accurate, 21.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+120}:\\
\;\;\;\;i \cdot \frac{z}{i}\\

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot i + \left(\left(\left(\left(x \cdot \log y + a\right) + t\right) + z\right) + \left(b - 0.5\right) \cdot \log c\right)} \]
      10. fma-define99.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 i around inf 62.3%

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

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

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

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

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

      \[\leadsto i \cdot \color{blue}{\frac{z}{i}} \]

    if -1.5e120 < z

    1. Initial program 99.9%

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

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

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

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

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

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

      \[\leadsto i \cdot \color{blue}{\frac{a}{i}} \]
    9. Taylor expanded in i around 0 18.0%

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

Alternative 16: 28.9% accurate, 27.3× speedup?

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

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

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


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

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

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

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

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

    if 2.14999999999999993e156 < a

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto i \cdot \color{blue}{\frac{a}{i}} \]
    9. Taylor expanded in i around 0 37.9%

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

Alternative 17: 15.8% accurate, 219.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto i \cdot \color{blue}{\frac{a}{i}} \]
  9. Taylor expanded in i around 0 16.6%

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

Reproduce

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