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

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

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.5% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.20000000000000001e233 or 1.35000000000000004e233 < x

    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. Step-by-step derivation
      1. associate-+l+99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.20000000000000001e233 < x < 1.35000000000000004e233

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 99.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 4: 84.3% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 74.1% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
t_1 := a + \left(z + t\right)\\
\mathbf{if}\;i \leq -4.5 \cdot 10^{-42} \lor \neg \left(i \leq 8 \cdot 10^{+54}\right):\\
\;\;\;\;y \cdot i + t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_1 + b \cdot \log c\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -4.5e-42 or 8.0000000000000006e54 < i

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.5e-42 < i < 8.0000000000000006e54

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 60.5% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

    if 1.25000000000000003e94 < a

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 73.3% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.55 \cdot 10^{+151} \lor \neg \left(b \leq 1.55 \cdot 10^{+188}\right):\\
\;\;\;\;b \cdot \log c + \left(z + a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.5500000000000001e151 or 1.5500000000000001e188 < 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. Step-by-step derivation
      1. associate-+l+99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.5500000000000001e151 < b < 1.5500000000000001e188

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 73.0% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.8 \cdot 10^{+225} \lor \neg \left(b \leq 6 \cdot 10^{+221}\right):\\
\;\;\;\;\left(t + a\right) + b \cdot \log c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.7999999999999999e225 or 6.0000000000000003e221 < b

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7999999999999999e225 < b < 6.0000000000000003e221

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 67.6% accurate, 1.9× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;i \cdot \left(b \cdot \frac{\log c}{i}\right)\\


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\frac{b \cdot \log c}{y}} \]
    12. Step-by-step derivation
      1. associate-/l*42.8%

        \[\leadsto y \cdot \color{blue}{\left(b \cdot \frac{\log c}{y}\right)} \]
    13. Simplified42.8%

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

    if -1.00000000000000005e223 < b < 5.09999999999999966e223

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.09999999999999966e223 < 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. Step-by-step derivation
      1. associate-+l+99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto i \cdot \color{blue}{\frac{b \cdot \log c}{i}} \]
    12. Step-by-step derivation
      1. associate-/l*55.9%

        \[\leadsto i \cdot \color{blue}{\left(b \cdot \frac{\log c}{i}\right)} \]
    13. Simplified55.9%

      \[\leadsto i \cdot \color{blue}{\left(b \cdot \frac{\log c}{i}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification72.7%

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

Alternative 10: 84.2% accurate, 1.9× speedup?

\[\begin{array}{l} \\ y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(z + t\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 t)))))
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 + 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 = (y * i) + ((log(c) * (b - 0.5d0)) + (a + (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 (y * i) + ((Math.log(c) * (b - 0.5)) + (a + (z + t)));
}
def code(x, y, z, t, a, b, c, i):
	return (y * i) + ((math.log(c) * (b - 0.5)) + (a + (z + t)))
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 + t))))
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (z + t)));
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 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

Alternative 11: 60.5% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

    if 1.60000000000000007e94 < a

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 67.6% accurate, 2.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;i \cdot \left(b \cdot \frac{\log c}{i}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 5.09999999999999966e223

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.09999999999999966e223 < 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. Step-by-step derivation
      1. associate-+l+99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto i \cdot \color{blue}{\frac{b \cdot \log c}{i}} \]
    12. Step-by-step derivation
      1. associate-/l*55.9%

        \[\leadsto i \cdot \color{blue}{\left(b \cdot \frac{\log c}{i}\right)} \]
    13. Simplified55.9%

      \[\leadsto i \cdot \color{blue}{\left(b \cdot \frac{\log c}{i}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification71.0%

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

Alternative 13: 37.0% accurate, 12.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;i \leq -65000 \lor \neg \left(i \leq 5.8 \cdot 10^{-8}\right):\\
\;\;\;\;i \cdot \left(y + \frac{a}{i}\right)\\

\mathbf{else}:\\
\;\;\;\;z\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -65000 or 5.8000000000000003e-8 < i

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -65000 < i < 5.8000000000000003e-8

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -65000 \lor \neg \left(i \leq 5.8 \cdot 10^{-8}\right):\\ \;\;\;\;i \cdot \left(y + \frac{a}{i}\right)\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 25.1% accurate, 16.8× speedup?

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

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

\mathbf{elif}\;a \leq 4 \cdot 10^{+91}:\\
\;\;\;\;y \cdot i\\

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000001e-128 < a < 4.00000000000000032e91

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.00000000000000032e91 < a

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 36.0% accurate, 18.2× speedup?

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.5999999999999999e167 < a

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 67.2% accurate, 24.3× speedup?

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

\\
y \cdot i + \left(a + \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. Step-by-step derivation
    1. associate-+l+99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 21.7% accurate, 36.4× speedup?

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.19999999999999985e113 < a

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 16.1% accurate, 219.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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