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

Percentage Accurate: 99.8% → 99.8%
Time: 21.0s
Alternatives: 22
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 22 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 95.1% accurate, 0.5× speedup?

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

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

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

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


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

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

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

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

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

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

    if -3.99999999999999991e102 < (*.f64 (-.f64 b 1/2) (log.f64 c)) < 1.9999999999999999e45

    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 0 99.3%

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

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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 88.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -9.5 \cdot 10^{+176}:\\
\;\;\;\;y \cdot i + t_1\\

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

\mathbf{elif}\;x \leq -2.6 \cdot 10^{+114} \lor \neg \left(x \leq 3.5 \cdot 10^{+210}\right):\\
\;\;\;\;t_1 + \left(a + \left(z + -0.5 \cdot \log c\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -9.4999999999999995e176

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.4999999999999995e176 < x < -3.74999999999999987e143

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

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

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

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

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

    if -3.74999999999999987e143 < x < -2.6e114 or 3.5e210 < x

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 0 99.5%

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

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

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

    if -2.6e114 < x < 3.5e210

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{+176}:\\ \;\;\;\;y \cdot i + x \cdot \log y\\ \mathbf{elif}\;x \leq -3.75 \cdot 10^{+143}:\\ \;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(z + \left(t + a\right)\right)\right)\\ \mathbf{elif}\;x \leq -2.6 \cdot 10^{+114} \lor \neg \left(x \leq 3.5 \cdot 10^{+210}\right):\\ \;\;\;\;x \cdot \log y + \left(a + \left(z + -0.5 \cdot \log c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t + \mathsf{fma}\left(b + -0.5, \log c, y \cdot i + \left(a + z\right)\right)\\ \end{array} \]

Alternative 4: 88.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -9.2 \cdot 10^{+176}:\\
\;\;\;\;y \cdot i + t_1\\

\mathbf{elif}\;x \leq -9.8 \cdot 10^{+143} \lor \neg \left(x \leq -8.2 \cdot 10^{+113}\right) \land x \leq 9 \cdot 10^{+211}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(z + \left(t + a\right)\right)\right)\\

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


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

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.19999999999999984e176 < x < -9.79999999999999971e143 or -8.19999999999999985e113 < x < 9e211

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

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

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

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

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

    if -9.79999999999999971e143 < x < -8.19999999999999985e113 or 9e211 < x

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 0 99.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.2 \cdot 10^{+176}:\\ \;\;\;\;y \cdot i + x \cdot \log y\\ \mathbf{elif}\;x \leq -9.8 \cdot 10^{+143} \lor \neg \left(x \leq -8.2 \cdot 10^{+113}\right) \land x \leq 9 \cdot 10^{+211}:\\ \;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(z + \left(t + a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \log y + \left(a + \left(z + -0.5 \cdot \log c\right)\right)\\ \end{array} \]

Alternative 5: 88.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.4 \cdot 10^{+94} \lor \neg \left(x \leq 2.15 \cdot 10^{-6}\right):\\
\;\;\;\;\left(a + z\right) + \left(y \cdot i + \left(x \cdot \log y + -0.5 \cdot \log c\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.40000000000000028e94 or 2.15000000000000017e-6 < x

    1. Initial program 99.7%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. 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 0 91.3%

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

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

    if -6.40000000000000028e94 < x < 2.15000000000000017e-6

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 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.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. Final simplification99.8%

    \[\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 7: 89.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -1.65 \cdot 10^{+128}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + t_1\right)\\

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

    if -1.65e128 < x < 3.5e210

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.5e210 < x

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 0 99.4%

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

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

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

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

Alternative 8: 66.6% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \left(a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\ t_2 := y \cdot i + x \cdot \log y\\ \mathbf{if}\;x \leq -8.8 \cdot 10^{+175}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -3.35 \cdot 10^{-93}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{-164}:\\ \;\;\;\;y \cdot i + \left(z + -0.5 \cdot \log c\right)\\ \mathbf{elif}\;x \leq 4.7 \cdot 10^{+21} \lor \neg \left(x \leq 8.6 \cdot 10^{+90}\right) \land x \leq 7.5 \cdot 10^{+176}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ t (+ a (+ z (* (log c) (- b 0.5))))))
        (t_2 (+ (* y i) (* x (log y)))))
   (if (<= x -8.8e+175)
     t_2
     (if (<= x -3.35e-93)
       t_1
       (if (<= x -1.9e-164)
         (+ (* y i) (+ z (* -0.5 (log c))))
         (if (or (<= x 4.7e+21) (and (not (<= x 8.6e+90)) (<= x 7.5e+176)))
           t_1
           t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = t + (a + (z + (log(c) * (b - 0.5))));
	double t_2 = (y * i) + (x * log(y));
	double tmp;
	if (x <= -8.8e+175) {
		tmp = t_2;
	} else if (x <= -3.35e-93) {
		tmp = t_1;
	} else if (x <= -1.9e-164) {
		tmp = (y * i) + (z + (-0.5 * log(c)));
	} else if ((x <= 4.7e+21) || (!(x <= 8.6e+90) && (x <= 7.5e+176))) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t + (a + (z + (log(c) * (b - 0.5d0))))
    t_2 = (y * i) + (x * log(y))
    if (x <= (-8.8d+175)) then
        tmp = t_2
    else if (x <= (-3.35d-93)) then
        tmp = t_1
    else if (x <= (-1.9d-164)) then
        tmp = (y * i) + (z + ((-0.5d0) * log(c)))
    else if ((x <= 4.7d+21) .or. (.not. (x <= 8.6d+90)) .and. (x <= 7.5d+176)) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = t + (a + (z + (Math.log(c) * (b - 0.5))));
	double t_2 = (y * i) + (x * Math.log(y));
	double tmp;
	if (x <= -8.8e+175) {
		tmp = t_2;
	} else if (x <= -3.35e-93) {
		tmp = t_1;
	} else if (x <= -1.9e-164) {
		tmp = (y * i) + (z + (-0.5 * Math.log(c)));
	} else if ((x <= 4.7e+21) || (!(x <= 8.6e+90) && (x <= 7.5e+176))) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = t + (a + (z + (math.log(c) * (b - 0.5))))
	t_2 = (y * i) + (x * math.log(y))
	tmp = 0
	if x <= -8.8e+175:
		tmp = t_2
	elif x <= -3.35e-93:
		tmp = t_1
	elif x <= -1.9e-164:
		tmp = (y * i) + (z + (-0.5 * math.log(c)))
	elif (x <= 4.7e+21) or (not (x <= 8.6e+90) and (x <= 7.5e+176)):
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(t + Float64(a + Float64(z + Float64(log(c) * Float64(b - 0.5)))))
	t_2 = Float64(Float64(y * i) + Float64(x * log(y)))
	tmp = 0.0
	if (x <= -8.8e+175)
		tmp = t_2;
	elseif (x <= -3.35e-93)
		tmp = t_1;
	elseif (x <= -1.9e-164)
		tmp = Float64(Float64(y * i) + Float64(z + Float64(-0.5 * log(c))));
	elseif ((x <= 4.7e+21) || (!(x <= 8.6e+90) && (x <= 7.5e+176)))
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = t + (a + (z + (log(c) * (b - 0.5))));
	t_2 = (y * i) + (x * log(y));
	tmp = 0.0;
	if (x <= -8.8e+175)
		tmp = t_2;
	elseif (x <= -3.35e-93)
		tmp = t_1;
	elseif (x <= -1.9e-164)
		tmp = (y * i) + (z + (-0.5 * log(c)));
	elseif ((x <= 4.7e+21) || (~((x <= 8.6e+90)) && (x <= 7.5e+176)))
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(t + N[(a + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * i), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.8e+175], t$95$2, If[LessEqual[x, -3.35e-93], t$95$1, If[LessEqual[x, -1.9e-164], N[(N[(y * i), $MachinePrecision] + N[(z + N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 4.7e+21], And[N[Not[LessEqual[x, 8.6e+90]], $MachinePrecision], LessEqual[x, 7.5e+176]]], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -3.35 \cdot 10^{-93}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -1.9 \cdot 10^{-164}:\\
\;\;\;\;y \cdot i + \left(z + -0.5 \cdot \log c\right)\\

\mathbf{elif}\;x \leq 4.7 \cdot 10^{+21} \lor \neg \left(x \leq 8.6 \cdot 10^{+90}\right) \land x \leq 7.5 \cdot 10^{+176}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -8.7999999999999997e175 or 4.7e21 < x < 8.5999999999999994e90 or 7.499999999999999e176 < x

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.7999999999999997e175 < x < -3.34999999999999987e-93 or -1.89999999999999995e-164 < x < 4.7e21 or 8.5999999999999994e90 < x < 7.499999999999999e176

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.34999999999999987e-93 < x < -1.89999999999999995e-164

    1. Initial program 100.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8.8 \cdot 10^{+175}:\\ \;\;\;\;y \cdot i + x \cdot \log y\\ \mathbf{elif}\;x \leq -3.35 \cdot 10^{-93}:\\ \;\;\;\;t + \left(a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{-164}:\\ \;\;\;\;y \cdot i + \left(z + -0.5 \cdot \log c\right)\\ \mathbf{elif}\;x \leq 4.7 \cdot 10^{+21} \lor \neg \left(x \leq 8.6 \cdot 10^{+90}\right) \land x \leq 7.5 \cdot 10^{+176}:\\ \;\;\;\;t + \left(a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + x \cdot \log y\\ \end{array} \]

Alternative 9: 55.0% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + \left(t + \left(z + -0.5 \cdot \log c\right)\right)\\ t_2 := y \cdot i + x \cdot \log y\\ \mathbf{if}\;x \leq -1.12 \cdot 10^{+48}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -2.5 \cdot 10^{-67}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{-230}:\\ \;\;\;\;t + \mathsf{fma}\left(y, i, a\right)\\ \mathbf{elif}\;x \leq 4.7 \cdot 10^{+21} \lor \neg \left(x \leq 3 \cdot 10^{+144}\right) \land x \leq 8.8 \cdot 10^{+173}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ a (+ t (+ z (* -0.5 (log c))))))
        (t_2 (+ (* y i) (* x (log y)))))
   (if (<= x -1.12e+48)
     t_2
     (if (<= x -2.5e-67)
       t_1
       (if (<= x -3.2e-230)
         (+ t (fma y i a))
         (if (or (<= x 4.7e+21) (and (not (<= x 3e+144)) (<= x 8.8e+173)))
           t_1
           t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = a + (t + (z + (-0.5 * log(c))));
	double t_2 = (y * i) + (x * log(y));
	double tmp;
	if (x <= -1.12e+48) {
		tmp = t_2;
	} else if (x <= -2.5e-67) {
		tmp = t_1;
	} else if (x <= -3.2e-230) {
		tmp = t + fma(y, i, a);
	} else if ((x <= 4.7e+21) || (!(x <= 3e+144) && (x <= 8.8e+173))) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(a + Float64(t + Float64(z + Float64(-0.5 * log(c)))))
	t_2 = Float64(Float64(y * i) + Float64(x * log(y)))
	tmp = 0.0
	if (x <= -1.12e+48)
		tmp = t_2;
	elseif (x <= -2.5e-67)
		tmp = t_1;
	elseif (x <= -3.2e-230)
		tmp = Float64(t + fma(y, i, a));
	elseif ((x <= 4.7e+21) || (!(x <= 3e+144) && (x <= 8.8e+173)))
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(t + N[(z + N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * i), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.12e+48], t$95$2, If[LessEqual[x, -2.5e-67], t$95$1, If[LessEqual[x, -3.2e-230], N[(t + N[(y * i + a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 4.7e+21], And[N[Not[LessEqual[x, 3e+144]], $MachinePrecision], LessEqual[x, 8.8e+173]]], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a + \left(t + \left(z + -0.5 \cdot \log c\right)\right)\\
t_2 := y \cdot i + x \cdot \log y\\
\mathbf{if}\;x \leq -1.12 \cdot 10^{+48}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq -2.5 \cdot 10^{-67}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -3.2 \cdot 10^{-230}:\\
\;\;\;\;t + \mathsf{fma}\left(y, i, a\right)\\

\mathbf{elif}\;x \leq 4.7 \cdot 10^{+21} \lor \neg \left(x \leq 3 \cdot 10^{+144}\right) \land x \leq 8.8 \cdot 10^{+173}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.11999999999999995e48 or 4.7e21 < x < 2.9999999999999999e144 or 8.7999999999999999e173 < x

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.11999999999999995e48 < x < -2.4999999999999999e-67 or -3.2e-230 < x < 4.7e21 or 2.9999999999999999e144 < x < 8.7999999999999999e173

    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 0 81.5%

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

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

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

    if -2.4999999999999999e-67 < x < -3.2e-230

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.12 \cdot 10^{+48}:\\ \;\;\;\;y \cdot i + x \cdot \log y\\ \mathbf{elif}\;x \leq -2.5 \cdot 10^{-67}:\\ \;\;\;\;a + \left(t + \left(z + -0.5 \cdot \log c\right)\right)\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{-230}:\\ \;\;\;\;t + \mathsf{fma}\left(y, i, a\right)\\ \mathbf{elif}\;x \leq 4.7 \cdot 10^{+21} \lor \neg \left(x \leq 3 \cdot 10^{+144}\right) \land x \leq 8.8 \cdot 10^{+173}:\\ \;\;\;\;a + \left(t + \left(z + -0.5 \cdot \log c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + x \cdot \log y\\ \end{array} \]

Alternative 10: 76.3% accurate, 1.8× speedup?

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

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

    if -4.99999999999999972e71 < (-.f64 b 1/2) < 9.9999999999999991e130

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

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

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

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

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

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

    if 9.9999999999999991e130 < (-.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. Step-by-step derivation
      1. associate-+l+99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 89.1% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+176} \lor \neg \left(x \leq 4.7 \cdot 10^{+178}\right):\\
\;\;\;\;y \cdot i + x \cdot \log y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9.4999999999999995e176 or 4.69999999999999992e178 < x

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.4999999999999995e176 < x < 4.69999999999999992e178

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

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

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

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

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

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

Alternative 12: 50.0% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot i + x \cdot \log y\\
\mathbf{if}\;z \leq -8.5 \cdot 10^{+195}:\\
\;\;\;\;z\\

\mathbf{elif}\;z \leq -6.5 \cdot 10^{+152}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq -1.72 \cdot 10^{-152}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.5e195 or -6.4999999999999997e152 < z < -1.10000000000000005e113

    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 0 94.0%

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

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

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

    if -8.5e195 < z < -6.4999999999999997e152 or -1.10000000000000005e113 < z < -1.72e-152

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.72e-152 < z

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+195}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{+152}:\\ \;\;\;\;y \cdot i + x \cdot \log y\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{+113}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -1.72 \cdot 10^{-152}:\\ \;\;\;\;y \cdot i + x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;t + \mathsf{fma}\left(y, i, a\right)\\ \end{array} \]

Alternative 13: 69.5% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;y \leq 2.5 \cdot 10^{+209}:\\
\;\;\;\;y \cdot i + \left(a + t_1\right)\\

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.00339999999999999981 < y < 2.49999999999999982e209

    1. Initial program 99.9%

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

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

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

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

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

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

    if 2.49999999999999982e209 < 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. associate-+r+99.9%

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

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

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

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

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

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

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

Alternative 14: 59.6% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

    if -6.40000000000000005e79 < z

    1. Initial program 99.8%

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

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

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

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

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

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

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

Alternative 15: 34.5% accurate, 2.0× speedup?

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

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

\mathbf{elif}\;z \leq -5.2 \cdot 10^{+82}:\\
\;\;\;\;y \cdot i\\

\mathbf{elif}\;z \leq -1.45 \cdot 10^{+36}:\\
\;\;\;\;t + a\\

\mathbf{elif}\;z \leq -9 \cdot 10^{-39}:\\
\;\;\;\;x \cdot \log y\\

\mathbf{elif}\;z \leq -6 \cdot 10^{-173}:\\
\;\;\;\;t + y \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -4.69999999999999997e112

    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 0 92.9%

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

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

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

    if -4.69999999999999997e112 < z < -5.1999999999999997e82

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t + \color{blue}{i \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative80.7%

        \[\leadsto t + \color{blue}{y \cdot i} \]
    6. Simplified80.7%

      \[\leadsto t + \color{blue}{y \cdot i} \]
    7. Taylor expanded in t around 0 61.2%

      \[\leadsto \color{blue}{i \cdot y} \]
    8. Step-by-step derivation
      1. *-commutative61.2%

        \[\leadsto \color{blue}{y \cdot i} \]
    9. Simplified61.2%

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

    if -5.1999999999999997e82 < z < -1.45e36 or -6.0000000000000002e-173 < z

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.45e36 < z < -9.0000000000000002e-39

    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 0 62.4%

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

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

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

    if -9.0000000000000002e-39 < z < -6.0000000000000002e-173

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t + \color{blue}{i \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative25.9%

        \[\leadsto t + \color{blue}{y \cdot i} \]
    6. Simplified25.9%

      \[\leadsto t + \color{blue}{y \cdot i} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification35.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.7 \cdot 10^{+112}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{+82}:\\ \;\;\;\;y \cdot i\\ \mathbf{elif}\;z \leq -1.45 \cdot 10^{+36}:\\ \;\;\;\;t + a\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-39}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-173}:\\ \;\;\;\;t + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;t + a\\ \end{array} \]

Alternative 16: 52.7% accurate, 2.0× speedup?

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

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

    if -5.4000000000000001e72 < z < -3.29999999999999998e-152

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.29999999999999998e-152 < z

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 53.7% accurate, 2.0× speedup?

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

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

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


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

    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 0 95.2%

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

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

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

    if -8.799999999999999e116 < z

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 36.4% accurate, 24.0× speedup?

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

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

\mathbf{elif}\;z \leq -1.2 \cdot 10^{-172}:\\
\;\;\;\;t + y \cdot i\\

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


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

    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 0 92.9%

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

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

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

    if -1.06000000000000004e113 < z < -1.2e-172

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{y \cdot i} \]
    6. Simplified31.5%

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

    if -1.2e-172 < z

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.06 \cdot 10^{+113}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-172}:\\ \;\;\;\;t + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;t + a\\ \end{array} \]

Alternative 19: 23.3% accurate, 30.7× speedup?

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

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

\mathbf{elif}\;z \leq -5.5 \cdot 10^{-173}:\\
\;\;\;\;y \cdot i\\

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


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

    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 0 92.9%

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

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

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

    if -4.3999999999999999e112 < z < -5.50000000000000022e-173

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{y \cdot i} \]
    6. Simplified31.5%

      \[\leadsto t + \color{blue}{y \cdot i} \]
    7. Taylor expanded in t around 0 21.2%

      \[\leadsto \color{blue}{i \cdot y} \]
    8. Step-by-step derivation
      1. *-commutative21.2%

        \[\leadsto \color{blue}{y \cdot i} \]
    9. Simplified21.2%

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

    if -5.50000000000000022e-173 < z

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{+112}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-173}:\\ \;\;\;\;y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]

Alternative 20: 32.6% accurate, 30.7× speedup?

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

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

\mathbf{elif}\;z \leq -8.8 \cdot 10^{-172}:\\
\;\;\;\;y \cdot i\\

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


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

    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 0 92.9%

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

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

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

    if -6.8999999999999999e112 < z < -8.80000000000000036e-172

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{y \cdot i} \]
    6. Simplified31.5%

      \[\leadsto t + \color{blue}{y \cdot i} \]
    7. Taylor expanded in t around 0 21.2%

      \[\leadsto \color{blue}{i \cdot y} \]
    8. Step-by-step derivation
      1. *-commutative21.2%

        \[\leadsto \color{blue}{y \cdot i} \]
    9. Simplified21.2%

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

    if -8.80000000000000036e-172 < z

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.9 \cdot 10^{+112}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{-172}:\\ \;\;\;\;y \cdot i\\ \mathbf{else}:\\ \;\;\;\;t + a\\ \end{array} \]

Alternative 21: 21.4% accurate, 71.5× speedup?

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

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

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


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

    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 0 93.8%

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

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

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

    if -1.70000000000000001e81 < z

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

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

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

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

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

Alternative 22: 16.3% 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.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 b around 0 84.1%

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

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

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

    \[\leadsto a \]

Reproduce

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