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

Percentage Accurate: 99.8% → 99.9%
Time: 16.7s
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.9% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 93.1% accurate, 1.0× speedup?

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

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

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

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


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

    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. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.4000000000000004e127 < x < 1.35e209

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

    if 1.35e209 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 99.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 4: 93.7% accurate, 1.0× speedup?

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

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

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

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


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

    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. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.0000000000000005e126 < x < 1.35e209

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

    if 1.35e209 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 84.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 89.3% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -4 \cdot 10^{+157} \lor \neg \left(b - 0.5 \leq 8 \cdot 10^{+124}\right):\\
\;\;\;\;y \cdot i + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 b 1/2) < -3.99999999999999993e157 or 7.99999999999999959e124 < (-.f64 b 1/2)

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

    if -3.99999999999999993e157 < (-.f64 b 1/2) < 7.99999999999999959e124

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 93.7% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{+126} \lor \neg \left(x \leq 1.35 \cdot 10^{+209}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(x \cdot \log y + \left(z + t\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9.99999999999999925e125 or 1.35e209 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.99999999999999925e125 < x < 1.35e209

    1. Initial program 99.9%

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

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

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

Alternative 8: 93.7% accurate, 1.8× speedup?

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

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

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

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


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

    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. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.4200000000000001e125 < x < 1.35e209

    1. Initial program 99.9%

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

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

    if 1.35e209 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.42 \cdot 10^{+125}:\\ \;\;\;\;a + \left(t + \left(z + \left(y \cdot i - x \cdot \log \left(\frac{1}{y}\right)\right)\right)\right)\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{+209}:\\ \;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(z + t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(a + \left(x \cdot \log y + \left(z + t\right)\right)\right)\\ \end{array} \]

Alternative 9: 61.7% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

    if 6.0999999999999998e29 < a

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 72.7% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \cdot 10^{+144} \lor \neg \left(x \leq 8 \cdot 10^{+211}\right):\\
\;\;\;\;y \cdot i + x \cdot \log y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.1999999999999998e144 or 7.9999999999999997e211 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.1999999999999998e144 < x < 7.9999999999999997e211

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.2 \cdot 10^{+144} \lor \neg \left(x \leq 8 \cdot 10^{+211}\right):\\ \;\;\;\;y \cdot i + x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;\left(a + t\right) + \left(z + y \cdot i\right)\\ \end{array} \]

Alternative 11: 73.2% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 135000:\\
\;\;\;\;a + \left(x \cdot \log y + \left(z + t\right)\right)\\

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 135000 < 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. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 135000:\\ \;\;\;\;a + \left(x \cdot \log y + \left(z + t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + t\right) + \left(z + y \cdot i\right)\\ \end{array} \]

Alternative 12: 72.7% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.3 \cdot 10^{+157} \lor \neg \left(b \leq 7.6 \cdot 10^{+230}\right):\\
\;\;\;\;z + b \cdot \log c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.3e157 or 7.6e230 < b

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.3e157 < b < 7.6e230

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 64.8% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 11200:\\
\;\;\;\;\left(z + a\right) + b \cdot \log c\\

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 11200 < 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. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 68.8% accurate, 2.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.6 \cdot 10^{+233}:\\
\;\;\;\;b \cdot \log c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.60000000000000006e233

    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. +-commutative100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \color{blue}{\log c \cdot b} \]
    5. Taylor expanded in b around inf 77.8%

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

    if -2.60000000000000006e233 < b

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 22.5% accurate, 19.5× speedup?

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

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

\mathbf{elif}\;z \leq -1.4 \cdot 10^{+134}:\\
\;\;\;\;a\\

\mathbf{elif}\;z \leq -5.3 \cdot 10^{+113}:\\
\;\;\;\;z\\

\mathbf{elif}\;z \leq -4.1 \cdot 10^{-199}:\\
\;\;\;\;y \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.4000000000000001e176 or -1.3999999999999999e134 < z < -5.29999999999999967e113

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.4000000000000001e176 < z < -1.3999999999999999e134 or -4.10000000000000022e-199 < 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. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.29999999999999967e113 < z < -4.10000000000000022e-199

    1. Initial program 99.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+176}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -1.4 \cdot 10^{+134}:\\ \;\;\;\;a\\ \mathbf{elif}\;z \leq -5.3 \cdot 10^{+113}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -4.1 \cdot 10^{-199}:\\ \;\;\;\;y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]

Alternative 16: 66.2% accurate, 24.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 41.0% accurate, 31.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{+111}:\\
\;\;\;\;z + a\\

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.09999999999999986e111 < 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. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 41.8% accurate, 31.0× speedup?

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.95000000000000015e175 < 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. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 51.8% accurate, 31.3× speedup?

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

\\
\left(z + a\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. Step-by-step derivation
    1. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 20: 39.9% accurate, 43.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 9 \cdot 10^{+88}:\\
\;\;\;\;z + a\\

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9e88 < 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. Taylor expanded in x around 0 91.9%

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

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

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

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

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

Alternative 21: 20.5% accurate, 71.5× speedup?

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.19999999999999968e175 < 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. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 22: 15.6% accurate, 219.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto a \]

Reproduce

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