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

Percentage Accurate: 99.8% → 99.8%
Time: 18.8s
Alternatives: 21
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 21 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

    \[\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 y around inf 99.5%

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

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

Alternative 2: 94.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.6 \cdot 10^{+86} \lor \neg \left(x \leq 1.2 \cdot 10^{+175}\right):\\
\;\;\;\;y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \log c \cdot -0.5\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.5999999999999998e86 or 1.2e175 < x

    1. Initial program 98.4%

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

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

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

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

    if -2.5999999999999998e86 < x < 1.2e175

    1. Initial program 99.9%

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

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

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

Alternative 3: 89.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{+87} \lor \neg \left(x \leq 2.15 \cdot 10^{+176}\right):\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot -0.5\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.79999999999999963e87 or 2.15000000000000013e176 < x

    1. Initial program 98.4%

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

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

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

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

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

    if -4.79999999999999963e87 < x < 2.15000000000000013e176

    1. Initial program 99.9%

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

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

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

Alternative 4: 91.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.65 \cdot 10^{+181} \lor \neg \left(x \leq 3.3 \cdot 10^{+175}\right):\\
\;\;\;\;y \cdot i + \left(z + \left(x \cdot \log y + \log c \cdot -0.5\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.65000000000000008e181 or 3.3000000000000002e175 < x

    1. Initial program 97.9%

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

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

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

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

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

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

    if -1.65000000000000008e181 < x < 3.3000000000000002e175

    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.4%

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

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

Alternative 5: 91.2% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;x \leq 4.5 \cdot 10^{+175}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + t\_2\right)\right)\right)\\

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


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

    1. Initial program 97.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 y around 0 83.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)} \]

    if -4.2e87 < x < 4.49999999999999989e175

    1. Initial program 99.9%

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

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

    if 4.49999999999999989e175 < x

    1. Initial program 99.7%

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

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

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

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

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

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

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

Alternative 6: 89.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.5 \cdot 10^{+180} \lor \neg \left(x \leq 4.8 \cdot 10^{+228}\right):\\
\;\;\;\;t + \left(z + \left(x \cdot \log y + \log c \cdot -0.5\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.5e180 or 4.79999999999999977e228 < x

    1. Initial program 97.5%

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

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

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

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

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

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

    if -6.5e180 < x < 4.79999999999999977e228

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

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

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

Alternative 7: 99.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 8: 21.9% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ t_2 := b \cdot \log c\\ \mathbf{if}\;a \leq -3.1 \cdot 10^{-249}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq -2.65 \cdot 10^{-281}:\\ \;\;\;\;y \cdot i\\ \mathbf{elif}\;a \leq 4.9 \cdot 10^{-225}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{-130}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-97}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq 1.46 \cdot 10^{-21}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{+22}:\\ \;\;\;\;y \cdot i\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{+127}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{+145}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* x (log y))) (t_2 (* b (log c))))
   (if (<= a -3.1e-249)
     z
     (if (<= a -2.65e-281)
       (* y i)
       (if (<= a 4.9e-225)
         z
         (if (<= a 2.9e-130)
           t_2
           (if (<= a 9.5e-97)
             z
             (if (<= a 1.46e-21)
               t_1
               (if (<= a 3.9e+22)
                 (* y i)
                 (if (<= a 4.8e+127) t_2 (if (<= a 2.2e+145) 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 t_2 = b * log(c);
	double tmp;
	if (a <= -3.1e-249) {
		tmp = z;
	} else if (a <= -2.65e-281) {
		tmp = y * i;
	} else if (a <= 4.9e-225) {
		tmp = z;
	} else if (a <= 2.9e-130) {
		tmp = t_2;
	} else if (a <= 9.5e-97) {
		tmp = z;
	} else if (a <= 1.46e-21) {
		tmp = t_1;
	} else if (a <= 3.9e+22) {
		tmp = y * i;
	} else if (a <= 4.8e+127) {
		tmp = t_2;
	} else if (a <= 2.2e+145) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * log(y)
    t_2 = b * log(c)
    if (a <= (-3.1d-249)) then
        tmp = z
    else if (a <= (-2.65d-281)) then
        tmp = y * i
    else if (a <= 4.9d-225) then
        tmp = z
    else if (a <= 2.9d-130) then
        tmp = t_2
    else if (a <= 9.5d-97) then
        tmp = z
    else if (a <= 1.46d-21) then
        tmp = t_1
    else if (a <= 3.9d+22) then
        tmp = y * i
    else if (a <= 4.8d+127) then
        tmp = t_2
    else if (a <= 2.2d+145) then
        tmp = t_1
    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 t_1 = x * Math.log(y);
	double t_2 = b * Math.log(c);
	double tmp;
	if (a <= -3.1e-249) {
		tmp = z;
	} else if (a <= -2.65e-281) {
		tmp = y * i;
	} else if (a <= 4.9e-225) {
		tmp = z;
	} else if (a <= 2.9e-130) {
		tmp = t_2;
	} else if (a <= 9.5e-97) {
		tmp = z;
	} else if (a <= 1.46e-21) {
		tmp = t_1;
	} else if (a <= 3.9e+22) {
		tmp = y * i;
	} else if (a <= 4.8e+127) {
		tmp = t_2;
	} else if (a <= 2.2e+145) {
		tmp = t_1;
	} else {
		tmp = a;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = x * math.log(y)
	t_2 = b * math.log(c)
	tmp = 0
	if a <= -3.1e-249:
		tmp = z
	elif a <= -2.65e-281:
		tmp = y * i
	elif a <= 4.9e-225:
		tmp = z
	elif a <= 2.9e-130:
		tmp = t_2
	elif a <= 9.5e-97:
		tmp = z
	elif a <= 1.46e-21:
		tmp = t_1
	elif a <= 3.9e+22:
		tmp = y * i
	elif a <= 4.8e+127:
		tmp = t_2
	elif a <= 2.2e+145:
		tmp = t_1
	else:
		tmp = a
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(x * log(y))
	t_2 = Float64(b * log(c))
	tmp = 0.0
	if (a <= -3.1e-249)
		tmp = z;
	elseif (a <= -2.65e-281)
		tmp = Float64(y * i);
	elseif (a <= 4.9e-225)
		tmp = z;
	elseif (a <= 2.9e-130)
		tmp = t_2;
	elseif (a <= 9.5e-97)
		tmp = z;
	elseif (a <= 1.46e-21)
		tmp = t_1;
	elseif (a <= 3.9e+22)
		tmp = Float64(y * i);
	elseif (a <= 4.8e+127)
		tmp = t_2;
	elseif (a <= 2.2e+145)
		tmp = t_1;
	else
		tmp = a;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = x * log(y);
	t_2 = b * log(c);
	tmp = 0.0;
	if (a <= -3.1e-249)
		tmp = z;
	elseif (a <= -2.65e-281)
		tmp = y * i;
	elseif (a <= 4.9e-225)
		tmp = z;
	elseif (a <= 2.9e-130)
		tmp = t_2;
	elseif (a <= 9.5e-97)
		tmp = z;
	elseif (a <= 1.46e-21)
		tmp = t_1;
	elseif (a <= 3.9e+22)
		tmp = y * i;
	elseif (a <= 4.8e+127)
		tmp = t_2;
	elseif (a <= 2.2e+145)
		tmp = t_1;
	else
		tmp = 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]}, Block[{t$95$2 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.1e-249], z, If[LessEqual[a, -2.65e-281], N[(y * i), $MachinePrecision], If[LessEqual[a, 4.9e-225], z, If[LessEqual[a, 2.9e-130], t$95$2, If[LessEqual[a, 9.5e-97], z, If[LessEqual[a, 1.46e-21], t$95$1, If[LessEqual[a, 3.9e+22], N[(y * i), $MachinePrecision], If[LessEqual[a, 4.8e+127], t$95$2, If[LessEqual[a, 2.2e+145], t$95$1, a]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := b \cdot \log c\\
\mathbf{if}\;a \leq -3.1 \cdot 10^{-249}:\\
\;\;\;\;z\\

\mathbf{elif}\;a \leq -2.65 \cdot 10^{-281}:\\
\;\;\;\;y \cdot i\\

\mathbf{elif}\;a \leq 4.9 \cdot 10^{-225}:\\
\;\;\;\;z\\

\mathbf{elif}\;a \leq 2.9 \cdot 10^{-130}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 9.5 \cdot 10^{-97}:\\
\;\;\;\;z\\

\mathbf{elif}\;a \leq 1.46 \cdot 10^{-21}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 3.9 \cdot 10^{+22}:\\
\;\;\;\;y \cdot i\\

\mathbf{elif}\;a \leq 4.8 \cdot 10^{+127}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 2.2 \cdot 10^{+145}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -3.09999999999999986e-249 or -2.64999999999999997e-281 < a < 4.89999999999999971e-225 or 2.9e-130 < a < 9.5000000000000001e-97

    1. Initial program 99.2%

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

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

    if -3.09999999999999986e-249 < a < -2.64999999999999997e-281 or 1.46000000000000006e-21 < a < 3.90000000000000021e22

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

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

        \[\leadsto \color{blue}{y \cdot i} \]
    5. Simplified35.5%

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

    if 4.89999999999999971e-225 < a < 2.9e-130 or 3.90000000000000021e22 < a < 4.8000000000000004e127

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

      \[\leadsto \color{blue}{b \cdot \log c} \]
    4. Step-by-step derivation
      1. *-commutative21.6%

        \[\leadsto \color{blue}{\log c \cdot b} \]
    5. Simplified21.6%

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

    if 9.5000000000000001e-97 < a < 1.46000000000000006e-21 or 4.8000000000000004e127 < a < 2.20000000000000009e145

    1. Initial program 99.6%

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

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

    if 2.20000000000000009e145 < a

    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 a around inf 54.2%

      \[\leadsto \color{blue}{a} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification23.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.1 \cdot 10^{-249}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq -2.65 \cdot 10^{-281}:\\ \;\;\;\;y \cdot i\\ \mathbf{elif}\;a \leq 4.9 \cdot 10^{-225}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{-130}:\\ \;\;\;\;b \cdot \log c\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-97}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq 1.46 \cdot 10^{-21}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{+22}:\\ \;\;\;\;y \cdot i\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{+127}:\\ \;\;\;\;b \cdot \log c\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{+145}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 21.7% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;a \leq -7.4 \cdot 10^{-252}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-281}:\\ \;\;\;\;y \cdot i\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-170}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{-130}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 2.15 \cdot 10^{-91}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-21}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{+58}:\\ \;\;\;\;y \cdot i\\ \mathbf{elif}\;a \leq 10^{+137}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{+146}:\\ \;\;\;\;y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* x (log y))))
   (if (<= a -7.4e-252)
     z
     (if (<= a -2.7e-281)
       (* y i)
       (if (<= a 5.2e-170)
         z
         (if (<= a 3.4e-130)
           t_1
           (if (<= a 2.15e-91)
             z
             (if (<= a 1.25e-21)
               t_1
               (if (<= a 3.8e+58)
                 (* y i)
                 (if (<= a 1e+137)
                   t_1
                   (if (<= a 1.15e+146) (* y i) 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 (a <= -7.4e-252) {
		tmp = z;
	} else if (a <= -2.7e-281) {
		tmp = y * i;
	} else if (a <= 5.2e-170) {
		tmp = z;
	} else if (a <= 3.4e-130) {
		tmp = t_1;
	} else if (a <= 2.15e-91) {
		tmp = z;
	} else if (a <= 1.25e-21) {
		tmp = t_1;
	} else if (a <= 3.8e+58) {
		tmp = y * i;
	} else if (a <= 1e+137) {
		tmp = t_1;
	} else if (a <= 1.15e+146) {
		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) :: t_1
    real(8) :: tmp
    t_1 = x * log(y)
    if (a <= (-7.4d-252)) then
        tmp = z
    else if (a <= (-2.7d-281)) then
        tmp = y * i
    else if (a <= 5.2d-170) then
        tmp = z
    else if (a <= 3.4d-130) then
        tmp = t_1
    else if (a <= 2.15d-91) then
        tmp = z
    else if (a <= 1.25d-21) then
        tmp = t_1
    else if (a <= 3.8d+58) then
        tmp = y * i
    else if (a <= 1d+137) then
        tmp = t_1
    else if (a <= 1.15d+146) 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 t_1 = x * Math.log(y);
	double tmp;
	if (a <= -7.4e-252) {
		tmp = z;
	} else if (a <= -2.7e-281) {
		tmp = y * i;
	} else if (a <= 5.2e-170) {
		tmp = z;
	} else if (a <= 3.4e-130) {
		tmp = t_1;
	} else if (a <= 2.15e-91) {
		tmp = z;
	} else if (a <= 1.25e-21) {
		tmp = t_1;
	} else if (a <= 3.8e+58) {
		tmp = y * i;
	} else if (a <= 1e+137) {
		tmp = t_1;
	} else if (a <= 1.15e+146) {
		tmp = y * i;
	} else {
		tmp = a;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = x * math.log(y)
	tmp = 0
	if a <= -7.4e-252:
		tmp = z
	elif a <= -2.7e-281:
		tmp = y * i
	elif a <= 5.2e-170:
		tmp = z
	elif a <= 3.4e-130:
		tmp = t_1
	elif a <= 2.15e-91:
		tmp = z
	elif a <= 1.25e-21:
		tmp = t_1
	elif a <= 3.8e+58:
		tmp = y * i
	elif a <= 1e+137:
		tmp = t_1
	elif a <= 1.15e+146:
		tmp = y * i
	else:
		tmp = a
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(x * log(y))
	tmp = 0.0
	if (a <= -7.4e-252)
		tmp = z;
	elseif (a <= -2.7e-281)
		tmp = Float64(y * i);
	elseif (a <= 5.2e-170)
		tmp = z;
	elseif (a <= 3.4e-130)
		tmp = t_1;
	elseif (a <= 2.15e-91)
		tmp = z;
	elseif (a <= 1.25e-21)
		tmp = t_1;
	elseif (a <= 3.8e+58)
		tmp = Float64(y * i);
	elseif (a <= 1e+137)
		tmp = t_1;
	elseif (a <= 1.15e+146)
		tmp = Float64(y * i);
	else
		tmp = 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 (a <= -7.4e-252)
		tmp = z;
	elseif (a <= -2.7e-281)
		tmp = y * i;
	elseif (a <= 5.2e-170)
		tmp = z;
	elseif (a <= 3.4e-130)
		tmp = t_1;
	elseif (a <= 2.15e-91)
		tmp = z;
	elseif (a <= 1.25e-21)
		tmp = t_1;
	elseif (a <= 3.8e+58)
		tmp = y * i;
	elseif (a <= 1e+137)
		tmp = t_1;
	elseif (a <= 1.15e+146)
		tmp = y * i;
	else
		tmp = 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[a, -7.4e-252], z, If[LessEqual[a, -2.7e-281], N[(y * i), $MachinePrecision], If[LessEqual[a, 5.2e-170], z, If[LessEqual[a, 3.4e-130], t$95$1, If[LessEqual[a, 2.15e-91], z, If[LessEqual[a, 1.25e-21], t$95$1, If[LessEqual[a, 3.8e+58], N[(y * i), $MachinePrecision], If[LessEqual[a, 1e+137], t$95$1, If[LessEqual[a, 1.15e+146], N[(y * i), $MachinePrecision], a]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;a \leq -7.4 \cdot 10^{-252}:\\
\;\;\;\;z\\

\mathbf{elif}\;a \leq -2.7 \cdot 10^{-281}:\\
\;\;\;\;y \cdot i\\

\mathbf{elif}\;a \leq 5.2 \cdot 10^{-170}:\\
\;\;\;\;z\\

\mathbf{elif}\;a \leq 3.4 \cdot 10^{-130}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 2.15 \cdot 10^{-91}:\\
\;\;\;\;z\\

\mathbf{elif}\;a \leq 1.25 \cdot 10^{-21}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 3.8 \cdot 10^{+58}:\\
\;\;\;\;y \cdot i\\

\mathbf{elif}\;a \leq 10^{+137}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.15 \cdot 10^{+146}:\\
\;\;\;\;y \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -7.4000000000000002e-252 or -2.6999999999999999e-281 < a < 5.2000000000000003e-170 or 3.40000000000000005e-130 < a < 2.15e-91

    1. Initial program 99.3%

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

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

    if -7.4000000000000002e-252 < a < -2.6999999999999999e-281 or 1.24999999999999993e-21 < a < 3.7999999999999999e58 or 1e137 < a < 1.15e146

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

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

        \[\leadsto \color{blue}{y \cdot i} \]
    5. Simplified39.8%

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

    if 5.2000000000000003e-170 < a < 3.40000000000000005e-130 or 2.15e-91 < a < 1.24999999999999993e-21 or 3.7999999999999999e58 < a < 1e137

    1. Initial program 99.7%

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

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

    if 1.15e146 < a

    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 a around inf 54.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.4 \cdot 10^{-252}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-281}:\\ \;\;\;\;y \cdot i\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-170}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{-130}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{elif}\;a \leq 2.15 \cdot 10^{-91}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-21}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{+58}:\\ \;\;\;\;y \cdot i\\ \mathbf{elif}\;a \leq 10^{+137}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{+146}:\\ \;\;\;\;y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 74.2% accurate, 1.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -5 \cdot 10^{+111} \lor \neg \left(b - 0.5 \leq 10^{+99}\right):\\
\;\;\;\;a + \left(z + \left(b - 0.5\right) \cdot \log c\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 b 1/2) < -4.9999999999999997e111 or 9.9999999999999997e98 < (-.f64 b 1/2)

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.9999999999999997e111 < (-.f64 b 1/2) < 9.9999999999999997e98

    1. Initial program 99.3%

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

        \[\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. associate-+l+99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 61.9% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -5 \cdot 10^{+111} \lor \neg \left(b - 0.5 \leq 10^{+99}\right):\\
\;\;\;\;a + \left(z + \left(b - 0.5\right) \cdot \log c\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 b 1/2) < -4.9999999999999997e111 or 9.9999999999999997e98 < (-.f64 b 1/2)

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.9999999999999997e111 < (-.f64 b 1/2) < 9.9999999999999997e98

    1. Initial program 99.3%

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

        \[\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. associate-+l+99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 86.6% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.6 \cdot 10^{+184}:\\
\;\;\;\;\log \left(\frac{1}{y}\right) \cdot \left(-x\right)\\

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

\mathbf{else}:\\
\;\;\;\;x \cdot \log y\\


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

    1. Initial program 96.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 y around inf 96.8%

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

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

    if -6.5999999999999996e184 < x < 1.7999999999999999e287

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

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

    if 1.7999999999999999e287 < x

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{x \cdot \log y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification88.1%

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

Alternative 13: 71.7% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.25 \cdot 10^{+185}:\\
\;\;\;\;\log \left(\frac{1}{y}\right) \cdot \left(-x\right)\\

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

\mathbf{else}:\\
\;\;\;\;x \cdot \log y\\


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

    1. Initial program 96.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 y around inf 96.8%

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

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

    if -1.24999999999999997e185 < x < 1.7999999999999999e287

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.7999999999999999e287 < x

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{x \cdot \log y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification75.9%

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

Alternative 14: 53.2% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.2 \cdot 10^{+217} \lor \neg \left(b \leq 1.15 \cdot 10^{+240}\right):\\
\;\;\;\;b \cdot \log c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -6.2000000000000003e217 or 1.15000000000000001e240 < b

    1. Initial program 99.5%

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

      \[\leadsto \color{blue}{b \cdot \log c} \]
    4. Step-by-step derivation
      1. *-commutative73.0%

        \[\leadsto \color{blue}{\log c \cdot b} \]
    5. Simplified73.0%

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

    if -6.2000000000000003e217 < b < 1.15000000000000001e240

    1. Initial program 99.4%

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

        \[\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. associate-+l+99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6.2 \cdot 10^{+217} \lor \neg \left(b \leq 1.15 \cdot 10^{+240}\right):\\ \;\;\;\;b \cdot \log c\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \left(z + \log c \cdot -0.5\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 52.4% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.25 \cdot 10^{+185}:\\
\;\;\;\;\log \left(\frac{1}{y}\right) \cdot \left(-x\right)\\

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

\mathbf{else}:\\
\;\;\;\;x \cdot \log y\\


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

    1. Initial program 96.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 y around inf 96.8%

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

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

    if -1.24999999999999997e185 < x < 2.6999999999999998e176

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.6999999999999998e176 < x

    1. Initial program 99.7%

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

      \[\leadsto \color{blue}{x \cdot \log y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification58.4%

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

Alternative 16: 56.5% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;y \leq 3.4 \cdot 10^{+123}:\\
\;\;\;\;a + t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < 4.4999999999999998e67

    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. associate-+l+99.8%

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

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

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

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

        \[\leadsto \left(z + \color{blue}{\left(\left(x \cdot \log y + a\right) + t\right)}\right) + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right) \]
      7. +-commutative99.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-def99.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-def99.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 x around 0 80.3%

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

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

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

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

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

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

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

    if 4.4999999999999998e67 < y < 3.40000000000000001e123

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.40000000000000001e123 < y

    1. Initial program 98.5%

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

        \[\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. associate-+l+98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 38.6% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.6 \cdot 10^{+215} \lor \neg \left(b \leq 1.2 \cdot 10^{+240}\right):\\
\;\;\;\;b \cdot \log c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.6e215 or 1.1999999999999999e240 < b

    1. Initial program 99.5%

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

      \[\leadsto \color{blue}{b \cdot \log c} \]
    4. Step-by-step derivation
      1. *-commutative73.0%

        \[\leadsto \color{blue}{\log c \cdot b} \]
    5. Simplified73.0%

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

    if -2.6e215 < b < 1.1999999999999999e240

    1. Initial program 99.4%

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

        \[\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. associate-+l+99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a + \left(z + \color{blue}{\log c \cdot -0.5}\right) \]
    10. Simplified36.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.6 \cdot 10^{+215} \lor \neg \left(b \leq 1.2 \cdot 10^{+240}\right):\\ \;\;\;\;b \cdot \log c\\ \mathbf{else}:\\ \;\;\;\;a + \left(z + \log c \cdot -0.5\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 56.5% accurate, 1.9× speedup?

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

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

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


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

    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. associate-+l+99.8%

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

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

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

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

        \[\leadsto \left(z + \color{blue}{\left(\left(x \cdot \log y + a\right) + t\right)}\right) + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right) \]
      7. +-commutative99.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-def99.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-def99.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 x around 0 80.3%

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

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

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

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

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

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

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

    if 1.95000000000000003e67 < y

    1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot i + \left(\left(\left(\left(x \cdot \log y + a\right) + t\right) + z\right) + \left(b - 0.5\right) \cdot \log c\right)} \]
      10. fma-def98.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. +-commutative98.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-def98.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-neg98.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-eval98.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. +-commutative98.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. Simplified98.9%

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

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

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

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

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

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

Alternative 19: 22.6% accurate, 9.5× speedup?

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

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

\mathbf{elif}\;a \leq -8.5 \cdot 10^{-281}:\\
\;\;\;\;y \cdot i\\

\mathbf{elif}\;a \leq 1.26 \cdot 10^{-33}:\\
\;\;\;\;z\\

\mathbf{elif}\;a \leq 5.8 \cdot 10^{+145}:\\
\;\;\;\;y \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.1e-241 or -8.4999999999999994e-281 < a < 1.26000000000000005e-33

    1. Initial program 99.3%

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

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

    if -1.1e-241 < a < -8.4999999999999994e-281 or 1.26000000000000005e-33 < a < 5.8000000000000001e145

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

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

        \[\leadsto \color{blue}{y \cdot i} \]
    5. Simplified32.7%

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

    if 5.8000000000000001e145 < a

    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 a around inf 54.2%

      \[\leadsto \color{blue}{a} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification23.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.1 \cdot 10^{-241}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{-281}:\\ \;\;\;\;y \cdot i\\ \mathbf{elif}\;a \leq 1.26 \cdot 10^{-33}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{+145}:\\ \;\;\;\;y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 21.4% accurate, 36.4× speedup?

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

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

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


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

    1. Initial program 99.4%

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

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

    if 4.30000000000000007e110 < a

    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 a around inf 47.4%

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

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

Alternative 21: 16.1% 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.5%

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

    \[\leadsto \color{blue}{a} \]
  4. Final simplification19.5%

    \[\leadsto a \]
  5. Add Preprocessing

Reproduce

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