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

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

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.8% accurate, 0.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 92.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{+132} \lor \neg \left(x \leq 3.3 \cdot 10^{+193}\right):\\
\;\;\;\;y \cdot i + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.1999999999999995e132 or 3.3e193 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.1999999999999995e132 < x < 3.3e193

    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-+r+99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 99.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 5: 94.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+145} \lor \neg \left(x \leq 9 \cdot 10^{+152}\right):\\
\;\;\;\;\left(\mathsf{fma}\left(x, \log y, z\right) + \left(a + t\right)\right) + y \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9.49999999999999948e145 or 9.0000000000000002e152 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \color{blue}{i \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative90.2%

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

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

    if -9.49999999999999948e145 < x < 9.0000000000000002e152

    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-+r+99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 94.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{+146} \lor \neg \left(x \leq 1.7 \cdot 10^{+150}\right):\\
\;\;\;\;\left(\mathsf{fma}\left(x, \log y, z\right) + \left(a + t\right)\right) + y \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.30000000000000007e146 or 1.69999999999999991e150 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \color{blue}{i \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative90.2%

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

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

    if -1.30000000000000007e146 < x < 1.69999999999999991e150

    1. Initial program 99.9%

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

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

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

Alternative 7: 66.9% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;i \leq -8.5 \cdot 10^{+26}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;i \leq -1.25 \cdot 10^{-103}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;i \leq -1.75 \cdot 10^{-257}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;i \leq 2.2 \cdot 10^{-199}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;i \leq 3.1 \cdot 10^{-116}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;i \leq 7.9 \cdot 10^{+31}:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \color{blue}{i \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative88.9%

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

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

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

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

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

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

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

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

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

    if -5.79999999999999969e137 < i < -8.5e26 or -1.24999999999999992e-103 < i < -1.75000000000000015e-257 or 2.1999999999999998e-199 < i < 3.10000000000000018e-116

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \color{blue}{i \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative88.6%

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

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

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

    if -8.5e26 < i < -1.24999999999999992e-103 or -1.75000000000000015e-257 < i < 2.1999999999999998e-199 or 3.10000000000000018e-116 < i < 7.9000000000000003e31

    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-+r+99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.9000000000000003e31 < i

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -5.8 \cdot 10^{+137}:\\ \;\;\;\;a + \left(z + y \cdot i\right)\\ \mathbf{elif}\;i \leq -8.5 \cdot 10^{+26}:\\ \;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\ \mathbf{elif}\;i \leq -1.25 \cdot 10^{-103}:\\ \;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\ \mathbf{elif}\;i \leq -1.75 \cdot 10^{-257}:\\ \;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\ \mathbf{elif}\;i \leq 2.2 \cdot 10^{-199}:\\ \;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\ \mathbf{elif}\;i \leq 3.1 \cdot 10^{-116}:\\ \;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\ \mathbf{elif}\;i \leq 7.9 \cdot 10^{+31}:\\ \;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(\left(z + t\right) + y \cdot i\right)\\ \end{array} \]

Alternative 8: 91.1% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ t_2 := \log c \cdot \left(b - 0.5\right)\\ t_3 := y \cdot i + \left(z + t_1\right)\\ \mathbf{if}\;x \leq -3.5 \cdot 10^{+215}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq -9.2 \cdot 10^{+189}:\\ \;\;\;\;a + \left(z + \left(y \cdot i + t_2\right)\right)\\ \mathbf{elif}\;x \leq -3.9 \cdot 10^{+145}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 1.45 \cdot 10^{+193}:\\ \;\;\;\;y \cdot i + \left(t_2 + \left(a + \left(z + t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t + \left(z + \left(y \cdot i + t_1\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* x (log y)))
        (t_2 (* (log c) (- b 0.5)))
        (t_3 (+ (* y i) (+ z t_1))))
   (if (<= x -3.5e+215)
     t_3
     (if (<= x -9.2e+189)
       (+ a (+ z (+ (* y i) t_2)))
       (if (<= x -3.9e+145)
         t_3
         (if (<= x 1.45e+193)
           (+ (* y i) (+ t_2 (+ a (+ z t))))
           (+ t (+ z (+ (* y i) t_1)))))))))
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 t_2 = log(c) * (b - 0.5);
	double t_3 = (y * i) + (z + t_1);
	double tmp;
	if (x <= -3.5e+215) {
		tmp = t_3;
	} else if (x <= -9.2e+189) {
		tmp = a + (z + ((y * i) + t_2));
	} else if (x <= -3.9e+145) {
		tmp = t_3;
	} else if (x <= 1.45e+193) {
		tmp = (y * i) + (t_2 + (a + (z + t)));
	} else {
		tmp = t + (z + ((y * i) + 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) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x * log(y)
    t_2 = log(c) * (b - 0.5d0)
    t_3 = (y * i) + (z + t_1)
    if (x <= (-3.5d+215)) then
        tmp = t_3
    else if (x <= (-9.2d+189)) then
        tmp = a + (z + ((y * i) + t_2))
    else if (x <= (-3.9d+145)) then
        tmp = t_3
    else if (x <= 1.45d+193) then
        tmp = (y * i) + (t_2 + (a + (z + t)))
    else
        tmp = t + (z + ((y * i) + 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 = x * Math.log(y);
	double t_2 = Math.log(c) * (b - 0.5);
	double t_3 = (y * i) + (z + t_1);
	double tmp;
	if (x <= -3.5e+215) {
		tmp = t_3;
	} else if (x <= -9.2e+189) {
		tmp = a + (z + ((y * i) + t_2));
	} else if (x <= -3.9e+145) {
		tmp = t_3;
	} else if (x <= 1.45e+193) {
		tmp = (y * i) + (t_2 + (a + (z + t)));
	} else {
		tmp = t + (z + ((y * i) + t_1));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = x * math.log(y)
	t_2 = math.log(c) * (b - 0.5)
	t_3 = (y * i) + (z + t_1)
	tmp = 0
	if x <= -3.5e+215:
		tmp = t_3
	elif x <= -9.2e+189:
		tmp = a + (z + ((y * i) + t_2))
	elif x <= -3.9e+145:
		tmp = t_3
	elif x <= 1.45e+193:
		tmp = (y * i) + (t_2 + (a + (z + t)))
	else:
		tmp = t + (z + ((y * i) + t_1))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(x * log(y))
	t_2 = Float64(log(c) * Float64(b - 0.5))
	t_3 = Float64(Float64(y * i) + Float64(z + t_1))
	tmp = 0.0
	if (x <= -3.5e+215)
		tmp = t_3;
	elseif (x <= -9.2e+189)
		tmp = Float64(a + Float64(z + Float64(Float64(y * i) + t_2)));
	elseif (x <= -3.9e+145)
		tmp = t_3;
	elseif (x <= 1.45e+193)
		tmp = Float64(Float64(y * i) + Float64(t_2 + Float64(a + Float64(z + t))));
	else
		tmp = Float64(t + Float64(z + Float64(Float64(y * i) + t_1)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = x * log(y);
	t_2 = log(c) * (b - 0.5);
	t_3 = (y * i) + (z + t_1);
	tmp = 0.0;
	if (x <= -3.5e+215)
		tmp = t_3;
	elseif (x <= -9.2e+189)
		tmp = a + (z + ((y * i) + t_2));
	elseif (x <= -3.9e+145)
		tmp = t_3;
	elseif (x <= 1.45e+193)
		tmp = (y * i) + (t_2 + (a + (z + t)));
	else
		tmp = t + (z + ((y * i) + t_1));
	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]}, Block[{t$95$2 = N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y * i), $MachinePrecision] + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.5e+215], t$95$3, If[LessEqual[x, -9.2e+189], N[(a + N[(z + N[(N[(y * i), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.9e+145], t$95$3, If[LessEqual[x, 1.45e+193], N[(N[(y * i), $MachinePrecision] + N[(t$95$2 + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(z + N[(N[(y * i), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -9.2 \cdot 10^{+189}:\\
\;\;\;\;a + \left(z + \left(y \cdot i + t_2\right)\right)\\

\mathbf{elif}\;x \leq -3.9 \cdot 10^{+145}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;x \leq 1.45 \cdot 10^{+193}:\\
\;\;\;\;y \cdot i + \left(t_2 + \left(a + \left(z + t\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -3.49999999999999977e215 or -9.2e189 < x < -3.8999999999999998e145

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.49999999999999977e215 < x < -9.2e189

    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-+r+100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.8999999999999998e145 < x < 1.45000000000000007e193

    1. Initial program 99.9%

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

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

    if 1.45000000000000007e193 < 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) + a\right) + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right)} \]
      2. associate-+l+99.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \color{blue}{i \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative84.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.5 \cdot 10^{+215}:\\ \;\;\;\;y \cdot i + \left(z + x \cdot \log y\right)\\ \mathbf{elif}\;x \leq -9.2 \cdot 10^{+189}:\\ \;\;\;\;a + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\\ \mathbf{elif}\;x \leq -3.9 \cdot 10^{+145}:\\ \;\;\;\;y \cdot i + \left(z + x \cdot \log y\right)\\ \mathbf{elif}\;x \leq 1.45 \cdot 10^{+193}:\\ \;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(z + t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t + \left(z + \left(y \cdot i + x \cdot \log y\right)\right)\\ \end{array} \]

Alternative 9: 77.5% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ t_2 := a + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\\ t_3 := y \cdot i + \left(z + t_1\right)\\ \mathbf{if}\;x \leq -2.4 \cdot 10^{+215}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq -2.4 \cdot 10^{+187}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.7 \cdot 10^{+146}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 1.55 \cdot 10^{+193}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t + \left(z + \left(y \cdot i + t_1\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* x (log y)))
        (t_2 (+ a (+ z (+ (* y i) (* (log c) (- b 0.5))))))
        (t_3 (+ (* y i) (+ z t_1))))
   (if (<= x -2.4e+215)
     t_3
     (if (<= x -2.4e+187)
       t_2
       (if (<= x -1.7e+146)
         t_3
         (if (<= x 1.55e+193) t_2 (+ t (+ z (+ (* y i) t_1)))))))))
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 t_2 = a + (z + ((y * i) + (log(c) * (b - 0.5))));
	double t_3 = (y * i) + (z + t_1);
	double tmp;
	if (x <= -2.4e+215) {
		tmp = t_3;
	} else if (x <= -2.4e+187) {
		tmp = t_2;
	} else if (x <= -1.7e+146) {
		tmp = t_3;
	} else if (x <= 1.55e+193) {
		tmp = t_2;
	} else {
		tmp = t + (z + ((y * i) + 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) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x * log(y)
    t_2 = a + (z + ((y * i) + (log(c) * (b - 0.5d0))))
    t_3 = (y * i) + (z + t_1)
    if (x <= (-2.4d+215)) then
        tmp = t_3
    else if (x <= (-2.4d+187)) then
        tmp = t_2
    else if (x <= (-1.7d+146)) then
        tmp = t_3
    else if (x <= 1.55d+193) then
        tmp = t_2
    else
        tmp = t + (z + ((y * i) + 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 = x * Math.log(y);
	double t_2 = a + (z + ((y * i) + (Math.log(c) * (b - 0.5))));
	double t_3 = (y * i) + (z + t_1);
	double tmp;
	if (x <= -2.4e+215) {
		tmp = t_3;
	} else if (x <= -2.4e+187) {
		tmp = t_2;
	} else if (x <= -1.7e+146) {
		tmp = t_3;
	} else if (x <= 1.55e+193) {
		tmp = t_2;
	} else {
		tmp = t + (z + ((y * i) + t_1));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = x * math.log(y)
	t_2 = a + (z + ((y * i) + (math.log(c) * (b - 0.5))))
	t_3 = (y * i) + (z + t_1)
	tmp = 0
	if x <= -2.4e+215:
		tmp = t_3
	elif x <= -2.4e+187:
		tmp = t_2
	elif x <= -1.7e+146:
		tmp = t_3
	elif x <= 1.55e+193:
		tmp = t_2
	else:
		tmp = t + (z + ((y * i) + t_1))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(x * log(y))
	t_2 = Float64(a + Float64(z + Float64(Float64(y * i) + Float64(log(c) * Float64(b - 0.5)))))
	t_3 = Float64(Float64(y * i) + Float64(z + t_1))
	tmp = 0.0
	if (x <= -2.4e+215)
		tmp = t_3;
	elseif (x <= -2.4e+187)
		tmp = t_2;
	elseif (x <= -1.7e+146)
		tmp = t_3;
	elseif (x <= 1.55e+193)
		tmp = t_2;
	else
		tmp = Float64(t + Float64(z + Float64(Float64(y * i) + t_1)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = x * log(y);
	t_2 = a + (z + ((y * i) + (log(c) * (b - 0.5))));
	t_3 = (y * i) + (z + t_1);
	tmp = 0.0;
	if (x <= -2.4e+215)
		tmp = t_3;
	elseif (x <= -2.4e+187)
		tmp = t_2;
	elseif (x <= -1.7e+146)
		tmp = t_3;
	elseif (x <= 1.55e+193)
		tmp = t_2;
	else
		tmp = t + (z + ((y * i) + t_1));
	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]}, Block[{t$95$2 = N[(a + N[(z + N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y * i), $MachinePrecision] + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.4e+215], t$95$3, If[LessEqual[x, -2.4e+187], t$95$2, If[LessEqual[x, -1.7e+146], t$95$3, If[LessEqual[x, 1.55e+193], t$95$2, N[(t + N[(z + N[(N[(y * i), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -2.4 \cdot 10^{+187}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq -1.7 \cdot 10^{+146}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;x \leq 1.55 \cdot 10^{+193}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.4000000000000001e215 or -2.39999999999999985e187 < x < -1.69999999999999995e146

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.4000000000000001e215 < x < -2.39999999999999985e187 or -1.69999999999999995e146 < x < 1.54999999999999993e193

    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-+r+99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.54999999999999993e193 < 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) + a\right) + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right)} \]
      2. associate-+l+99.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \color{blue}{i \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative84.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.4 \cdot 10^{+215}:\\ \;\;\;\;y \cdot i + \left(z + x \cdot \log y\right)\\ \mathbf{elif}\;x \leq -2.4 \cdot 10^{+187}:\\ \;\;\;\;a + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\\ \mathbf{elif}\;x \leq -1.7 \cdot 10^{+146}:\\ \;\;\;\;y \cdot i + \left(z + x \cdot \log y\right)\\ \mathbf{elif}\;x \leq 1.55 \cdot 10^{+193}:\\ \;\;\;\;a + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t + \left(z + \left(y \cdot i + x \cdot \log y\right)\right)\\ \end{array} \]

Alternative 10: 73.2% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -3.9 \cdot 10^{+145}:\\ \;\;\;\;y \cdot i + \left(z + t_1\right)\\ \mathbf{elif}\;x \leq -1.2 \cdot 10^{-117}:\\ \;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{+193}:\\ \;\;\;\;a + \left(t + \left(z + \left(y \cdot i + -0.5 \cdot \log c\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t + \left(z + \left(y \cdot i + t_1\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 -3.9e+145)
     (+ (* y i) (+ z t_1))
     (if (<= x -1.2e-117)
       (+ a (+ z (* (log c) (- b 0.5))))
       (if (<= x 3.8e+193)
         (+ a (+ t (+ z (+ (* y i) (* -0.5 (log c))))))
         (+ t (+ z (+ (* y i) t_1))))))))
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 <= -3.9e+145) {
		tmp = (y * i) + (z + t_1);
	} else if (x <= -1.2e-117) {
		tmp = a + (z + (log(c) * (b - 0.5)));
	} else if (x <= 3.8e+193) {
		tmp = a + (t + (z + ((y * i) + (-0.5 * log(c)))));
	} else {
		tmp = t + (z + ((y * i) + 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 = x * log(y)
    if (x <= (-3.9d+145)) then
        tmp = (y * i) + (z + t_1)
    else if (x <= (-1.2d-117)) then
        tmp = a + (z + (log(c) * (b - 0.5d0)))
    else if (x <= 3.8d+193) then
        tmp = a + (t + (z + ((y * i) + ((-0.5d0) * log(c)))))
    else
        tmp = t + (z + ((y * i) + 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 = x * Math.log(y);
	double tmp;
	if (x <= -3.9e+145) {
		tmp = (y * i) + (z + t_1);
	} else if (x <= -1.2e-117) {
		tmp = a + (z + (Math.log(c) * (b - 0.5)));
	} else if (x <= 3.8e+193) {
		tmp = a + (t + (z + ((y * i) + (-0.5 * Math.log(c)))));
	} else {
		tmp = t + (z + ((y * i) + t_1));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = x * math.log(y)
	tmp = 0
	if x <= -3.9e+145:
		tmp = (y * i) + (z + t_1)
	elif x <= -1.2e-117:
		tmp = a + (z + (math.log(c) * (b - 0.5)))
	elif x <= 3.8e+193:
		tmp = a + (t + (z + ((y * i) + (-0.5 * math.log(c)))))
	else:
		tmp = t + (z + ((y * i) + t_1))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(x * log(y))
	tmp = 0.0
	if (x <= -3.9e+145)
		tmp = Float64(Float64(y * i) + Float64(z + t_1));
	elseif (x <= -1.2e-117)
		tmp = Float64(a + Float64(z + Float64(log(c) * Float64(b - 0.5))));
	elseif (x <= 3.8e+193)
		tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(y * i) + Float64(-0.5 * log(c))))));
	else
		tmp = Float64(t + Float64(z + Float64(Float64(y * i) + t_1)));
	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 <= -3.9e+145)
		tmp = (y * i) + (z + t_1);
	elseif (x <= -1.2e-117)
		tmp = a + (z + (log(c) * (b - 0.5)));
	elseif (x <= 3.8e+193)
		tmp = a + (t + (z + ((y * i) + (-0.5 * log(c)))));
	else
		tmp = t + (z + ((y * i) + t_1));
	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, -3.9e+145], N[(N[(y * i), $MachinePrecision] + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.2e-117], N[(a + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.8e+193], N[(a + N[(t + N[(z + N[(N[(y * i), $MachinePrecision] + N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(z + N[(N[(y * i), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -3.9 \cdot 10^{+145}:\\
\;\;\;\;y \cdot i + \left(z + t_1\right)\\

\mathbf{elif}\;x \leq -1.2 \cdot 10^{-117}:\\
\;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\

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

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


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

    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 t around 0 94.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.8999999999999998e145 < x < -1.20000000000000007e-117

    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-+r+99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.20000000000000007e-117 < x < 3.79999999999999972e193

    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-+r+99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.79999999999999972e193 < 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) + a\right) + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right)} \]
      2. associate-+l+99.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \color{blue}{i \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative84.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.9 \cdot 10^{+145}:\\ \;\;\;\;y \cdot i + \left(z + x \cdot \log y\right)\\ \mathbf{elif}\;x \leq -1.2 \cdot 10^{-117}:\\ \;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{+193}:\\ \;\;\;\;a + \left(t + \left(z + \left(y \cdot i + -0.5 \cdot \log c\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t + \left(z + \left(y \cdot i + x \cdot \log y\right)\right)\\ \end{array} \]

Alternative 11: 63.1% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot i + \left(z + x \cdot \log y\right)\\
\mathbf{if}\;x \leq -2.6 \cdot 10^{+145}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -8.2 \cdot 10^{-110}:\\
\;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.60000000000000003e145 or 3.3e193 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.60000000000000003e145 < x < -8.19999999999999965e-110

    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-+r+99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.19999999999999965e-110 < x < 3.3e193

    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-+r+99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.6 \cdot 10^{+145}:\\ \;\;\;\;y \cdot i + \left(z + x \cdot \log y\right)\\ \mathbf{elif}\;x \leq -8.2 \cdot 10^{-110}:\\ \;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{+193}:\\ \;\;\;\;a + \left(z + \left(y \cdot i + -0.5 \cdot \log c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(z + x \cdot \log y\right)\\ \end{array} \]

Alternative 12: 63.6% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -1.8 \cdot 10^{+146}:\\ \;\;\;\;y \cdot i + \left(z + t_1\right)\\ \mathbf{elif}\;x \leq -9.5 \cdot 10^{-119}:\\ \;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\ \mathbf{elif}\;x \leq 1.75 \cdot 10^{+193}:\\ \;\;\;\;a + \left(z + \left(y \cdot i + -0.5 \cdot \log c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t + \left(z + \left(y \cdot i + t_1\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.8e+146)
     (+ (* y i) (+ z t_1))
     (if (<= x -9.5e-119)
       (+ a (+ z (* (log c) (- b 0.5))))
       (if (<= x 1.75e+193)
         (+ a (+ z (+ (* y i) (* -0.5 (log c)))))
         (+ t (+ z (+ (* y i) t_1))))))))
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.8e+146) {
		tmp = (y * i) + (z + t_1);
	} else if (x <= -9.5e-119) {
		tmp = a + (z + (log(c) * (b - 0.5)));
	} else if (x <= 1.75e+193) {
		tmp = a + (z + ((y * i) + (-0.5 * log(c))));
	} else {
		tmp = t + (z + ((y * i) + 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 = x * log(y)
    if (x <= (-1.8d+146)) then
        tmp = (y * i) + (z + t_1)
    else if (x <= (-9.5d-119)) then
        tmp = a + (z + (log(c) * (b - 0.5d0)))
    else if (x <= 1.75d+193) then
        tmp = a + (z + ((y * i) + ((-0.5d0) * log(c))))
    else
        tmp = t + (z + ((y * i) + 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 = x * Math.log(y);
	double tmp;
	if (x <= -1.8e+146) {
		tmp = (y * i) + (z + t_1);
	} else if (x <= -9.5e-119) {
		tmp = a + (z + (Math.log(c) * (b - 0.5)));
	} else if (x <= 1.75e+193) {
		tmp = a + (z + ((y * i) + (-0.5 * Math.log(c))));
	} else {
		tmp = t + (z + ((y * i) + t_1));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = x * math.log(y)
	tmp = 0
	if x <= -1.8e+146:
		tmp = (y * i) + (z + t_1)
	elif x <= -9.5e-119:
		tmp = a + (z + (math.log(c) * (b - 0.5)))
	elif x <= 1.75e+193:
		tmp = a + (z + ((y * i) + (-0.5 * math.log(c))))
	else:
		tmp = t + (z + ((y * i) + t_1))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(x * log(y))
	tmp = 0.0
	if (x <= -1.8e+146)
		tmp = Float64(Float64(y * i) + Float64(z + t_1));
	elseif (x <= -9.5e-119)
		tmp = Float64(a + Float64(z + Float64(log(c) * Float64(b - 0.5))));
	elseif (x <= 1.75e+193)
		tmp = Float64(a + Float64(z + Float64(Float64(y * i) + Float64(-0.5 * log(c)))));
	else
		tmp = Float64(t + Float64(z + Float64(Float64(y * i) + t_1)));
	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 <= -1.8e+146)
		tmp = (y * i) + (z + t_1);
	elseif (x <= -9.5e-119)
		tmp = a + (z + (log(c) * (b - 0.5)));
	elseif (x <= 1.75e+193)
		tmp = a + (z + ((y * i) + (-0.5 * log(c))));
	else
		tmp = t + (z + ((y * i) + t_1));
	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, -1.8e+146], N[(N[(y * i), $MachinePrecision] + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -9.5e-119], N[(a + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.75e+193], N[(a + N[(z + N[(N[(y * i), $MachinePrecision] + N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(z + N[(N[(y * i), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -1.8 \cdot 10^{+146}:\\
\;\;\;\;y \cdot i + \left(z + t_1\right)\\

\mathbf{elif}\;x \leq -9.5 \cdot 10^{-119}:\\
\;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\

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

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


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

    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 t around 0 94.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7999999999999999e146 < x < -9.5000000000000002e-119

    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-+r+99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.5000000000000002e-119 < x < 1.75000000000000007e193

    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-+r+99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.75000000000000007e193 < 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) + a\right) + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right)} \]
      2. associate-+l+99.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \color{blue}{i \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative84.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.8 \cdot 10^{+146}:\\ \;\;\;\;y \cdot i + \left(z + x \cdot \log y\right)\\ \mathbf{elif}\;x \leq -9.5 \cdot 10^{-119}:\\ \;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\ \mathbf{elif}\;x \leq 1.75 \cdot 10^{+193}:\\ \;\;\;\;a + \left(z + \left(y \cdot i + -0.5 \cdot \log c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t + \left(z + \left(y \cdot i + x \cdot \log y\right)\right)\\ \end{array} \]

Alternative 13: 71.6% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot i + \left(z + x \cdot \log y\right)\\
\mathbf{if}\;x \leq -7 \cdot 10^{+145}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -1.15 \cdot 10^{-110}:\\
\;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\

\mathbf{elif}\;x \leq 2.5 \cdot 10^{+193}:\\
\;\;\;\;a + \left(\left(z + t\right) + y \cdot i\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -7.0000000000000002e145 or 2.49999999999999986e193 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.0000000000000002e145 < x < -1.1500000000000001e-110

    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-+r+99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.1500000000000001e-110 < x < 2.49999999999999986e193

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \color{blue}{i \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative82.2%

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

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

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

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

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

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

Alternative 14: 72.6% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;i \leq 9.5 \cdot 10^{-19}:\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -6.09999999999999978e134

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \color{blue}{i \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative88.9%

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

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

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

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

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

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

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

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

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

    if -6.09999999999999978e134 < i < 9.4999999999999995e-19

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \color{blue}{i \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative79.0%

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

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

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

    if 9.4999999999999995e-19 < i

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 72.5% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{+222} \lor \neg \left(x \leq 2.6 \cdot 10^{+215}\right):\\
\;\;\;\;x \cdot \log y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.8000000000000002e222 or 2.6e215 < 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) + a\right) + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right)} \]
      2. associate-+l+99.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \color{blue}{i \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative92.6%

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

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

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

    if -4.8000000000000002e222 < x < 2.6e215

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 22.9% accurate, 19.5× speedup?

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

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

\mathbf{elif}\;a \leq 1.25 \cdot 10^{-97}:\\
\;\;\;\;y \cdot i\\

\mathbf{elif}\;a \leq 4.5 \cdot 10^{-26}:\\
\;\;\;\;z\\

\mathbf{elif}\;a \leq 6.2 \cdot 10^{+68}:\\
\;\;\;\;y \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < 9.7999999999999999e-253 or 1.2499999999999999e-97 < a < 4.4999999999999999e-26

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \color{blue}{i \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative83.3%

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

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

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

    if 9.7999999999999999e-253 < a < 1.2499999999999999e-97 or 4.4999999999999999e-26 < a < 6.1999999999999997e68

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{a} + y \cdot i \]
    3. Taylor expanded in a around 0 30.0%

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

    if 6.1999999999999997e68 < a

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{a} + y \cdot i \]
    3. Taylor expanded in a around inf 28.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 9.8 \cdot 10^{-253}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-97}:\\ \;\;\;\;y \cdot i\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-26}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+68}:\\ \;\;\;\;y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]

Alternative 17: 41.0% accurate, 19.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+231} \lor \neg \left(z \leq -1.6 \cdot 10^{+224}\right) \land z \leq -2.25 \cdot 10^{+131}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.49999999999999933e231 or -1.60000000000000007e224 < z < -2.2500000000000001e131

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \color{blue}{i \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative93.2%

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

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

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

    if -6.49999999999999933e231 < z < -1.60000000000000007e224 or -2.2500000000000001e131 < z

    1. Initial program 99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{+231} \lor \neg \left(z \leq -1.6 \cdot 10^{+224}\right) \land z \leq -2.25 \cdot 10^{+131}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \]

Alternative 18: 57.0% accurate, 19.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;i \leq -1.6 \cdot 10^{+123}:\\
\;\;\;\;a + y \cdot i\\

\mathbf{elif}\;i \leq 1.25 \cdot 10^{+88}:\\
\;\;\;\;t + \left(a + z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -1.60000000000000002e123

    1. Initial program 100.0%

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

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

    if -1.60000000000000002e123 < i < 1.24999999999999999e88

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \color{blue}{i \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative78.9%

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

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

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

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

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

      \[\leadsto \color{blue}{a + \left(t + z\right)} \]
    11. Step-by-step derivation
      1. +-commutative52.9%

        \[\leadsto \color{blue}{\left(t + z\right) + a} \]
      2. associate-+l+52.9%

        \[\leadsto \color{blue}{t + \left(z + a\right)} \]
    12. Simplified52.9%

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

    if 1.24999999999999999e88 < i

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 55.0% accurate, 24.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;i \leq -6.4 \cdot 10^{+128} \lor \neg \left(i \leq 1.55 \cdot 10^{+88}\right):\\
\;\;\;\;a + y \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -6.39999999999999971e128 or 1.5500000000000001e88 < i

    1. Initial program 100.0%

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

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

    if -6.39999999999999971e128 < i < 1.5500000000000001e88

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \color{blue}{i \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative78.9%

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

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

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

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

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

      \[\leadsto \color{blue}{a + \left(t + z\right)} \]
    11. Step-by-step derivation
      1. +-commutative52.9%

        \[\leadsto \color{blue}{\left(t + z\right) + a} \]
      2. associate-+l+52.9%

        \[\leadsto \color{blue}{t + \left(z + a\right)} \]
    12. Simplified52.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -6.4 \cdot 10^{+128} \lor \neg \left(i \leq 1.55 \cdot 10^{+88}\right):\\ \;\;\;\;a + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;t + \left(a + z\right)\\ \end{array} \]

Alternative 20: 67.8% accurate, 24.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \color{blue}{i \cdot y} \]
  5. Step-by-step derivation
    1. *-commutative82.4%

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

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

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

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

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

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

Alternative 21: 53.1% accurate, 31.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \color{blue}{i \cdot y} \]
  5. Step-by-step derivation
    1. *-commutative82.4%

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\left(z + y \cdot i\right) + a} \]
  13. Final simplification48.9%

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

Alternative 22: 21.8% accurate, 71.5× speedup?

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.3e130 < z

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{a} + y \cdot i \]
    3. Taylor expanded in a around inf 15.9%

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

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

Alternative 23: 16.6% accurate, 219.0× speedup?

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

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

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

    \[\leadsto \color{blue}{a} + y \cdot i \]
  3. Taylor expanded in a around inf 14.7%

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

    \[\leadsto a \]

Reproduce

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