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

Percentage Accurate: 99.8% → 99.8%
Time: 24.9s
Alternatives: 19
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 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}
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 \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 \]
  4. Add Preprocessing

Alternative 2: 92.0% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.5000000000000005e76 or 2.50000000000000005e94 < x

    1. Initial program 98.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 y around 0 88.2%

      \[\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 -6.5000000000000005e76 < x < 2.50000000000000005e94

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.5 \cdot 10^{+76} \lor \neg \left(x \leq 2.5 \cdot 10^{+94}\right):\\ \;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + \left(b - 0.5\right) \cdot \log c\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 3: 89.0% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 b 1/2) < -2e133

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

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

    if -2e133 < (-.f64 b 1/2)

    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 b around 0 95.4%

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

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

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

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

Alternative 4: 55.9% accurate, 1.7× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot i + x \cdot \left(\log y + \frac{a}{x}\right)\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+117}:\\
\;\;\;\;y \cdot i + z \cdot \left(1 + \frac{a}{z}\right)\\

\mathbf{elif}\;z \leq -2.2 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq -9 \cdot 10^{-300}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 100.0%

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

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

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

    if -2.20000000000000014e117 < z < -2.2e17 or -5.40000000000000005e-8 < z < -9.0000000000000001e-300

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if -2.2e17 < z < -5.40000000000000005e-8

    1. Initial program 99.7%

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

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

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

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

    if -9.0000000000000001e-300 < z

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

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

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

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

Alternative 5: 68.7% accurate, 1.7× speedup?

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

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

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

\mathbf{elif}\;a \leq 7.5 \cdot 10^{-86}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 0.05:\\
\;\;\;\;y \cdot i + x \cdot \left(\log y + \frac{z}{x}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < 3.40000000000000009e-244 or 2.4e-133 < a < 7.50000000000000055e-86

    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 x around 0 78.2%

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

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

    if 3.40000000000000009e-244 < a < 2.4e-133

    1. Initial program 99.8%

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

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

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

    if 7.50000000000000055e-86 < a < 0.050000000000000003

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if 0.050000000000000003 < a

    1. Initial program 99.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 3.4 \cdot 10^{-244}:\\ \;\;\;\;y \cdot i + \left(t + \left(z + \left(b - 0.5\right) \cdot \log c\right)\right)\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{-133}:\\ \;\;\;\;y \cdot i + z \cdot \left(1 + \frac{x \cdot \log y}{z}\right)\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-86}:\\ \;\;\;\;y \cdot i + \left(t + \left(z + \left(b - 0.5\right) \cdot \log c\right)\right)\\ \mathbf{elif}\;a \leq 0.05:\\ \;\;\;\;y \cdot i + x \cdot \left(\log y + \frac{z}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + a \cdot \left(1 + \left(\frac{t}{a} + \frac{z}{a}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 54.3% accurate, 1.7× speedup?

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

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

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

\mathbf{elif}\;a \leq 3.2 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < 1.31999999999999997e-267 or 2.69999999999999989e-245 < a < 3.19999999999999993e39

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

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

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

        \[\leadsto z \cdot \left(1 + \color{blue}{x \cdot \frac{\log y}{z}}\right) + y \cdot i \]
    6. Simplified53.3%

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

    if 1.31999999999999997e-267 < a < 2.69999999999999989e-245

    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 x around 0 99.5%

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

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

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

    if 3.19999999999999993e39 < a

    1. Initial program 99.9%

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

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

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

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

Alternative 7: 54.3% accurate, 1.7× speedup?

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

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

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

\mathbf{elif}\;a \leq 3 \cdot 10^{+39}:\\
\;\;\;\;y \cdot i + z \cdot \left(1 + \frac{x \cdot \log y}{z}\right)\\

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


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

    1. Initial program 99.1%

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

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

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

        \[\leadsto z \cdot \left(1 + \color{blue}{x \cdot \frac{\log y}{z}}\right) + y \cdot i \]
    6. Simplified53.3%

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

    if 7.8000000000000002e-278 < a < 6.7999999999999999e-245

    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 x around 0 99.5%

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

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

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

    if 6.7999999999999999e-245 < a < 3e39

    1. Initial program 99.8%

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

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

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

    if 3e39 < a

    1. Initial program 99.9%

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

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

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

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

Alternative 8: 90.1% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;x \leq 5.8 \cdot 10^{+243}:\\
\;\;\;\;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 + x \cdot \left(\log y + \frac{z}{x}\right)\\


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

    1. Initial program 95.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 95.6%

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

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

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

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

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

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

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

    if -8.5000000000000003e193 < x < 5.80000000000000013e243

    1. Initial program 99.9%

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

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

    if 5.80000000000000013e243 < x

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8.5 \cdot 10^{+193}:\\ \;\;\;\;y \cdot i + x \cdot \left(\log y + \frac{a}{x}\right)\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{+243}:\\ \;\;\;\;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 + x \cdot \left(\log y + \frac{z}{x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 54.0% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;a \leq 6.5 \cdot 10^{+41}:\\
\;\;\;\;y \cdot i + z \cdot \left(1 + \frac{x \cdot \log y}{z}\right)\\

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


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

    1. Initial program 99.1%

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

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

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

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

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

    if 8.20000000000000073e-245 < a < 6.49999999999999975e41

    1. Initial program 99.8%

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

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

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

    if 6.49999999999999975e41 < a

    1. Initial program 99.9%

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

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

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

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

Alternative 10: 57.7% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;y \leq 1.75 \cdot 10^{+107}:\\
\;\;\;\;y \cdot i + \left(x \cdot \log y + t\right)\\

\mathbf{elif}\;y \leq 1.2 \cdot 10^{+181}:\\
\;\;\;\;y \cdot i + z \cdot \left(1 + \frac{a}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < 4.00000000000000023e84

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

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

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

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

    if 4.00000000000000023e84 < y < 1.7499999999999999e107

    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 t around inf 55.5%

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

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

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

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

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

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

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

        \[\leadsto t \cdot \left(1 + \color{blue}{x \cdot \frac{\log y}{t}}\right) + y \cdot i \]
    8. Simplified55.9%

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

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

    if 1.7499999999999999e107 < y < 1.20000000000000001e181

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

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

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

    if 1.20000000000000001e181 < y

    1. Initial program 99.9%

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

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

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

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

Alternative 11: 68.6% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;y \leq 3.6 \cdot 10^{+106}:\\
\;\;\;\;y \cdot i + \left(x \cdot \log y + t\right)\\

\mathbf{elif}\;y \leq 2.9 \cdot 10^{+181}:\\
\;\;\;\;y \cdot i + z \cdot \left(1 + \frac{a}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < 1.3000000000000001e84

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

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

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

    if 1.3000000000000001e84 < y < 3.6000000000000001e106

    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 t around inf 55.5%

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

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

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

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

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

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

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

        \[\leadsto t \cdot \left(1 + \color{blue}{x \cdot \frac{\log y}{t}}\right) + y \cdot i \]
    8. Simplified55.9%

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

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

    if 3.6000000000000001e106 < y < 2.9e181

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

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

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

    if 2.9e181 < y

    1. Initial program 99.9%

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

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

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

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

Alternative 12: 50.5% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.16 \cdot 10^{-7}:\\
\;\;\;\;y \cdot i + z \cdot \left(1 + \frac{a}{z}\right)\\

\mathbf{elif}\;z \leq -2.7 \cdot 10^{-189}:\\
\;\;\;\;x \cdot \log y + y \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.1600000000000001e-7

    1. Initial program 99.8%

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

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

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

    if -1.1600000000000001e-7 < z < -2.6999999999999999e-189

    1. Initial program 99.8%

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

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

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

    if -2.6999999999999999e-189 < z

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.16 \cdot 10^{-7}:\\ \;\;\;\;y \cdot i + z \cdot \left(1 + \frac{a}{z}\right)\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-189}:\\ \;\;\;\;x \cdot \log y + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + a \cdot \left(1 + \frac{t}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 50.6% accurate, 13.7× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

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

    if -9.49999999999999949e121 < z

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{+121}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + a \cdot \left(1 + \frac{t}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 51.6% accurate, 13.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{-7}:\\
\;\;\;\;y \cdot i + z \cdot \left(1 + \frac{a}{z}\right)\\

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


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

    1. Initial program 99.8%

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

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

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

    if -1.85000000000000002e-7 < z

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{-7}:\\ \;\;\;\;y \cdot i + z \cdot \left(1 + \frac{a}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + a \cdot \left(1 + \frac{t}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 23.1% accurate, 16.8× speedup?

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

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

\mathbf{elif}\;z \leq -2.6 \cdot 10^{-186}:\\
\;\;\;\;y \cdot i\\

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


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

    1. Initial program 100.0%

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

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

    if -2.4499999999999999e116 < z < -2.59999999999999993e-186

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

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

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

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

    if -2.59999999999999993e-186 < z

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.45 \cdot 10^{+116}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-186}:\\ \;\;\;\;y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 41.6% accurate, 21.9× speedup?

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

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

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


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

    1. Initial program 99.9%

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

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

    if -1.90000000000000006e182 < z

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{+182}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 43.6% accurate, 21.9× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

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

    if -1.75000000000000004e120 < z

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+120}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 21.6% accurate, 36.4× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

    if -2.8000000000000002e109 < z

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

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

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

Alternative 19: 16.6% 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 14.3%

    \[\leadsto \color{blue}{a} \]
  4. Final simplification14.3%

    \[\leadsto a \]
  5. Add Preprocessing

Reproduce

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