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

Percentage Accurate: 99.8% → 99.8%
Time: 15.5s
Alternatives: 22
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 22 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: 93.1% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;x \leq 1.1 \cdot 10^{+102}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \left(b + -0.5\right) \cdot \log c + \left(z + \left(t + a\right)\right)\right)\\

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


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

    1. Initial program 100.0%

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

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

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

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

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)} + y \cdot i \]
    7. Step-by-step derivation
      1. +-commutative94.1%

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

        \[\leadsto \left(a + \left(\color{blue}{\left(x \cdot \log y + z\right)} + t\right)\right) + y \cdot i \]
      3. associate-+r+94.1%

        \[\leadsto \left(a + \color{blue}{\left(x \cdot \log y + \left(z + t\right)\right)}\right) + y \cdot i \]
      4. fma-undefine94.1%

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

        \[\leadsto \left(a + \mathsf{fma}\left(x, \log y, \color{blue}{t + z}\right)\right) + y \cdot i \]
    8. Simplified94.1%

      \[\leadsto \color{blue}{\left(a + \mathsf{fma}\left(x, \log y, t + z\right)\right)} + y \cdot i \]
    9. Taylor expanded in t around 0 84.9%

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

    if -4.69999999999999998e109 < x < 1.10000000000000004e102

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.10000000000000004e102 < x

    1. Initial program 99.9%

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

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

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

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

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

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

        \[\leadsto \left(a + \left(\color{blue}{\left(x \cdot \log y + z\right)} + t\right)\right) + y \cdot i \]
      3. associate-+r+97.6%

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

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

        \[\leadsto \left(a + \mathsf{fma}\left(x, \log y, \color{blue}{t + z}\right)\right) + y \cdot i \]
    8. Simplified97.7%

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

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

Alternative 3: 98.6% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 3.9999999999999999e-121

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

      \[\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 3.9999999999999999e-121 < y

    1. Initial program 99.9%

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

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

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

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

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

Alternative 4: 93.1% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 100.0%

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

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

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

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

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)} + y \cdot i \]
    7. Step-by-step derivation
      1. +-commutative94.1%

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

        \[\leadsto \left(a + \left(\color{blue}{\left(x \cdot \log y + z\right)} + t\right)\right) + y \cdot i \]
      3. associate-+r+94.1%

        \[\leadsto \left(a + \color{blue}{\left(x \cdot \log y + \left(z + t\right)\right)}\right) + y \cdot i \]
      4. fma-undefine94.1%

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

        \[\leadsto \left(a + \mathsf{fma}\left(x, \log y, \color{blue}{t + z}\right)\right) + y \cdot i \]
    8. Simplified94.1%

      \[\leadsto \color{blue}{\left(a + \mathsf{fma}\left(x, \log y, t + z\right)\right)} + y \cdot i \]
    9. Taylor expanded in t around 0 84.9%

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

    if -1.90000000000000019e109 < x < 2.00000000000000003e100

    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. fma-define99.9%

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

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

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

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

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

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

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

    if 2.00000000000000003e100 < x

    1. Initial program 99.9%

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

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

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

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

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

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

        \[\leadsto \left(a + \left(\color{blue}{\left(x \cdot \log y + z\right)} + t\right)\right) + y \cdot i \]
      3. associate-+r+97.6%

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

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

        \[\leadsto \left(a + \mathsf{fma}\left(x, \log y, \color{blue}{t + z}\right)\right) + y \cdot i \]
    8. Simplified97.7%

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

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

Alternative 5: 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(\left(b + 0.5\right) + -1\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) -1.0)))
  (* 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) + -1.0))) + (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) + (-1.0d0)))) + (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) + -1.0))) + (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) + -1.0))) + (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(Float64(b + 0.5) + -1.0))) + 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) + -1.0))) + (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[(N[(b + 0.5), $MachinePrecision] + -1.0), $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(\left(b + 0.5\right) + -1\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. Step-by-step derivation
    1. sub-neg99.9%

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

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

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

    \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(b + -0.5\right)\right)} \cdot \log c\right) + y \cdot i \]
  5. Step-by-step derivation
    1. expm1-define76.0%

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\left(e^{\mathsf{log1p}\left(b + -0.5\right)} - 1\right)} \cdot \log c\right) + y \cdot i \]
    2. sub-neg76.0%

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

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

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

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

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

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

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

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

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

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

Alternative 6: 90.7% accurate, 1.0× speedup?

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

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

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


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

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

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

    if 0.0179999999999999986 < y

    1. Initial program 99.9%

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

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

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

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

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

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

        \[\leadsto \left(a + \left(\color{blue}{\left(x \cdot \log y + z\right)} + t\right)\right) + y \cdot i \]
      3. associate-+r+94.4%

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

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

        \[\leadsto \left(a + \mathsf{fma}\left(x, \log y, \color{blue}{t + z}\right)\right) + y \cdot i \]
    8. Simplified94.4%

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

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

Alternative 7: 99.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 8: 91.5% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.8 \cdot 10^{+109} \lor \neg \left(x \leq 6.5 \cdot 10^{+104}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.80000000000000013e109 or 6.5000000000000005e104 < x

    1. Initial program 99.9%

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

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

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

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

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)} + y \cdot i \]
    7. Step-by-step derivation
      1. +-commutative96.1%

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

        \[\leadsto \left(a + \left(\color{blue}{\left(x \cdot \log y + z\right)} + t\right)\right) + y \cdot i \]
      3. associate-+r+96.1%

        \[\leadsto \left(a + \color{blue}{\left(x \cdot \log y + \left(z + t\right)\right)}\right) + y \cdot i \]
      4. fma-undefine96.1%

        \[\leadsto \left(a + \color{blue}{\mathsf{fma}\left(x, \log y, z + t\right)}\right) + y \cdot i \]
      5. +-commutative96.1%

        \[\leadsto \left(a + \mathsf{fma}\left(x, \log y, \color{blue}{t + z}\right)\right) + y \cdot i \]
    8. Simplified96.1%

      \[\leadsto \color{blue}{\left(a + \mathsf{fma}\left(x, \log y, t + z\right)\right)} + y \cdot i \]
    9. Taylor expanded in t around 0 88.5%

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

    if -6.80000000000000013e109 < x < 6.5000000000000005e104

    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. fma-define99.9%

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

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

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

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

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

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

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

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

Alternative 9: 75.1% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -5 \cdot 10^{+131} \lor \neg \left(b - 0.5 \leq 4 \cdot 10^{+227}\right):\\
\;\;\;\;a + \left(y \cdot i + \left(b + -0.5\right) \cdot \log c\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 b #s(literal 1/2 binary64)) < -4.99999999999999995e131 or 4.0000000000000004e227 < (-.f64 b #s(literal 1/2 binary64))

    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. fma-define99.7%

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

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

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

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

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

    if -4.99999999999999995e131 < (-.f64 b #s(literal 1/2 binary64)) < 4.0000000000000004e227

    1. Initial program 100.0%

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

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

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

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

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

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

        \[\leadsto \left(a + \left(\color{blue}{\left(x \cdot \log y + z\right)} + t\right)\right) + y \cdot i \]
      3. associate-+r+94.6%

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

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

        \[\leadsto \left(a + \mathsf{fma}\left(x, \log y, \color{blue}{t + z}\right)\right) + y \cdot i \]
    8. Simplified94.6%

      \[\leadsto \color{blue}{\left(a + \mathsf{fma}\left(x, \log y, t + z\right)\right)} + y \cdot i \]
    9. Taylor expanded in x around 0 75.4%

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

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

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

        \[\leadsto \left(a + t\right) + \left(\color{blue}{y \cdot i} + z\right) \]
      4. fma-define75.4%

        \[\leadsto \left(a + t\right) + \color{blue}{\mathsf{fma}\left(y, i, z\right)} \]
    11. Simplified75.4%

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

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

Alternative 10: 89.1% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.8 \cdot 10^{+169} \lor \neg \left(b \leq 2.6 \cdot 10^{+227}\right):\\
\;\;\;\;a + \left(y \cdot i + \left(b + -0.5\right) \cdot \log c\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -8.8000000000000001e169 or 2.59999999999999982e227 < 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. fma-define99.8%

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

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

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

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

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

    if -8.8000000000000001e169 < b < 2.59999999999999982e227

    1. Initial program 99.9%

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

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

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

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

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

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

Alternative 11: 58.6% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;z \leq -1.36 \cdot 10^{+104}:\\
\;\;\;\;a + \left(z + t\right)\\

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

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


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

    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. sub-neg99.9%

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

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

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

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

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

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

    if -1.90000000000000001e217 < z < -1.3599999999999999e104

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

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

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

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

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

      \[\leadsto a \cdot \left(\frac{t}{a} + \left(\color{blue}{\frac{z}{a}} + 1\right)\right) \]
    9. Taylor expanded in a around 0 62.0%

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

    if -1.3599999999999999e104 < z < -9.60000000000000053e56

    1. Initial program 100.0%

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

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

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

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

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

    if -9.60000000000000053e56 < z

    1. Initial program 99.9%

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

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

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

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

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)} + y \cdot i \]
    7. Step-by-step derivation
      1. +-commutative85.7%

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

        \[\leadsto \left(a + \left(\color{blue}{\left(x \cdot \log y + z\right)} + t\right)\right) + y \cdot i \]
      3. associate-+r+85.7%

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

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

        \[\leadsto \left(a + \mathsf{fma}\left(x, \log y, \color{blue}{t + z}\right)\right) + y \cdot i \]
    8. Simplified85.7%

      \[\leadsto \color{blue}{\left(a + \mathsf{fma}\left(x, \log y, t + z\right)\right)} + y \cdot i \]
    9. Taylor expanded in t around inf 70.0%

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

        \[\leadsto \left(a + t \cdot \left(1 + \left(\frac{z}{t} + \color{blue}{x \cdot \frac{\log y}{t}}\right)\right)\right) + y \cdot i \]
    11. Simplified69.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{+217}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{elif}\;z \leq -1.36 \cdot 10^{+104}:\\ \;\;\;\;a + \left(z + t\right)\\ \mathbf{elif}\;z \leq -9.6 \cdot 10^{+56}:\\ \;\;\;\;x \cdot \log y + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(a + t \cdot \left(1 + \frac{z}{t}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 76.8% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;b \leq 7.8 \cdot 10^{+185}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\right)\right)\\

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


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

    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. fma-define99.8%

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

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

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

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

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

    if -4.7999999999999997e169 < b < 7.7999999999999997e185

    1. Initial program 99.9%

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

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

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

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

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

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

        \[\leadsto \left(a + \left(\color{blue}{\left(x \cdot \log y + z\right)} + t\right)\right) + y \cdot i \]
      3. associate-+r+94.4%

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

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

        \[\leadsto \left(a + \mathsf{fma}\left(x, \log y, \color{blue}{t + z}\right)\right) + y \cdot i \]
    8. Simplified94.4%

      \[\leadsto \color{blue}{\left(a + \mathsf{fma}\left(x, \log y, t + z\right)\right)} + y \cdot i \]
    9. Taylor expanded in t around 0 75.3%

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

    if 7.7999999999999997e185 < 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. fma-define99.8%

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

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

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

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

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

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

Alternative 13: 73.9% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.05 \cdot 10^{+177} \lor \neg \left(x \leq 3.5 \cdot 10^{+205}\right):\\
\;\;\;\;x \cdot \log y + y \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.05000000000000006e177 or 3.4999999999999998e205 < x

    1. Initial program 99.9%

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

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

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

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

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

    if -1.05000000000000006e177 < x < 3.4999999999999998e205

    1. Initial program 99.9%

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

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

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

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

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

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

        \[\leadsto \left(a + \left(\color{blue}{\left(x \cdot \log y + z\right)} + t\right)\right) + y \cdot i \]
      3. associate-+r+81.5%

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

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

        \[\leadsto \left(a + \mathsf{fma}\left(x, \log y, \color{blue}{t + z}\right)\right) + y \cdot i \]
    8. Simplified81.5%

      \[\leadsto \color{blue}{\left(a + \mathsf{fma}\left(x, \log y, t + z\right)\right)} + y \cdot i \]
    9. Taylor expanded in x around 0 75.7%

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

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

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

        \[\leadsto \left(a + t\right) + \left(\color{blue}{y \cdot i} + z\right) \]
      4. fma-define75.7%

        \[\leadsto \left(a + t\right) + \color{blue}{\mathsf{fma}\left(y, i, z\right)} \]
    11. Simplified75.7%

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

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

Alternative 14: 62.2% accurate, 1.9× speedup?

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

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

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


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

    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. fma-define99.9%

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

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

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

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

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

    if 3.90000000000000019e68 < a

    1. Initial program 100.0%

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

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

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

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

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

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

        \[\leadsto \left(a + \left(\color{blue}{\left(x \cdot \log y + z\right)} + t\right)\right) + y \cdot i \]
      3. associate-+r+90.3%

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

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

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

      \[\leadsto \color{blue}{\left(a + \mathsf{fma}\left(x, \log y, t + z\right)\right)} + y \cdot i \]
    9. Taylor expanded in x around 0 80.9%

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

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

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

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

        \[\leadsto \left(a + t\right) + \color{blue}{\mathsf{fma}\left(y, i, z\right)} \]
    11. Simplified80.9%

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

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

Alternative 15: 59.2% accurate, 9.5× speedup?

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

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

\mathbf{elif}\;z \leq -6.8 \cdot 10^{+104}:\\
\;\;\;\;a + \left(z + t\right)\\

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


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

    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. sub-neg99.9%

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

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

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

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

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

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

    if -3.4500000000000001e218 < z < -6.7999999999999994e104

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

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

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

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

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

      \[\leadsto a \cdot \left(\frac{t}{a} + \left(\color{blue}{\frac{z}{a}} + 1\right)\right) \]
    9. Taylor expanded in a around 0 62.0%

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

    if -6.7999999999999994e104 < z

    1. Initial program 99.9%

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

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

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

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

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

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

        \[\leadsto \left(a + \left(\color{blue}{\left(x \cdot \log y + z\right)} + t\right)\right) + y \cdot i \]
      3. associate-+r+85.3%

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

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

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

      \[\leadsto \color{blue}{\left(a + \mathsf{fma}\left(x, \log y, t + z\right)\right)} + y \cdot i \]
    9. Taylor expanded in t around inf 69.2%

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

        \[\leadsto \left(a + t \cdot \left(1 + \left(\frac{z}{t} + \color{blue}{x \cdot \frac{\log y}{t}}\right)\right)\right) + y \cdot i \]
    11. Simplified68.7%

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

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

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

Alternative 16: 44.2% accurate, 14.6× speedup?

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

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

\mathbf{elif}\;z \leq -5.8 \cdot 10^{+70}:\\
\;\;\;\;a + \left(z + t\right)\\

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


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

    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. sub-neg99.9%

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

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

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

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

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

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

    if -4.49999999999999988e217 < z < -5.7999999999999997e70

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

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

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

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

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

      \[\leadsto a \cdot \left(\frac{t}{a} + \left(\color{blue}{\frac{z}{a}} + 1\right)\right) \]
    9. Taylor expanded in a around 0 56.5%

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

    if -5.7999999999999997e70 < z

    1. Initial program 99.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+217}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{elif}\;z \leq -5.8 \cdot 10^{+70}:\\ \;\;\;\;a + \left(z + t\right)\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 33.9% accurate, 16.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.4 \cdot 10^{-68}:\\
\;\;\;\;z + t\\

\mathbf{elif}\;a \leq 1.65 \cdot 10^{+100}:\\
\;\;\;\;y \cdot i\\

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


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

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

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

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

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

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

      \[\leadsto a \cdot \left(\frac{t}{a} + \left(\color{blue}{\frac{z}{a}} + 1\right)\right) \]
    9. Taylor expanded in a around 0 32.0%

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

    if 1.4000000000000001e-68 < a < 1.6500000000000001e100

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

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

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

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

    if 1.6500000000000001e100 < 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 100.0%

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

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

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

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

      \[\leadsto a \cdot \left(\frac{t}{a} + \left(\color{blue}{\frac{z}{a}} + 1\right)\right) \]
    9. Taylor expanded in z around 0 55.1%

      \[\leadsto \color{blue}{a \cdot \left(1 + \frac{t}{a}\right)} \]
    10. Taylor expanded in a around 0 55.1%

      \[\leadsto \color{blue}{a + t} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification34.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 1.4 \cdot 10^{-68}:\\ \;\;\;\;z + t\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{+100}:\\ \;\;\;\;y \cdot i\\ \mathbf{else}:\\ \;\;\;\;t + a\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 44.0% accurate, 21.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{+71}:\\
\;\;\;\;a + \left(z + t\right)\\

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


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

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

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

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

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

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

      \[\leadsto a \cdot \left(\frac{t}{a} + \left(\color{blue}{\frac{z}{a}} + 1\right)\right) \]
    9. Taylor expanded in a around 0 59.1%

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

    if -4.29999999999999984e71 < z

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

Alternative 19: 42.5% accurate, 21.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+140}:\\
\;\;\;\;z + t\\

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


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

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

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

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

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

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

      \[\leadsto a \cdot \left(\frac{t}{a} + \left(\color{blue}{\frac{z}{a}} + 1\right)\right) \]
    9. Taylor expanded in a around 0 53.7%

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

    if -6.4999999999999999e140 < z

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

Alternative 20: 29.6% accurate, 27.3× speedup?

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

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

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


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

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

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

        \[\leadsto \color{blue}{y \cdot i} \]
    7. Simplified27.0%

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

    if 2.40000000000000012e100 < 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 100.0%

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

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

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

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

      \[\leadsto a \cdot \left(\frac{t}{a} + \left(\color{blue}{\frac{z}{a}} + 1\right)\right) \]
    9. Taylor expanded in z around 0 55.1%

      \[\leadsto \color{blue}{a \cdot \left(1 + \frac{t}{a}\right)} \]
    10. Taylor expanded in a around 0 55.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 2.4 \cdot 10^{+100}:\\ \;\;\;\;y \cdot i\\ \mathbf{else}:\\ \;\;\;\;t + a\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 27.8% accurate, 27.3× speedup?

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

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

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


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

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

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

        \[\leadsto \color{blue}{y \cdot i} \]
    7. Simplified27.0%

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

    if 2.0999999999999999e100 < 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 100.0%

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

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

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

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

      \[\leadsto a \cdot \left(\frac{t}{a} + \left(\color{blue}{\frac{z}{a}} + 1\right)\right) \]
    9. Taylor expanded in a around inf 45.8%

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

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

Alternative 22: 16.7% 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 72.6%

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

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

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

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

    \[\leadsto a \cdot \left(\frac{t}{a} + \left(\color{blue}{\frac{z}{a}} + 1\right)\right) \]
  9. Taylor expanded in a around inf 15.5%

    \[\leadsto a \cdot \color{blue}{1} \]
  10. Final simplification15.5%

    \[\leadsto a \]
  11. Add Preprocessing

Reproduce

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