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

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

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, \mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right)\right) \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (fma y i (fma (+ b -0.5) (log c) (+ (fma x (log y) z) (+ t a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return fma(y, i, fma((b + -0.5), log(c), (fma(x, log(y), z) + (t + a))));
}
function code(x, y, z, t, a, b, c, i)
	return fma(y, i, fma(Float64(b + -0.5), log(c), Float64(fma(x, log(y), z) + Float64(t + a))))
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision] + z), $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, \mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right)\right) \]

Alternative 2: 99.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(b + -0.5, \log c, a\right) + \mathsf{fma}\left(y, i, z + \mathsf{fma}\left(x, \log y, t\right)\right) \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (+ (fma (+ b -0.5) (log c) a) (fma y i (+ z (fma x (log y) t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return fma((b + -0.5), log(c), a) + fma(y, i, (z + fma(x, log(y), t)));
}
function code(x, y, z, t, a, b, c, i)
	return Float64(fma(Float64(b + -0.5), log(c), a) + fma(y, i, Float64(z + fma(x, log(y), t))))
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + a), $MachinePrecision] + N[(y * i + N[(z + N[(x * N[Log[y], $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \mathsf{fma}\left(b + -0.5, \log c, a\right) + \mathsf{fma}\left(y, i, z + \mathsf{fma}\left(x, \log y, t\right)\right) \]

Alternative 3: 81.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \log c \cdot \left(b - 0.5\right)\\ \mathbf{if}\;t_1 \leq -2 \cdot 10^{+34}:\\ \;\;\;\;\mathsf{fma}\left(\log c, b + -0.5, y \cdot i + \left(z + a\right)\right)\\ \mathbf{elif}\;t_1 \leq 500:\\ \;\;\;\;y \cdot i + \left(\left(a + \left(z + x \cdot \log y\right)\right) + -0.5 \cdot \log c\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(b \cdot \log c + \left(a + \left(z + t\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* (log c) (- b 0.5))))
   (if (<= t_1 -2e+34)
     (fma (log c) (+ b -0.5) (+ (* y i) (+ z a)))
     (if (<= t_1 500.0)
       (+ (* y i) (+ (+ a (+ z (* x (log y)))) (* -0.5 (log c))))
       (+ (* y i) (+ (* b (log c)) (+ a (+ z t))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = log(c) * (b - 0.5);
	double tmp;
	if (t_1 <= -2e+34) {
		tmp = fma(log(c), (b + -0.5), ((y * i) + (z + a)));
	} else if (t_1 <= 500.0) {
		tmp = (y * i) + ((a + (z + (x * log(y)))) + (-0.5 * log(c)));
	} else {
		tmp = (y * i) + ((b * log(c)) + (a + (z + t)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(log(c) * Float64(b - 0.5))
	tmp = 0.0
	if (t_1 <= -2e+34)
		tmp = fma(log(c), Float64(b + -0.5), Float64(Float64(y * i) + Float64(z + a)));
	elseif (t_1 <= 500.0)
		tmp = Float64(Float64(y * i) + Float64(Float64(a + Float64(z + Float64(x * log(y)))) + Float64(-0.5 * log(c))));
	else
		tmp = Float64(Float64(y * i) + Float64(Float64(b * log(c)) + Float64(a + Float64(z + t))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+34], N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 500.0], N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_1 \leq 500:\\
\;\;\;\;y \cdot i + \left(\left(a + \left(z + x \cdot \log y\right)\right) + -0.5 \cdot \log c\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (-.f64 b 1/2) (log.f64 c)) < -1.99999999999999989e34

    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. Taylor expanded in x around 0 95.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999989e34 < (*.f64 (-.f64 b 1/2) (log.f64 c)) < 500

    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. Taylor expanded in t around 0 81.8%

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

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

    if 500 < (*.f64 (-.f64 b 1/2) (log.f64 c))

    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. Taylor expanded in x around 0 96.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\log c \cdot \left(b - 0.5\right) \leq -2 \cdot 10^{+34}:\\ \;\;\;\;\mathsf{fma}\left(\log c, b + -0.5, y \cdot i + \left(z + a\right)\right)\\ \mathbf{elif}\;\log c \cdot \left(b - 0.5\right) \leq 500:\\ \;\;\;\;y \cdot i + \left(\left(a + \left(z + x \cdot \log y\right)\right) + -0.5 \cdot \log c\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(b \cdot \log c + \left(a + \left(z + t\right)\right)\right)\\ \end{array} \]

Alternative 4: 99.8% accurate, 1.0× speedup?

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

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

    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
  2. Final simplification99.9%

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

Alternative 5: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 94.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.4 \cdot 10^{+194} \lor \neg \left(x \leq 3.6 \cdot 10^{+167}\right):\\
\;\;\;\;y \cdot i + \left(x \cdot \log y + \left(a + \left(z + t\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.40000000000000005e194 or 3.60000000000000024e167 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.40000000000000005e194 < x < 3.60000000000000024e167

    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. Taylor expanded in x around 0 97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.4 \cdot 10^{+194} \lor \neg \left(x \leq 3.6 \cdot 10^{+167}\right):\\ \;\;\;\;y \cdot i + \left(x \cdot \log y + \left(a + \left(z + t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(\left(t + a\right) + \mathsf{fma}\left(\log c, b + -0.5, z\right)\right)\\ \end{array} \]

Alternative 7: 98.0% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto y \cdot i + \left(\left(a + \left(z + \left(t + x \cdot \log y\right)\right)\right) + b \cdot \log c\right) \]

Alternative 8: 84.5% accurate, 1.0× speedup?

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

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

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

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

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

Alternative 9: 82.7% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 10: 94.1% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
t_1 := a + \left(z + t\right)\\
\mathbf{if}\;x \leq -2.25 \cdot 10^{+194} \lor \neg \left(x \leq 8 \cdot 10^{+168}\right):\\
\;\;\;\;y \cdot i + \left(x \cdot \log y + t_1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.2499999999999999e194 or 7.9999999999999995e168 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.2499999999999999e194 < x < 7.9999999999999995e168

    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. Taylor expanded in x around 0 97.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.25 \cdot 10^{+194} \lor \neg \left(x \leq 8 \cdot 10^{+168}\right):\\ \;\;\;\;y \cdot i + \left(x \cdot \log y + \left(a + \left(z + t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(z + t\right)\right)\right)\\ \end{array} \]

Alternative 11: 89.2% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.6 \cdot 10^{+154} \lor \neg \left(b \leq 1.1 \cdot 10^{+185}\right):\\
\;\;\;\;a + \left(t + \left(z + b \cdot \log c\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.59999999999999989e154 or 1.1e185 < b

    1. Initial program 99.7%

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

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

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

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

    if -2.59999999999999989e154 < b < 1.1e185

    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. Taylor expanded in y around inf 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.6 \cdot 10^{+154} \lor \neg \left(b \leq 1.1 \cdot 10^{+185}\right):\\ \;\;\;\;a + \left(t + \left(z + b \cdot \log c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(x \cdot \log y + \left(a + \left(z + t\right)\right)\right)\\ \end{array} \]

Alternative 12: 80.5% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.75 \cdot 10^{+194} \lor \neg \left(x \leq 2.55 \cdot 10^{+168}\right):\\
\;\;\;\;y \cdot i + \left(x \cdot \log y + \left(a + \left(z + t\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.7499999999999999e194 or 2.55000000000000012e168 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7499999999999999e194 < x < 2.55000000000000012e168

    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. Taylor expanded in x around 0 97.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.75 \cdot 10^{+194} \lor \neg \left(x \leq 2.55 \cdot 10^{+168}\right):\\ \;\;\;\;y \cdot i + \left(x \cdot \log y + \left(a + \left(z + t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(z + a\right)\right)\\ \end{array} \]

Alternative 13: 75.6% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.4 \cdot 10^{+154} \lor \neg \left(b \leq 6.2 \cdot 10^{+170}\right):\\
\;\;\;\;a + \left(t + \left(z + b \cdot \log c\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -8.39999999999999977e154 or 6.2e170 < b

    1. Initial program 99.7%

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

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

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

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

    if -8.39999999999999977e154 < b < 6.2e170

    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. Taylor expanded in x around 0 88.7%

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

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

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

        \[\leadsto a + \color{blue}{\left(\left(t + z\right) + i \cdot y\right)} \]
      2. *-commutative84.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -8.4 \cdot 10^{+154} \lor \neg \left(b \leq 6.2 \cdot 10^{+170}\right):\\ \;\;\;\;a + \left(t + \left(z + b \cdot \log c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(y \cdot i + \left(z + t\right)\right)\\ \end{array} \]

Alternative 14: 72.6% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.6 \cdot 10^{+136}:\\
\;\;\;\;a + \left(y \cdot i + \left(z + t\right)\right)\\

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


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

    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. Taylor expanded in x around 0 91.0%

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

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

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

        \[\leadsto a + \color{blue}{\left(\left(t + z\right) + i \cdot y\right)} \]
      2. *-commutative85.8%

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

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

    if -8.5999999999999997e136 < z

    1. Initial program 99.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.6 \cdot 10^{+136}:\\ \;\;\;\;a + \left(y \cdot i + \left(z + t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(\left(t + a\right) + b \cdot \log c\right)\\ \end{array} \]

Alternative 15: 74.1% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.4 \cdot 10^{+165} \lor \neg \left(b \leq 7.6 \cdot 10^{+201}\right):\\
\;\;\;\;y \cdot i + b \cdot \log c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -5.3999999999999999e165 or 7.59999999999999991e201 < b

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.3999999999999999e165 < b < 7.59999999999999991e201

    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. Taylor expanded in x around 0 88.9%

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

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

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

        \[\leadsto a + \color{blue}{\left(\left(t + z\right) + i \cdot y\right)} \]
      2. *-commutative84.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.4 \cdot 10^{+165} \lor \neg \left(b \leq 7.6 \cdot 10^{+201}\right):\\ \;\;\;\;y \cdot i + b \cdot \log c\\ \mathbf{else}:\\ \;\;\;\;a + \left(y \cdot i + \left(z + t\right)\right)\\ \end{array} \]

Alternative 16: 73.9% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
t_1 := b \cdot \log c\\
\mathbf{if}\;b \leq -7.6 \cdot 10^{+165}:\\
\;\;\;\;y \cdot i + t_1\\

\mathbf{elif}\;b \leq 4 \cdot 10^{+189}:\\
\;\;\;\;a + \left(y \cdot i + \left(z + t\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(t + a\right) + t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -7.59999999999999981e165

    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. Taylor expanded in y around inf 99.7%

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

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

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

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

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

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

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

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

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

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

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

    if -7.59999999999999981e165 < b < 4.0000000000000001e189

    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. Taylor expanded in x around 0 88.8%

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

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

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

        \[\leadsto a + \color{blue}{\left(\left(t + z\right) + i \cdot y\right)} \]
      2. *-commutative84.6%

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

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

    if 4.0000000000000001e189 < b

    1. Initial program 99.7%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(a + t\right) + \log c \cdot b} \]
      2. +-commutative74.4%

        \[\leadsto \color{blue}{\left(t + a\right)} + \log c \cdot b \]
    9. Simplified74.4%

      \[\leadsto \color{blue}{\left(t + a\right) + \log c \cdot b} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification82.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -7.6 \cdot 10^{+165}:\\ \;\;\;\;y \cdot i + b \cdot \log c\\ \mathbf{elif}\;b \leq 4 \cdot 10^{+189}:\\ \;\;\;\;a + \left(y \cdot i + \left(z + t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t + a\right) + b \cdot \log c\\ \end{array} \]

Alternative 17: 70.7% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.8 \cdot 10^{+166} \lor \neg \left(b \leq 1.8 \cdot 10^{+236}\right):\\
\;\;\;\;b \cdot \log c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.79999999999999984e166 or 1.8e236 < b

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.79999999999999984e166 < b < 1.8e236

    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. Taylor expanded in x around 0 89.2%

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

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

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

        \[\leadsto a + \color{blue}{\left(\left(t + z\right) + i \cdot y\right)} \]
      2. *-commutative84.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.8 \cdot 10^{+166} \lor \neg \left(b \leq 1.8 \cdot 10^{+236}\right):\\ \;\;\;\;b \cdot \log c\\ \mathbf{else}:\\ \;\;\;\;a + \left(y \cdot i + \left(z + t\right)\right)\\ \end{array} \]

Alternative 18: 55.9% accurate, 24.2× speedup?

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

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

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


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

    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. Taylor expanded in z around inf 66.1%

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

    if -9.49999999999999907e136 < z

    1. Initial program 99.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(a + t\right)} + y \cdot i \]
    8. Step-by-step derivation
      1. +-commutative61.9%

        \[\leadsto \color{blue}{\left(t + a\right)} + y \cdot i \]
    9. Simplified61.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{+136}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;\left(t + a\right) + y \cdot i\\ \end{array} \]

Alternative 19: 67.0% accurate, 24.3× speedup?

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

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

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

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

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

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

      \[\leadsto a + \color{blue}{\left(\left(t + z\right) + i \cdot y\right)} \]
    2. *-commutative73.6%

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

    \[\leadsto \color{blue}{a + \left(\left(t + z\right) + y \cdot i\right)} \]
  7. Final simplification73.6%

    \[\leadsto a + \left(y \cdot i + \left(z + t\right)\right) \]

Alternative 20: 23.8% accurate, 30.7× speedup?

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

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

\mathbf{elif}\;a \leq 1.26 \cdot 10^{+151}:\\
\;\;\;\;y \cdot i\\

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


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

    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. Taylor expanded in y around inf 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.3000000000000001e-230 < a < 1.26000000000000006e151

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot i} \]
    6. Simplified37.0%

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

    if 1.26000000000000006e151 < 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. Taylor expanded in y around inf 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 1.3 \cdot 10^{-230}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq 1.26 \cdot 10^{+151}:\\ \;\;\;\;y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]

Alternative 21: 40.9% accurate, 31.0× speedup?

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

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

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


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

    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. Taylor expanded in y around inf 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.02e208 < z

    1. Initial program 99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.02 \cdot 10^{+208}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \]

Alternative 22: 42.9% accurate, 31.0× speedup?

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

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

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


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

    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. Taylor expanded in z around inf 66.1%

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

    if -7.1999999999999999e137 < z

    1. Initial program 99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{+137}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \]

Alternative 23: 20.9% accurate, 71.5× speedup?

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

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

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


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

    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. Taylor expanded in y around inf 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.79999999999999969e137 < z

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+137}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]

Alternative 24: 15.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.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. Taylor expanded in y around inf 99.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{a} \]
  7. Final simplification16.7%

    \[\leadsto a \]

Reproduce

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