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

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

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b \cdot \left(1 - \frac{0.5}{b}\right)\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 (- 1.0 (/ 0.5 b))) (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 * (1.0 - (0.5 / b))) * 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 * (1.0d0 - (0.5d0 / b))) * 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 * (1.0 - (0.5 / b))) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i):
	return (((((x * math.log(y)) + z) + t) + a) + ((b * (1.0 - (0.5 / b))) * 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 * Float64(1.0 - Float64(0.5 / b))) * 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 * (1.0 - (0.5 / b))) * 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 * N[(1.0 - N[(0.5 / b), $MachinePrecision]), $MachinePrecision]), $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 \cdot \left(1 - \frac{0.5}{b}\right)\right) \cdot \log c\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. Taylor expanded in b around inf 99.9%

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

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

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

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

Alternative 2: 88.0% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -2.2999999999999999e47

    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 t around 0 84.7%

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

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

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

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

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

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

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

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

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

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

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

    if -2.2999999999999999e47 < i < 1.14999999999999998e-68

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.14999999999999998e-68 < i

    1. Initial program 99.9%

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

      \[\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 3 regimes into one program.
  4. Final simplification92.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -2.3 \cdot 10^{+47}:\\ \;\;\;\;y \cdot i + \left(\left(z + a\right) + \left(b \cdot \left(1 - \frac{0.5}{b}\right)\right) \cdot \log c\right)\\ \mathbf{elif}\;i \leq 1.15 \cdot 10^{-68}:\\ \;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\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 3: 99.8% accurate, 1.0× speedup?

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

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

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

Alternative 4: 89.9% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.30000000000000011e211 < x < 1.54999999999999988e117

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.54999999999999988e117 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 84.6% accurate, 1.0× speedup?

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

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

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

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

Alternative 6: 90.5% accurate, 1.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{+210} \lor \neg \left(x \leq 1.3 \cdot 10^{+117}\right):\\
\;\;\;\;y \cdot i + \left(x \cdot \log y + a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.19999999999999987e210 or 1.3e117 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

    if -2.19999999999999987e210 < x < 1.3e117

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 90.5% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.2 \cdot 10^{+210} \lor \neg \left(x \leq 1.25 \cdot 10^{+117}\right):\\ \;\;\;\;y \cdot i + \left(x \cdot \log y + a\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.2e+210) (not (<= x 1.25e+117)))
   (+ (* y i) (+ (* x (log y)) a))
   (+ (* 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.2e+210) || !(x <= 1.25e+117)) {
		tmp = (y * i) + ((x * log(y)) + a);
	} 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.2d+210)) .or. (.not. (x <= 1.25d+117))) then
        tmp = (y * i) + ((x * log(y)) + a)
    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.2e+210) || !(x <= 1.25e+117)) {
		tmp = (y * i) + ((x * Math.log(y)) + a);
	} 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.2e+210) or not (x <= 1.25e+117):
		tmp = (y * i) + ((x * math.log(y)) + a)
	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.2e+210) || !(x <= 1.25e+117))
		tmp = Float64(Float64(y * i) + Float64(Float64(x * log(y)) + a));
	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.2e+210) || ~((x <= 1.25e+117)))
		tmp = (y * i) + ((x * log(y)) + a);
	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.2e+210], N[Not[LessEqual[x, 1.25e+117]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + a), $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.2 \cdot 10^{+210} \lor \neg \left(x \leq 1.25 \cdot 10^{+117}\right):\\
\;\;\;\;y \cdot i + \left(x \cdot \log y + a\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.19999999999999987e210 or 1.24999999999999996e117 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

    if -2.19999999999999987e210 < x < 1.24999999999999996e117

    1. Initial program 99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.2 \cdot 10^{+210} \lor \neg \left(x \leq 1.25 \cdot 10^{+117}\right):\\ \;\;\;\;y \cdot i + \left(x \cdot \log y + a\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 8: 77.3% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{+211} \lor \neg \left(x \leq 1.3 \cdot 10^{+117}\right):\\
\;\;\;\;y \cdot i + \left(x \cdot \log y + a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9.9999999999999996e210 or 1.3e117 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

    if -9.9999999999999996e210 < x < 1.3e117

    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 t around 0 80.0%

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

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

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

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

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

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

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

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

Alternative 9: 60.6% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.2 \cdot 10^{+210} \lor \neg \left(x \leq 4.2 \cdot 10^{+233}\right):\\
\;\;\;\;x \cdot \log y + y \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.2000000000000002e210 or 4.19999999999999993e233 < x

    1. Initial program 99.8%

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

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

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

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

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

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

    if -3.2000000000000002e210 < x < 4.19999999999999993e233

    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 t around 0 80.5%

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

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

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

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

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

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

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

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

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

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

Alternative 10: 60.0% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    if 1e47 < 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 t around 0 79.3%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 70.4% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 4.6000000000000001e122

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.6000000000000001e122 < y

    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 t around 0 88.8%

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

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

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

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

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

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

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

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

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

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

Alternative 12: 58.7% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3 \cdot 10^{+238} \lor \neg \left(x \leq 9.5 \cdot 10^{+221}\right):\\
\;\;\;\;x \cdot \log y + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3e238 or 9.50000000000000044e221 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

    if -3e238 < x < 9.50000000000000044e221

    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 t around 0 80.8%

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

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

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

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

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

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

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

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

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

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

Alternative 13: 58.8% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 4.8999999999999998e122

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.8999999999999998e122 < y

    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 t around 0 88.8%

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

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

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

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

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

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

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

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

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

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

Alternative 14: 58.0% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{+244} \lor \neg \left(x \leq 2.9 \cdot 10^{+243}\right):\\
\;\;\;\;x \cdot \log y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.1000000000000001e244 or 2.90000000000000006e243 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \log \left(\frac{1}{y}\right)\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg65.9%

        \[\leadsto \color{blue}{-x \cdot \log \left(\frac{1}{y}\right)} \]
      2. log-rec65.9%

        \[\leadsto -x \cdot \color{blue}{\left(-\log y\right)} \]
    8. Applied egg-rr65.9%

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

    if -2.1000000000000001e244 < x < 2.90000000000000006e243

    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 t around 0 80.7%

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

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

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

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

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

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

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

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

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

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

Alternative 15: 43.8% accurate, 21.9× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

    if -1.6e54 < z

    1. Initial program 99.8%

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

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

Alternative 16: 27.6% accurate, 27.3× speedup?

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

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

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


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

    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 y around inf 25.8%

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

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

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

    if 8.4999999999999996e49 < 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 48.0%

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

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

Alternative 17: 53.1% accurate, 31.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto y \cdot i + \left(z + a\right) \]
  9. Add Preprocessing

Alternative 18: 38.5% accurate, 43.8× speedup?

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

\\
a + y \cdot i
\end{array}
Derivation
  1. Initial program 99.9%

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

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

Alternative 19: 15.9% accurate, 219.0× speedup?

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

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

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

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

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

Reproduce

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