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

Percentage Accurate: 99.8% → 99.8%
Time: 15.9s
Alternatives: 15
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 15 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, 1.0× speedup?

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

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

    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-+.f64N/A

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

      \[\leadsto \color{blue}{y \cdot i + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
    3. lift-*.f64N/A

      \[\leadsto \color{blue}{y \cdot i} + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
    4. lower-fma.f6499.8

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right)} \]
    5. lift-+.f64N/A

      \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c}\right) \]
    6. lift-+.f64N/A

      \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)} + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
    7. associate-+l+N/A

      \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\left(\left(x \cdot \log y + z\right) + t\right) + \left(a + \left(b - \frac{1}{2}\right) \cdot \log c\right)}\right) \]
    8. lower-+.f64N/A

      \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\left(\left(x \cdot \log y + z\right) + t\right) + \left(a + \left(b - \frac{1}{2}\right) \cdot \log c\right)}\right) \]
    9. lift-+.f64N/A

      \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\left(\left(x \cdot \log y + z\right) + t\right)} + \left(a + \left(b - \frac{1}{2}\right) \cdot \log c\right)\right) \]
    10. lift-+.f64N/A

      \[\leadsto \mathsf{fma}\left(y, i, \left(\color{blue}{\left(x \cdot \log y + z\right)} + t\right) + \left(a + \left(b - \frac{1}{2}\right) \cdot \log c\right)\right) \]
    11. associate-+l+N/A

      \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\left(x \cdot \log y + \left(z + t\right)\right)} + \left(a + \left(b - \frac{1}{2}\right) \cdot \log c\right)\right) \]
    12. lift-*.f64N/A

      \[\leadsto \mathsf{fma}\left(y, i, \left(\color{blue}{x \cdot \log y} + \left(z + t\right)\right) + \left(a + \left(b - \frac{1}{2}\right) \cdot \log c\right)\right) \]
    13. lower-fma.f64N/A

      \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\mathsf{fma}\left(x, \log y, z + t\right)} + \left(a + \left(b - \frac{1}{2}\right) \cdot \log c\right)\right) \]
    14. lower-+.f64N/A

      \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(x, \log y, \color{blue}{z + t}\right) + \left(a + \left(b - \frac{1}{2}\right) \cdot \log c\right)\right) \]
    15. +-commutativeN/A

      \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(x, \log y, z + t\right) + \color{blue}{\left(\left(b - \frac{1}{2}\right) \cdot \log c + a\right)}\right) \]
    16. lift-*.f64N/A

      \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(x, \log y, z + t\right) + \left(\color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c} + a\right)\right) \]
    17. lower-fma.f6499.8

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

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

Alternative 2: 73.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := b \cdot \log c\\
t_2 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+173}:\\
\;\;\;\;a + t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -5.00000000000000034e173

    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. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
    4. Step-by-step derivation
      1. lower-+.f64N/A

        \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
      2. +-commutativeN/A

        \[\leadsto a + \color{blue}{\left(\left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) + t\right)} \]
      3. associate-+r+N/A

        \[\leadsto a + \left(\color{blue}{\left(\left(z + i \cdot y\right) + \log c \cdot \left(b - \frac{1}{2}\right)\right)} + t\right) \]
      4. associate-+l+N/A

        \[\leadsto a + \color{blue}{\left(\left(z + i \cdot y\right) + \left(\log c \cdot \left(b - \frac{1}{2}\right) + t\right)\right)} \]
      5. lower-+.f64N/A

        \[\leadsto a + \color{blue}{\left(\left(z + i \cdot y\right) + \left(\log c \cdot \left(b - \frac{1}{2}\right) + t\right)\right)} \]
      6. +-commutativeN/A

        \[\leadsto a + \left(\color{blue}{\left(i \cdot y + z\right)} + \left(\log c \cdot \left(b - \frac{1}{2}\right) + t\right)\right) \]
      7. lower-fma.f64N/A

        \[\leadsto a + \left(\color{blue}{\mathsf{fma}\left(i, y, z\right)} + \left(\log c \cdot \left(b - \frac{1}{2}\right) + t\right)\right) \]
      8. lower-fma.f64N/A

        \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \color{blue}{\mathsf{fma}\left(\log c, b - \frac{1}{2}, t\right)}\right) \]
      9. lower-log.f64N/A

        \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\color{blue}{\log c}, b - \frac{1}{2}, t\right)\right) \]
      10. sub-negN/A

        \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, \color{blue}{b + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, t\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + \color{blue}{\frac{-1}{2}}, t\right)\right) \]
      12. lower-+.f6487.2

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

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

      \[\leadsto a + b \cdot \color{blue}{\log c} \]
    7. Step-by-step derivation
      1. Applied rewrites62.0%

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

      if -5.00000000000000034e173 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 9.9999999999999994e174

      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. Add Preprocessing
      3. Taylor expanded in b around 0

        \[\leadsto \color{blue}{a + \left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right)} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right) + a} \]
        2. associate-+r+N/A

          \[\leadsto \color{blue}{\left(\left(t + z\right) + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)} + a \]
        3. associate-+l+N/A

          \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
        4. lower-+.f64N/A

          \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
        5. lower-+.f64N/A

          \[\leadsto \color{blue}{\left(t + z\right)} + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right) \]
        6. lower-+.f64N/A

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

          \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(\left(i \cdot y + x \cdot \log y\right) + \frac{-1}{2} \cdot \log c\right)} + a\right) \]
        8. associate-+l+N/A

          \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(i \cdot y + \left(x \cdot \log y + \frac{-1}{2} \cdot \log c\right)\right)} + a\right) \]
        9. +-commutativeN/A

          \[\leadsto \left(t + z\right) + \left(\left(i \cdot y + \color{blue}{\left(\frac{-1}{2} \cdot \log c + x \cdot \log y\right)}\right) + a\right) \]
        10. lower-fma.f64N/A

          \[\leadsto \left(t + z\right) + \left(\color{blue}{\mathsf{fma}\left(i, y, \frac{-1}{2} \cdot \log c + x \cdot \log y\right)} + a\right) \]
        11. +-commutativeN/A

          \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{x \cdot \log y + \frac{-1}{2} \cdot \log c}\right) + a\right) \]
        12. lower-fma.f64N/A

          \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{\mathsf{fma}\left(x, \log y, \frac{-1}{2} \cdot \log c\right)}\right) + a\right) \]
        13. lower-log.f64N/A

          \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \color{blue}{\log y}, \frac{-1}{2} \cdot \log c\right)\right) + a\right) \]
        14. *-commutativeN/A

          \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
        15. lower-*.f64N/A

          \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
        16. lower-log.f6496.3

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

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

        \[\leadsto \left(t + z\right) + \left(i \cdot y + a\right) \]
      7. Step-by-step derivation
        1. Applied rewrites73.8%

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

        if 9.9999999999999994e174 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))

        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. Add Preprocessing
        3. Step-by-step derivation
          1. lift-+.f64N/A

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

            \[\leadsto \color{blue}{y \cdot i + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
          3. lift-*.f64N/A

            \[\leadsto \color{blue}{y \cdot i} + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
          4. lower-fma.f6499.8

            \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right)} \]
          5. lift-+.f64N/A

            \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c}\right) \]
          6. lift-+.f64N/A

            \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)} + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
          7. associate-+l+N/A

            \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\left(\left(x \cdot \log y + z\right) + t\right) + \left(a + \left(b - \frac{1}{2}\right) \cdot \log c\right)}\right) \]
          8. lower-+.f64N/A

            \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\left(\left(x \cdot \log y + z\right) + t\right) + \left(a + \left(b - \frac{1}{2}\right) \cdot \log c\right)}\right) \]
          9. lift-+.f64N/A

            \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\left(\left(x \cdot \log y + z\right) + t\right)} + \left(a + \left(b - \frac{1}{2}\right) \cdot \log c\right)\right) \]
          10. lift-+.f64N/A

            \[\leadsto \mathsf{fma}\left(y, i, \left(\color{blue}{\left(x \cdot \log y + z\right)} + t\right) + \left(a + \left(b - \frac{1}{2}\right) \cdot \log c\right)\right) \]
          11. associate-+l+N/A

            \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\left(x \cdot \log y + \left(z + t\right)\right)} + \left(a + \left(b - \frac{1}{2}\right) \cdot \log c\right)\right) \]
          12. lift-*.f64N/A

            \[\leadsto \mathsf{fma}\left(y, i, \left(\color{blue}{x \cdot \log y} + \left(z + t\right)\right) + \left(a + \left(b - \frac{1}{2}\right) \cdot \log c\right)\right) \]
          13. lower-fma.f64N/A

            \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\mathsf{fma}\left(x, \log y, z + t\right)} + \left(a + \left(b - \frac{1}{2}\right) \cdot \log c\right)\right) \]
          14. lower-+.f64N/A

            \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(x, \log y, \color{blue}{z + t}\right) + \left(a + \left(b - \frac{1}{2}\right) \cdot \log c\right)\right) \]
          15. +-commutativeN/A

            \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(x, \log y, z + t\right) + \color{blue}{\left(\left(b - \frac{1}{2}\right) \cdot \log c + a\right)}\right) \]
          16. lift-*.f64N/A

            \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(x, \log y, z + t\right) + \left(\color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c} + a\right)\right) \]
          17. lower-fma.f6499.8

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

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

          \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{b \cdot \log c}\right) \]
        6. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\log c \cdot b}\right) \]
          2. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\log c \cdot b}\right) \]
          3. lower-log.f6470.0

            \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\log c} \cdot b\right) \]
        7. Applied rewrites70.0%

          \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\log c \cdot b}\right) \]
      8. Recombined 3 regimes into one program.
      9. Final simplification71.7%

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

      Alternative 3: 46.7% accurate, 0.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;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) \leq -200:\\ \;\;\;\;\left(z + t\right) + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \end{array} \]
      (FPCore (x y z t a b c i)
       :precision binary64
       (if (<=
            (+ (* y i) (+ (* (log c) (- b 0.5)) (+ a (+ t (+ z (* x (log y)))))))
            -200.0)
         (+ (+ z t) (* y i))
         (+ a (* y i))))
      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
      	double tmp;
      	if (((y * i) + ((log(c) * (b - 0.5)) + (a + (t + (z + (x * log(y))))))) <= -200.0) {
      		tmp = (z + t) + (y * i);
      	} else {
      		tmp = a + (y * i);
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z, t, a, b, c, i)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8), intent (in) :: c
          real(8), intent (in) :: i
          real(8) :: tmp
          if (((y * i) + ((log(c) * (b - 0.5d0)) + (a + (t + (z + (x * log(y))))))) <= (-200.0d0)) then
              tmp = (z + t) + (y * i)
          else
              tmp = a + (y * i)
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
      	double tmp;
      	if (((y * i) + ((Math.log(c) * (b - 0.5)) + (a + (t + (z + (x * Math.log(y))))))) <= -200.0) {
      		tmp = (z + t) + (y * i);
      	} else {
      		tmp = a + (y * i);
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b, c, i):
      	tmp = 0
      	if ((y * i) + ((math.log(c) * (b - 0.5)) + (a + (t + (z + (x * math.log(y))))))) <= -200.0:
      		tmp = (z + t) + (y * i)
      	else:
      		tmp = a + (y * i)
      	return tmp
      
      function code(x, y, z, t, a, b, c, i)
      	tmp = 0.0
      	if (Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(t + Float64(z + Float64(x * log(y))))))) <= -200.0)
      		tmp = Float64(Float64(z + t) + Float64(y * i));
      	else
      		tmp = Float64(a + Float64(y * i));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b, c, i)
      	tmp = 0.0;
      	if (((y * i) + ((log(c) * (b - 0.5)) + (a + (t + (z + (x * log(y))))))) <= -200.0)
      		tmp = (z + t) + (y * i);
      	else
      		tmp = a + (y * i);
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[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], -200.0], N[(N[(z + t), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;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) \leq -200:\\
      \;\;\;\;\left(z + t\right) + y \cdot i\\
      
      \mathbf{else}:\\
      \;\;\;\;a + y \cdot i\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -200

        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. Add Preprocessing
        3. Taylor expanded in b around 0

          \[\leadsto \color{blue}{a + \left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right)} \]
        4. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \color{blue}{\left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right) + a} \]
          2. associate-+r+N/A

            \[\leadsto \color{blue}{\left(\left(t + z\right) + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)} + a \]
          3. associate-+l+N/A

            \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
          4. lower-+.f64N/A

            \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
          5. lower-+.f64N/A

            \[\leadsto \color{blue}{\left(t + z\right)} + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right) \]
          6. lower-+.f64N/A

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

            \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(\left(i \cdot y + x \cdot \log y\right) + \frac{-1}{2} \cdot \log c\right)} + a\right) \]
          8. associate-+l+N/A

            \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(i \cdot y + \left(x \cdot \log y + \frac{-1}{2} \cdot \log c\right)\right)} + a\right) \]
          9. +-commutativeN/A

            \[\leadsto \left(t + z\right) + \left(\left(i \cdot y + \color{blue}{\left(\frac{-1}{2} \cdot \log c + x \cdot \log y\right)}\right) + a\right) \]
          10. lower-fma.f64N/A

            \[\leadsto \left(t + z\right) + \left(\color{blue}{\mathsf{fma}\left(i, y, \frac{-1}{2} \cdot \log c + x \cdot \log y\right)} + a\right) \]
          11. +-commutativeN/A

            \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{x \cdot \log y + \frac{-1}{2} \cdot \log c}\right) + a\right) \]
          12. lower-fma.f64N/A

            \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{\mathsf{fma}\left(x, \log y, \frac{-1}{2} \cdot \log c\right)}\right) + a\right) \]
          13. lower-log.f64N/A

            \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \color{blue}{\log y}, \frac{-1}{2} \cdot \log c\right)\right) + a\right) \]
          14. *-commutativeN/A

            \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
          15. lower-*.f64N/A

            \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
          16. lower-log.f6480.2

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

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

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

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

          if -200 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y 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. Add Preprocessing
          3. Taylor expanded in x around 0

            \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
          4. Step-by-step derivation
            1. lower-+.f64N/A

              \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
            2. +-commutativeN/A

              \[\leadsto a + \color{blue}{\left(\left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) + t\right)} \]
            3. associate-+r+N/A

              \[\leadsto a + \left(\color{blue}{\left(\left(z + i \cdot y\right) + \log c \cdot \left(b - \frac{1}{2}\right)\right)} + t\right) \]
            4. associate-+l+N/A

              \[\leadsto a + \color{blue}{\left(\left(z + i \cdot y\right) + \left(\log c \cdot \left(b - \frac{1}{2}\right) + t\right)\right)} \]
            5. lower-+.f64N/A

              \[\leadsto a + \color{blue}{\left(\left(z + i \cdot y\right) + \left(\log c \cdot \left(b - \frac{1}{2}\right) + t\right)\right)} \]
            6. +-commutativeN/A

              \[\leadsto a + \left(\color{blue}{\left(i \cdot y + z\right)} + \left(\log c \cdot \left(b - \frac{1}{2}\right) + t\right)\right) \]
            7. lower-fma.f64N/A

              \[\leadsto a + \left(\color{blue}{\mathsf{fma}\left(i, y, z\right)} + \left(\log c \cdot \left(b - \frac{1}{2}\right) + t\right)\right) \]
            8. lower-fma.f64N/A

              \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \color{blue}{\mathsf{fma}\left(\log c, b - \frac{1}{2}, t\right)}\right) \]
            9. lower-log.f64N/A

              \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\color{blue}{\log c}, b - \frac{1}{2}, t\right)\right) \]
            10. sub-negN/A

              \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, \color{blue}{b + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, t\right)\right) \]
            11. metadata-evalN/A

              \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + \color{blue}{\frac{-1}{2}}, t\right)\right) \]
            12. lower-+.f6481.0

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

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

            \[\leadsto a + i \cdot \color{blue}{y} \]
          7. Step-by-step derivation
            1. Applied rewrites38.8%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;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) \leq -200:\\ \;\;\;\;\left(z + t\right) + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \]
          10. Add Preprocessing

          Alternative 4: 84.5% accurate, 1.0× speedup?

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

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

            \[\leadsto \color{blue}{a + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
          4. Step-by-step derivation
            1. lower-+.f64N/A

              \[\leadsto \color{blue}{a + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
            2. +-commutativeN/A

              \[\leadsto a + \color{blue}{\left(\left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) + z\right)} \]
            3. associate-+l+N/A

              \[\leadsto a + \color{blue}{\left(i \cdot y + \left(\left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right) + z\right)\right)} \]
            4. +-commutativeN/A

              \[\leadsto a + \left(i \cdot y + \color{blue}{\left(z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}\right) \]
            5. lower-fma.f64N/A

              \[\leadsto a + \color{blue}{\mathsf{fma}\left(i, y, z + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)} \]
            6. associate-+r+N/A

              \[\leadsto a + \mathsf{fma}\left(i, y, \color{blue}{\left(z + x \cdot \log y\right) + \log c \cdot \left(b - \frac{1}{2}\right)}\right) \]
            7. +-commutativeN/A

              \[\leadsto a + \mathsf{fma}\left(i, y, \color{blue}{\log c \cdot \left(b - \frac{1}{2}\right) + \left(z + x \cdot \log y\right)}\right) \]
            8. lower-fma.f64N/A

              \[\leadsto a + \mathsf{fma}\left(i, y, \color{blue}{\mathsf{fma}\left(\log c, b - \frac{1}{2}, z + x \cdot \log y\right)}\right) \]
            9. lower-log.f64N/A

              \[\leadsto a + \mathsf{fma}\left(i, y, \mathsf{fma}\left(\color{blue}{\log c}, b - \frac{1}{2}, z + x \cdot \log y\right)\right) \]
            10. sub-negN/A

              \[\leadsto a + \mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, \color{blue}{b + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, z + x \cdot \log y\right)\right) \]
            11. metadata-evalN/A

              \[\leadsto a + \mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b + \color{blue}{\frac{-1}{2}}, z + x \cdot \log y\right)\right) \]
            12. lower-+.f64N/A

              \[\leadsto a + \mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, \color{blue}{b + \frac{-1}{2}}, z + x \cdot \log y\right)\right) \]
            13. +-commutativeN/A

              \[\leadsto a + \mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b + \frac{-1}{2}, \color{blue}{x \cdot \log y + z}\right)\right) \]
            14. lower-fma.f64N/A

              \[\leadsto a + \mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b + \frac{-1}{2}, \color{blue}{\mathsf{fma}\left(x, \log y, z\right)}\right)\right) \]
            15. lower-log.f6484.0

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

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

          Alternative 5: 89.2% accurate, 1.7× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := a + \left(t + \mathsf{fma}\left(\log c, b + -0.5, z\right)\right)\\ \mathbf{if}\;b - 0.5 \leq -1 \cdot 10^{+210}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b - 0.5 \leq 10^{+144}:\\ \;\;\;\;\left(z + t\right) + \left(a + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (x y z t a b c i)
           :precision binary64
           (let* ((t_1 (+ a (+ t (fma (log c) (+ b -0.5) z)))))
             (if (<= (- b 0.5) -1e+210)
               t_1
               (if (<= (- b 0.5) 1e+144)
                 (+ (+ z t) (+ a (fma i y (* x (log y)))))
                 t_1))))
          double code(double x, double y, double z, double t, double a, double b, double c, double i) {
          	double t_1 = a + (t + fma(log(c), (b + -0.5), z));
          	double tmp;
          	if ((b - 0.5) <= -1e+210) {
          		tmp = t_1;
          	} else if ((b - 0.5) <= 1e+144) {
          		tmp = (z + t) + (a + fma(i, y, (x * log(y))));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b, c, i)
          	t_1 = Float64(a + Float64(t + fma(log(c), Float64(b + -0.5), z)))
          	tmp = 0.0
          	if (Float64(b - 0.5) <= -1e+210)
          		tmp = t_1;
          	elseif (Float64(b - 0.5) <= 1e+144)
          		tmp = Float64(Float64(z + t) + Float64(a + fma(i, y, Float64(x * log(y)))));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(t + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b - 0.5), $MachinePrecision], -1e+210], t$95$1, If[LessEqual[N[(b - 0.5), $MachinePrecision], 1e+144], N[(N[(z + t), $MachinePrecision] + N[(a + N[(i * y + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := a + \left(t + \mathsf{fma}\left(\log c, b + -0.5, z\right)\right)\\
          \mathbf{if}\;b - 0.5 \leq -1 \cdot 10^{+210}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;b - 0.5 \leq 10^{+144}:\\
          \;\;\;\;\left(z + t\right) + \left(a + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (-.f64 b #s(literal 1/2 binary64)) < -9.99999999999999927e209 or 1.00000000000000002e144 < (-.f64 b #s(literal 1/2 binary64))

            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. Add Preprocessing
            3. Taylor expanded in x around 0

              \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
            4. Step-by-step derivation
              1. lower-+.f64N/A

                \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
              2. +-commutativeN/A

                \[\leadsto a + \color{blue}{\left(\left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) + t\right)} \]
              3. associate-+r+N/A

                \[\leadsto a + \left(\color{blue}{\left(\left(z + i \cdot y\right) + \log c \cdot \left(b - \frac{1}{2}\right)\right)} + t\right) \]
              4. associate-+l+N/A

                \[\leadsto a + \color{blue}{\left(\left(z + i \cdot y\right) + \left(\log c \cdot \left(b - \frac{1}{2}\right) + t\right)\right)} \]
              5. lower-+.f64N/A

                \[\leadsto a + \color{blue}{\left(\left(z + i \cdot y\right) + \left(\log c \cdot \left(b - \frac{1}{2}\right) + t\right)\right)} \]
              6. +-commutativeN/A

                \[\leadsto a + \left(\color{blue}{\left(i \cdot y + z\right)} + \left(\log c \cdot \left(b - \frac{1}{2}\right) + t\right)\right) \]
              7. lower-fma.f64N/A

                \[\leadsto a + \left(\color{blue}{\mathsf{fma}\left(i, y, z\right)} + \left(\log c \cdot \left(b - \frac{1}{2}\right) + t\right)\right) \]
              8. lower-fma.f64N/A

                \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \color{blue}{\mathsf{fma}\left(\log c, b - \frac{1}{2}, t\right)}\right) \]
              9. lower-log.f64N/A

                \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\color{blue}{\log c}, b - \frac{1}{2}, t\right)\right) \]
              10. sub-negN/A

                \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, \color{blue}{b + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, t\right)\right) \]
              11. metadata-evalN/A

                \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + \color{blue}{\frac{-1}{2}}, t\right)\right) \]
              12. lower-+.f6491.2

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

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

              \[\leadsto a + \left(t + \color{blue}{\left(z + \log c \cdot \left(b - \frac{1}{2}\right)\right)}\right) \]
            7. Step-by-step derivation
              1. Applied rewrites80.7%

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

              if -9.99999999999999927e209 < (-.f64 b #s(literal 1/2 binary64)) < 1.00000000000000002e144

              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. Add Preprocessing
              3. Taylor expanded in b around 0

                \[\leadsto \color{blue}{a + \left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right)} \]
              4. Step-by-step derivation
                1. +-commutativeN/A

                  \[\leadsto \color{blue}{\left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right) + a} \]
                2. associate-+r+N/A

                  \[\leadsto \color{blue}{\left(\left(t + z\right) + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)} + a \]
                3. associate-+l+N/A

                  \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
                4. lower-+.f64N/A

                  \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
                5. lower-+.f64N/A

                  \[\leadsto \color{blue}{\left(t + z\right)} + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right) \]
                6. lower-+.f64N/A

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

                  \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(\left(i \cdot y + x \cdot \log y\right) + \frac{-1}{2} \cdot \log c\right)} + a\right) \]
                8. associate-+l+N/A

                  \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(i \cdot y + \left(x \cdot \log y + \frac{-1}{2} \cdot \log c\right)\right)} + a\right) \]
                9. +-commutativeN/A

                  \[\leadsto \left(t + z\right) + \left(\left(i \cdot y + \color{blue}{\left(\frac{-1}{2} \cdot \log c + x \cdot \log y\right)}\right) + a\right) \]
                10. lower-fma.f64N/A

                  \[\leadsto \left(t + z\right) + \left(\color{blue}{\mathsf{fma}\left(i, y, \frac{-1}{2} \cdot \log c + x \cdot \log y\right)} + a\right) \]
                11. +-commutativeN/A

                  \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{x \cdot \log y + \frac{-1}{2} \cdot \log c}\right) + a\right) \]
                12. lower-fma.f64N/A

                  \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{\mathsf{fma}\left(x, \log y, \frac{-1}{2} \cdot \log c\right)}\right) + a\right) \]
                13. lower-log.f64N/A

                  \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \color{blue}{\log y}, \frac{-1}{2} \cdot \log c\right)\right) + a\right) \]
                14. *-commutativeN/A

                  \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
                15. lower-*.f64N/A

                  \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
                16. lower-log.f6496.5

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

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

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

                  \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, x \cdot \log y\right) + a\right) \]
              8. Recombined 2 regimes into one program.
              9. Final simplification91.1%

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

              Alternative 6: 95.6% accurate, 1.7× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z + t\right) + \left(a + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\\ \mathbf{if}\;x \leq -1.4 \cdot 10^{+95}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{+109}:\\ \;\;\;\;\left(t + \left(a + \mathsf{fma}\left(\log c, b + -0.5, z\right)\right)\right) + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
              (FPCore (x y z t a b c i)
               :precision binary64
               (let* ((t_1 (+ (+ z t) (+ a (fma i y (* x (log y)))))))
                 (if (<= x -1.4e+95)
                   t_1
                   (if (<= x 3.6e+109)
                     (+ (+ t (+ a (fma (log c) (+ b -0.5) 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 = (z + t) + (a + fma(i, y, (x * log(y))));
              	double tmp;
              	if (x <= -1.4e+95) {
              		tmp = t_1;
              	} else if (x <= 3.6e+109) {
              		tmp = (t + (a + fma(log(c), (b + -0.5), z))) + (y * i);
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              function code(x, y, z, t, a, b, c, i)
              	t_1 = Float64(Float64(z + t) + Float64(a + fma(i, y, Float64(x * log(y)))))
              	tmp = 0.0
              	if (x <= -1.4e+95)
              		tmp = t_1;
              	elseif (x <= 3.6e+109)
              		tmp = Float64(Float64(t + Float64(a + fma(log(c), Float64(b + -0.5), z))) + Float64(y * i));
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(z + t), $MachinePrecision] + N[(a + N[(i * y + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.4e+95], t$95$1, If[LessEqual[x, 3.6e+109], N[(N[(t + N[(a + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \left(z + t\right) + \left(a + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\\
              \mathbf{if}\;x \leq -1.4 \cdot 10^{+95}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;x \leq 3.6 \cdot 10^{+109}:\\
              \;\;\;\;\left(t + \left(a + \mathsf{fma}\left(\log c, b + -0.5, z\right)\right)\right) + y \cdot i\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if x < -1.3999999999999999e95 or 3.6e109 < 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. Add Preprocessing
                3. Taylor expanded in b around 0

                  \[\leadsto \color{blue}{a + \left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right)} \]
                4. Step-by-step derivation
                  1. +-commutativeN/A

                    \[\leadsto \color{blue}{\left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right) + a} \]
                  2. associate-+r+N/A

                    \[\leadsto \color{blue}{\left(\left(t + z\right) + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)} + a \]
                  3. associate-+l+N/A

                    \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
                  4. lower-+.f64N/A

                    \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
                  5. lower-+.f64N/A

                    \[\leadsto \color{blue}{\left(t + z\right)} + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right) \]
                  6. lower-+.f64N/A

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

                    \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(\left(i \cdot y + x \cdot \log y\right) + \frac{-1}{2} \cdot \log c\right)} + a\right) \]
                  8. associate-+l+N/A

                    \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(i \cdot y + \left(x \cdot \log y + \frac{-1}{2} \cdot \log c\right)\right)} + a\right) \]
                  9. +-commutativeN/A

                    \[\leadsto \left(t + z\right) + \left(\left(i \cdot y + \color{blue}{\left(\frac{-1}{2} \cdot \log c + x \cdot \log y\right)}\right) + a\right) \]
                  10. lower-fma.f64N/A

                    \[\leadsto \left(t + z\right) + \left(\color{blue}{\mathsf{fma}\left(i, y, \frac{-1}{2} \cdot \log c + x \cdot \log y\right)} + a\right) \]
                  11. +-commutativeN/A

                    \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{x \cdot \log y + \frac{-1}{2} \cdot \log c}\right) + a\right) \]
                  12. lower-fma.f64N/A

                    \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{\mathsf{fma}\left(x, \log y, \frac{-1}{2} \cdot \log c\right)}\right) + a\right) \]
                  13. lower-log.f64N/A

                    \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \color{blue}{\log y}, \frac{-1}{2} \cdot \log c\right)\right) + a\right) \]
                  14. *-commutativeN/A

                    \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
                  15. lower-*.f64N/A

                    \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
                  16. lower-log.f6492.1

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

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

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

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

                  if -1.3999999999999999e95 < x < 3.6e109

                  1. Initial program 99.9%

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

                    \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} + y \cdot i \]
                  4. Step-by-step derivation
                    1. +-commutativeN/A

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

                      \[\leadsto \color{blue}{\left(t + \left(\left(z + \log c \cdot \left(b - \frac{1}{2}\right)\right) + a\right)\right)} + y \cdot i \]
                    3. lower-+.f64N/A

                      \[\leadsto \color{blue}{\left(t + \left(\left(z + \log c \cdot \left(b - \frac{1}{2}\right)\right) + a\right)\right)} + y \cdot i \]
                    4. lower-+.f64N/A

                      \[\leadsto \left(t + \color{blue}{\left(\left(z + \log c \cdot \left(b - \frac{1}{2}\right)\right) + a\right)}\right) + y \cdot i \]
                    5. +-commutativeN/A

                      \[\leadsto \left(t + \left(\color{blue}{\left(\log c \cdot \left(b - \frac{1}{2}\right) + z\right)} + a\right)\right) + y \cdot i \]
                    6. lower-fma.f64N/A

                      \[\leadsto \left(t + \left(\color{blue}{\mathsf{fma}\left(\log c, b - \frac{1}{2}, z\right)} + a\right)\right) + y \cdot i \]
                    7. lower-log.f64N/A

                      \[\leadsto \left(t + \left(\mathsf{fma}\left(\color{blue}{\log c}, b - \frac{1}{2}, z\right) + a\right)\right) + y \cdot i \]
                    8. sub-negN/A

                      \[\leadsto \left(t + \left(\mathsf{fma}\left(\log c, \color{blue}{b + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, z\right) + a\right)\right) + y \cdot i \]
                    9. metadata-evalN/A

                      \[\leadsto \left(t + \left(\mathsf{fma}\left(\log c, b + \color{blue}{\frac{-1}{2}}, z\right) + a\right)\right) + y \cdot i \]
                    10. lower-+.f6497.6

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

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

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

                Alternative 7: 95.6% accurate, 1.7× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z + t\right) + \left(a + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\\ \mathbf{if}\;x \leq -1.4 \cdot 10^{+95}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{+109}:\\ \;\;\;\;a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + -0.5, t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                (FPCore (x y z t a b c i)
                 :precision binary64
                 (let* ((t_1 (+ (+ z t) (+ a (fma i y (* x (log y)))))))
                   (if (<= x -1.4e+95)
                     t_1
                     (if (<= x 3.6e+109)
                       (+ a (+ (fma i y z) (fma (log c) (+ b -0.5) t)))
                       t_1))))
                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                	double t_1 = (z + t) + (a + fma(i, y, (x * log(y))));
                	double tmp;
                	if (x <= -1.4e+95) {
                		tmp = t_1;
                	} else if (x <= 3.6e+109) {
                		tmp = a + (fma(i, y, z) + fma(log(c), (b + -0.5), t));
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                function code(x, y, z, t, a, b, c, i)
                	t_1 = Float64(Float64(z + t) + Float64(a + fma(i, y, Float64(x * log(y)))))
                	tmp = 0.0
                	if (x <= -1.4e+95)
                		tmp = t_1;
                	elseif (x <= 3.6e+109)
                		tmp = Float64(a + Float64(fma(i, y, z) + fma(log(c), Float64(b + -0.5), t)));
                	else
                		tmp = t_1;
                	end
                	return tmp
                end
                
                code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(z + t), $MachinePrecision] + N[(a + N[(i * y + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.4e+95], t$95$1, If[LessEqual[x, 3.6e+109], N[(a + N[(N[(i * y + z), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := \left(z + t\right) + \left(a + \mathsf{fma}\left(i, y, x \cdot \log y\right)\right)\\
                \mathbf{if}\;x \leq -1.4 \cdot 10^{+95}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;x \leq 3.6 \cdot 10^{+109}:\\
                \;\;\;\;a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + -0.5, t\right)\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if x < -1.3999999999999999e95 or 3.6e109 < 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. Add Preprocessing
                  3. Taylor expanded in b around 0

                    \[\leadsto \color{blue}{a + \left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right)} \]
                  4. Step-by-step derivation
                    1. +-commutativeN/A

                      \[\leadsto \color{blue}{\left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right) + a} \]
                    2. associate-+r+N/A

                      \[\leadsto \color{blue}{\left(\left(t + z\right) + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)} + a \]
                    3. associate-+l+N/A

                      \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
                    4. lower-+.f64N/A

                      \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
                    5. lower-+.f64N/A

                      \[\leadsto \color{blue}{\left(t + z\right)} + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right) \]
                    6. lower-+.f64N/A

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

                      \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(\left(i \cdot y + x \cdot \log y\right) + \frac{-1}{2} \cdot \log c\right)} + a\right) \]
                    8. associate-+l+N/A

                      \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(i \cdot y + \left(x \cdot \log y + \frac{-1}{2} \cdot \log c\right)\right)} + a\right) \]
                    9. +-commutativeN/A

                      \[\leadsto \left(t + z\right) + \left(\left(i \cdot y + \color{blue}{\left(\frac{-1}{2} \cdot \log c + x \cdot \log y\right)}\right) + a\right) \]
                    10. lower-fma.f64N/A

                      \[\leadsto \left(t + z\right) + \left(\color{blue}{\mathsf{fma}\left(i, y, \frac{-1}{2} \cdot \log c + x \cdot \log y\right)} + a\right) \]
                    11. +-commutativeN/A

                      \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{x \cdot \log y + \frac{-1}{2} \cdot \log c}\right) + a\right) \]
                    12. lower-fma.f64N/A

                      \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{\mathsf{fma}\left(x, \log y, \frac{-1}{2} \cdot \log c\right)}\right) + a\right) \]
                    13. lower-log.f64N/A

                      \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \color{blue}{\log y}, \frac{-1}{2} \cdot \log c\right)\right) + a\right) \]
                    14. *-commutativeN/A

                      \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
                    15. lower-*.f64N/A

                      \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
                    16. lower-log.f6492.1

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

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

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

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

                    if -1.3999999999999999e95 < x < 3.6e109

                    1. Initial program 99.9%

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

                      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                    4. Step-by-step derivation
                      1. lower-+.f64N/A

                        \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                      2. +-commutativeN/A

                        \[\leadsto a + \color{blue}{\left(\left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) + t\right)} \]
                      3. associate-+r+N/A

                        \[\leadsto a + \left(\color{blue}{\left(\left(z + i \cdot y\right) + \log c \cdot \left(b - \frac{1}{2}\right)\right)} + t\right) \]
                      4. associate-+l+N/A

                        \[\leadsto a + \color{blue}{\left(\left(z + i \cdot y\right) + \left(\log c \cdot \left(b - \frac{1}{2}\right) + t\right)\right)} \]
                      5. lower-+.f64N/A

                        \[\leadsto a + \color{blue}{\left(\left(z + i \cdot y\right) + \left(\log c \cdot \left(b - \frac{1}{2}\right) + t\right)\right)} \]
                      6. +-commutativeN/A

                        \[\leadsto a + \left(\color{blue}{\left(i \cdot y + z\right)} + \left(\log c \cdot \left(b - \frac{1}{2}\right) + t\right)\right) \]
                      7. lower-fma.f64N/A

                        \[\leadsto a + \left(\color{blue}{\mathsf{fma}\left(i, y, z\right)} + \left(\log c \cdot \left(b - \frac{1}{2}\right) + t\right)\right) \]
                      8. lower-fma.f64N/A

                        \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \color{blue}{\mathsf{fma}\left(\log c, b - \frac{1}{2}, t\right)}\right) \]
                      9. lower-log.f64N/A

                        \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\color{blue}{\log c}, b - \frac{1}{2}, t\right)\right) \]
                      10. sub-negN/A

                        \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, \color{blue}{b + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, t\right)\right) \]
                      11. metadata-evalN/A

                        \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + \color{blue}{\frac{-1}{2}}, t\right)\right) \]
                      12. lower-+.f6497.6

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

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

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

                  Alternative 8: 75.3% accurate, 1.8× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z + t\right) + \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, -0.5, a\right)\right)\\ \mathbf{if}\;i \leq -1.4 \cdot 10^{+70}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;i \leq 3.6 \cdot 10^{+54}:\\ \;\;\;\;\left(z + t\right) + \left(a + x \cdot \log y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b c i)
                   :precision binary64
                   (let* ((t_1 (+ (+ z t) (fma y i (fma (log c) -0.5 a)))))
                     (if (<= i -1.4e+70)
                       t_1
                       (if (<= i 3.6e+54) (+ (+ z t) (+ a (* x (log y)))) t_1))))
                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	double t_1 = (z + t) + fma(y, i, fma(log(c), -0.5, a));
                  	double tmp;
                  	if (i <= -1.4e+70) {
                  		tmp = t_1;
                  	} else if (i <= 3.6e+54) {
                  		tmp = (z + t) + (a + (x * log(y)));
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  function code(x, y, z, t, a, b, c, i)
                  	t_1 = Float64(Float64(z + t) + fma(y, i, fma(log(c), -0.5, a)))
                  	tmp = 0.0
                  	if (i <= -1.4e+70)
                  		tmp = t_1;
                  	elseif (i <= 3.6e+54)
                  		tmp = Float64(Float64(z + t) + Float64(a + Float64(x * log(y))));
                  	else
                  		tmp = t_1;
                  	end
                  	return tmp
                  end
                  
                  code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(z + t), $MachinePrecision] + N[(y * i + N[(N[Log[c], $MachinePrecision] * -0.5 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -1.4e+70], t$95$1, If[LessEqual[i, 3.6e+54], N[(N[(z + t), $MachinePrecision] + N[(a + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := \left(z + t\right) + \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, -0.5, a\right)\right)\\
                  \mathbf{if}\;i \leq -1.4 \cdot 10^{+70}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;i \leq 3.6 \cdot 10^{+54}:\\
                  \;\;\;\;\left(z + t\right) + \left(a + x \cdot \log y\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if i < -1.39999999999999995e70 or 3.6000000000000001e54 < i

                    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. Add Preprocessing
                    3. Taylor expanded in b around 0

                      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right)} \]
                    4. Step-by-step derivation
                      1. +-commutativeN/A

                        \[\leadsto \color{blue}{\left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right) + a} \]
                      2. associate-+r+N/A

                        \[\leadsto \color{blue}{\left(\left(t + z\right) + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)} + a \]
                      3. associate-+l+N/A

                        \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
                      4. lower-+.f64N/A

                        \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
                      5. lower-+.f64N/A

                        \[\leadsto \color{blue}{\left(t + z\right)} + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right) \]
                      6. lower-+.f64N/A

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

                        \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(\left(i \cdot y + x \cdot \log y\right) + \frac{-1}{2} \cdot \log c\right)} + a\right) \]
                      8. associate-+l+N/A

                        \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(i \cdot y + \left(x \cdot \log y + \frac{-1}{2} \cdot \log c\right)\right)} + a\right) \]
                      9. +-commutativeN/A

                        \[\leadsto \left(t + z\right) + \left(\left(i \cdot y + \color{blue}{\left(\frac{-1}{2} \cdot \log c + x \cdot \log y\right)}\right) + a\right) \]
                      10. lower-fma.f64N/A

                        \[\leadsto \left(t + z\right) + \left(\color{blue}{\mathsf{fma}\left(i, y, \frac{-1}{2} \cdot \log c + x \cdot \log y\right)} + a\right) \]
                      11. +-commutativeN/A

                        \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{x \cdot \log y + \frac{-1}{2} \cdot \log c}\right) + a\right) \]
                      12. lower-fma.f64N/A

                        \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{\mathsf{fma}\left(x, \log y, \frac{-1}{2} \cdot \log c\right)}\right) + a\right) \]
                      13. lower-log.f64N/A

                        \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \color{blue}{\log y}, \frac{-1}{2} \cdot \log c\right)\right) + a\right) \]
                      14. *-commutativeN/A

                        \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
                      15. lower-*.f64N/A

                        \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
                      16. lower-log.f6489.1

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

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

                      \[\leadsto \left(t + z\right) + \left(a + \color{blue}{\left(\frac{-1}{2} \cdot \log c + i \cdot y\right)}\right) \]
                    7. Step-by-step derivation
                      1. Applied rewrites81.0%

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

                      if -1.39999999999999995e70 < i < 3.6000000000000001e54

                      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. Add Preprocessing
                      3. Taylor expanded in b around 0

                        \[\leadsto \color{blue}{a + \left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right)} \]
                      4. Step-by-step derivation
                        1. +-commutativeN/A

                          \[\leadsto \color{blue}{\left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right) + a} \]
                        2. associate-+r+N/A

                          \[\leadsto \color{blue}{\left(\left(t + z\right) + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)} + a \]
                        3. associate-+l+N/A

                          \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
                        4. lower-+.f64N/A

                          \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
                        5. lower-+.f64N/A

                          \[\leadsto \color{blue}{\left(t + z\right)} + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right) \]
                        6. lower-+.f64N/A

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

                          \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(\left(i \cdot y + x \cdot \log y\right) + \frac{-1}{2} \cdot \log c\right)} + a\right) \]
                        8. associate-+l+N/A

                          \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(i \cdot y + \left(x \cdot \log y + \frac{-1}{2} \cdot \log c\right)\right)} + a\right) \]
                        9. +-commutativeN/A

                          \[\leadsto \left(t + z\right) + \left(\left(i \cdot y + \color{blue}{\left(\frac{-1}{2} \cdot \log c + x \cdot \log y\right)}\right) + a\right) \]
                        10. lower-fma.f64N/A

                          \[\leadsto \left(t + z\right) + \left(\color{blue}{\mathsf{fma}\left(i, y, \frac{-1}{2} \cdot \log c + x \cdot \log y\right)} + a\right) \]
                        11. +-commutativeN/A

                          \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{x \cdot \log y + \frac{-1}{2} \cdot \log c}\right) + a\right) \]
                        12. lower-fma.f64N/A

                          \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{\mathsf{fma}\left(x, \log y, \frac{-1}{2} \cdot \log c\right)}\right) + a\right) \]
                        13. lower-log.f64N/A

                          \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \color{blue}{\log y}, \frac{-1}{2} \cdot \log c\right)\right) + a\right) \]
                        14. *-commutativeN/A

                          \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
                        15. lower-*.f64N/A

                          \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
                        16. lower-log.f6478.7

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

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

                        \[\leadsto \left(t + z\right) + \left(x \cdot \log y + a\right) \]
                      7. Step-by-step derivation
                        1. Applied rewrites75.3%

                          \[\leadsto \left(t + z\right) + \left(x \cdot \log y + a\right) \]
                      8. Recombined 2 regimes into one program.
                      9. Final simplification77.3%

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

                      Alternative 9: 75.2% accurate, 1.8× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z + t\right) + \left(a + y \cdot i\right)\\ \mathbf{if}\;i \leq -1.4 \cdot 10^{+70}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;i \leq 3.6 \cdot 10^{+54}:\\ \;\;\;\;\left(z + t\right) + \left(a + x \cdot \log y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b c i)
                       :precision binary64
                       (let* ((t_1 (+ (+ z t) (+ a (* y i)))))
                         (if (<= i -1.4e+70)
                           t_1
                           (if (<= i 3.6e+54) (+ (+ z t) (+ a (* x (log y)))) t_1))))
                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	double t_1 = (z + t) + (a + (y * i));
                      	double tmp;
                      	if (i <= -1.4e+70) {
                      		tmp = t_1;
                      	} else if (i <= 3.6e+54) {
                      		tmp = (z + t) + (a + (x * log(y)));
                      	} 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 = (z + t) + (a + (y * i))
                          if (i <= (-1.4d+70)) then
                              tmp = t_1
                          else if (i <= 3.6d+54) then
                              tmp = (z + t) + (a + (x * log(y)))
                          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 = (z + t) + (a + (y * i));
                      	double tmp;
                      	if (i <= -1.4e+70) {
                      		tmp = t_1;
                      	} else if (i <= 3.6e+54) {
                      		tmp = (z + t) + (a + (x * Math.log(y)));
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t, a, b, c, i):
                      	t_1 = (z + t) + (a + (y * i))
                      	tmp = 0
                      	if i <= -1.4e+70:
                      		tmp = t_1
                      	elif i <= 3.6e+54:
                      		tmp = (z + t) + (a + (x * math.log(y)))
                      	else:
                      		tmp = t_1
                      	return tmp
                      
                      function code(x, y, z, t, a, b, c, i)
                      	t_1 = Float64(Float64(z + t) + Float64(a + Float64(y * i)))
                      	tmp = 0.0
                      	if (i <= -1.4e+70)
                      		tmp = t_1;
                      	elseif (i <= 3.6e+54)
                      		tmp = Float64(Float64(z + t) + Float64(a + Float64(x * log(y))));
                      	else
                      		tmp = t_1;
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(x, y, z, t, a, b, c, i)
                      	t_1 = (z + t) + (a + (y * i));
                      	tmp = 0.0;
                      	if (i <= -1.4e+70)
                      		tmp = t_1;
                      	elseif (i <= 3.6e+54)
                      		tmp = (z + t) + (a + (x * log(y)));
                      	else
                      		tmp = t_1;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(z + t), $MachinePrecision] + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -1.4e+70], t$95$1, If[LessEqual[i, 3.6e+54], N[(N[(z + t), $MachinePrecision] + N[(a + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_1 := \left(z + t\right) + \left(a + y \cdot i\right)\\
                      \mathbf{if}\;i \leq -1.4 \cdot 10^{+70}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;i \leq 3.6 \cdot 10^{+54}:\\
                      \;\;\;\;\left(z + t\right) + \left(a + x \cdot \log y\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if i < -1.39999999999999995e70 or 3.6000000000000001e54 < i

                        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. Add Preprocessing
                        3. Taylor expanded in b around 0

                          \[\leadsto \color{blue}{a + \left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right)} \]
                        4. Step-by-step derivation
                          1. +-commutativeN/A

                            \[\leadsto \color{blue}{\left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right) + a} \]
                          2. associate-+r+N/A

                            \[\leadsto \color{blue}{\left(\left(t + z\right) + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)} + a \]
                          3. associate-+l+N/A

                            \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
                          4. lower-+.f64N/A

                            \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
                          5. lower-+.f64N/A

                            \[\leadsto \color{blue}{\left(t + z\right)} + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right) \]
                          6. lower-+.f64N/A

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

                            \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(\left(i \cdot y + x \cdot \log y\right) + \frac{-1}{2} \cdot \log c\right)} + a\right) \]
                          8. associate-+l+N/A

                            \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(i \cdot y + \left(x \cdot \log y + \frac{-1}{2} \cdot \log c\right)\right)} + a\right) \]
                          9. +-commutativeN/A

                            \[\leadsto \left(t + z\right) + \left(\left(i \cdot y + \color{blue}{\left(\frac{-1}{2} \cdot \log c + x \cdot \log y\right)}\right) + a\right) \]
                          10. lower-fma.f64N/A

                            \[\leadsto \left(t + z\right) + \left(\color{blue}{\mathsf{fma}\left(i, y, \frac{-1}{2} \cdot \log c + x \cdot \log y\right)} + a\right) \]
                          11. +-commutativeN/A

                            \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{x \cdot \log y + \frac{-1}{2} \cdot \log c}\right) + a\right) \]
                          12. lower-fma.f64N/A

                            \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{\mathsf{fma}\left(x, \log y, \frac{-1}{2} \cdot \log c\right)}\right) + a\right) \]
                          13. lower-log.f64N/A

                            \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \color{blue}{\log y}, \frac{-1}{2} \cdot \log c\right)\right) + a\right) \]
                          14. *-commutativeN/A

                            \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
                          15. lower-*.f64N/A

                            \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
                          16. lower-log.f6489.1

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

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

                          \[\leadsto \left(t + z\right) + \left(i \cdot y + a\right) \]
                        7. Step-by-step derivation
                          1. Applied rewrites80.0%

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

                          if -1.39999999999999995e70 < i < 3.6000000000000001e54

                          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. Add Preprocessing
                          3. Taylor expanded in b around 0

                            \[\leadsto \color{blue}{a + \left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right)} \]
                          4. Step-by-step derivation
                            1. +-commutativeN/A

                              \[\leadsto \color{blue}{\left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right) + a} \]
                            2. associate-+r+N/A

                              \[\leadsto \color{blue}{\left(\left(t + z\right) + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)} + a \]
                            3. associate-+l+N/A

                              \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
                            4. lower-+.f64N/A

                              \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
                            5. lower-+.f64N/A

                              \[\leadsto \color{blue}{\left(t + z\right)} + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right) \]
                            6. lower-+.f64N/A

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

                              \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(\left(i \cdot y + x \cdot \log y\right) + \frac{-1}{2} \cdot \log c\right)} + a\right) \]
                            8. associate-+l+N/A

                              \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(i \cdot y + \left(x \cdot \log y + \frac{-1}{2} \cdot \log c\right)\right)} + a\right) \]
                            9. +-commutativeN/A

                              \[\leadsto \left(t + z\right) + \left(\left(i \cdot y + \color{blue}{\left(\frac{-1}{2} \cdot \log c + x \cdot \log y\right)}\right) + a\right) \]
                            10. lower-fma.f64N/A

                              \[\leadsto \left(t + z\right) + \left(\color{blue}{\mathsf{fma}\left(i, y, \frac{-1}{2} \cdot \log c + x \cdot \log y\right)} + a\right) \]
                            11. +-commutativeN/A

                              \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{x \cdot \log y + \frac{-1}{2} \cdot \log c}\right) + a\right) \]
                            12. lower-fma.f64N/A

                              \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{\mathsf{fma}\left(x, \log y, \frac{-1}{2} \cdot \log c\right)}\right) + a\right) \]
                            13. lower-log.f64N/A

                              \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \color{blue}{\log y}, \frac{-1}{2} \cdot \log c\right)\right) + a\right) \]
                            14. *-commutativeN/A

                              \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
                            15. lower-*.f64N/A

                              \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
                            16. lower-log.f6478.7

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

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

                            \[\leadsto \left(t + z\right) + \left(x \cdot \log y + a\right) \]
                          7. Step-by-step derivation
                            1. Applied rewrites75.3%

                              \[\leadsto \left(t + z\right) + \left(x \cdot \log y + a\right) \]
                          8. Recombined 2 regimes into one program.
                          9. Final simplification77.0%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -1.4 \cdot 10^{+70}:\\ \;\;\;\;\left(z + t\right) + \left(a + y \cdot i\right)\\ \mathbf{elif}\;i \leq 3.6 \cdot 10^{+54}:\\ \;\;\;\;\left(z + t\right) + \left(a + x \cdot \log y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z + t\right) + \left(a + y \cdot i\right)\\ \end{array} \]
                          10. Add Preprocessing

                          Alternative 10: 72.8% accurate, 1.8× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := a + b \cdot \log c\\ \mathbf{if}\;b - 0.5 \leq -1 \cdot 10^{+210}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b - 0.5 \leq 10^{+164}:\\ \;\;\;\;\left(z + t\right) + \left(a + 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 (+ a (* b (log c)))))
                             (if (<= (- b 0.5) -1e+210)
                               t_1
                               (if (<= (- b 0.5) 1e+164) (+ (+ z t) (+ a (* 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 = a + (b * log(c));
                          	double tmp;
                          	if ((b - 0.5) <= -1e+210) {
                          		tmp = t_1;
                          	} else if ((b - 0.5) <= 1e+164) {
                          		tmp = (z + t) + (a + (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 = a + (b * log(c))
                              if ((b - 0.5d0) <= (-1d+210)) then
                                  tmp = t_1
                              else if ((b - 0.5d0) <= 1d+164) then
                                  tmp = (z + t) + (a + (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 = a + (b * Math.log(c));
                          	double tmp;
                          	if ((b - 0.5) <= -1e+210) {
                          		tmp = t_1;
                          	} else if ((b - 0.5) <= 1e+164) {
                          		tmp = (z + t) + (a + (y * i));
                          	} else {
                          		tmp = t_1;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t, a, b, c, i):
                          	t_1 = a + (b * math.log(c))
                          	tmp = 0
                          	if (b - 0.5) <= -1e+210:
                          		tmp = t_1
                          	elif (b - 0.5) <= 1e+164:
                          		tmp = (z + t) + (a + (y * i))
                          	else:
                          		tmp = t_1
                          	return tmp
                          
                          function code(x, y, z, t, a, b, c, i)
                          	t_1 = Float64(a + Float64(b * log(c)))
                          	tmp = 0.0
                          	if (Float64(b - 0.5) <= -1e+210)
                          		tmp = t_1;
                          	elseif (Float64(b - 0.5) <= 1e+164)
                          		tmp = Float64(Float64(z + t) + Float64(a + 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 = a + (b * log(c));
                          	tmp = 0.0;
                          	if ((b - 0.5) <= -1e+210)
                          		tmp = t_1;
                          	elseif ((b - 0.5) <= 1e+164)
                          		tmp = (z + t) + (a + (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[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b - 0.5), $MachinePrecision], -1e+210], t$95$1, If[LessEqual[N[(b - 0.5), $MachinePrecision], 1e+164], N[(N[(z + t), $MachinePrecision] + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_1 := a + b \cdot \log c\\
                          \mathbf{if}\;b - 0.5 \leq -1 \cdot 10^{+210}:\\
                          \;\;\;\;t\_1\\
                          
                          \mathbf{elif}\;b - 0.5 \leq 10^{+164}:\\
                          \;\;\;\;\left(z + t\right) + \left(a + y \cdot i\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;t\_1\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if (-.f64 b #s(literal 1/2 binary64)) < -9.99999999999999927e209 or 1e164 < (-.f64 b #s(literal 1/2 binary64))

                            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. Add Preprocessing
                            3. Taylor expanded in x around 0

                              \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                            4. Step-by-step derivation
                              1. lower-+.f64N/A

                                \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                              2. +-commutativeN/A

                                \[\leadsto a + \color{blue}{\left(\left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) + t\right)} \]
                              3. associate-+r+N/A

                                \[\leadsto a + \left(\color{blue}{\left(\left(z + i \cdot y\right) + \log c \cdot \left(b - \frac{1}{2}\right)\right)} + t\right) \]
                              4. associate-+l+N/A

                                \[\leadsto a + \color{blue}{\left(\left(z + i \cdot y\right) + \left(\log c \cdot \left(b - \frac{1}{2}\right) + t\right)\right)} \]
                              5. lower-+.f64N/A

                                \[\leadsto a + \color{blue}{\left(\left(z + i \cdot y\right) + \left(\log c \cdot \left(b - \frac{1}{2}\right) + t\right)\right)} \]
                              6. +-commutativeN/A

                                \[\leadsto a + \left(\color{blue}{\left(i \cdot y + z\right)} + \left(\log c \cdot \left(b - \frac{1}{2}\right) + t\right)\right) \]
                              7. lower-fma.f64N/A

                                \[\leadsto a + \left(\color{blue}{\mathsf{fma}\left(i, y, z\right)} + \left(\log c \cdot \left(b - \frac{1}{2}\right) + t\right)\right) \]
                              8. lower-fma.f64N/A

                                \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \color{blue}{\mathsf{fma}\left(\log c, b - \frac{1}{2}, t\right)}\right) \]
                              9. lower-log.f64N/A

                                \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\color{blue}{\log c}, b - \frac{1}{2}, t\right)\right) \]
                              10. sub-negN/A

                                \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, \color{blue}{b + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, t\right)\right) \]
                              11. metadata-evalN/A

                                \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + \color{blue}{\frac{-1}{2}}, t\right)\right) \]
                              12. lower-+.f6490.5

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

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

                              \[\leadsto a + b \cdot \color{blue}{\log c} \]
                            7. Step-by-step derivation
                              1. Applied rewrites68.6%

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

                              if -9.99999999999999927e209 < (-.f64 b #s(literal 1/2 binary64)) < 1e164

                              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. Add Preprocessing
                              3. Taylor expanded in b around 0

                                \[\leadsto \color{blue}{a + \left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right)} \]
                              4. Step-by-step derivation
                                1. +-commutativeN/A

                                  \[\leadsto \color{blue}{\left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right) + a} \]
                                2. associate-+r+N/A

                                  \[\leadsto \color{blue}{\left(\left(t + z\right) + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)} + a \]
                                3. associate-+l+N/A

                                  \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
                                4. lower-+.f64N/A

                                  \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
                                5. lower-+.f64N/A

                                  \[\leadsto \color{blue}{\left(t + z\right)} + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right) \]
                                6. lower-+.f64N/A

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

                                  \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(\left(i \cdot y + x \cdot \log y\right) + \frac{-1}{2} \cdot \log c\right)} + a\right) \]
                                8. associate-+l+N/A

                                  \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(i \cdot y + \left(x \cdot \log y + \frac{-1}{2} \cdot \log c\right)\right)} + a\right) \]
                                9. +-commutativeN/A

                                  \[\leadsto \left(t + z\right) + \left(\left(i \cdot y + \color{blue}{\left(\frac{-1}{2} \cdot \log c + x \cdot \log y\right)}\right) + a\right) \]
                                10. lower-fma.f64N/A

                                  \[\leadsto \left(t + z\right) + \left(\color{blue}{\mathsf{fma}\left(i, y, \frac{-1}{2} \cdot \log c + x \cdot \log y\right)} + a\right) \]
                                11. +-commutativeN/A

                                  \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{x \cdot \log y + \frac{-1}{2} \cdot \log c}\right) + a\right) \]
                                12. lower-fma.f64N/A

                                  \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{\mathsf{fma}\left(x, \log y, \frac{-1}{2} \cdot \log c\right)}\right) + a\right) \]
                                13. lower-log.f64N/A

                                  \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \color{blue}{\log y}, \frac{-1}{2} \cdot \log c\right)\right) + a\right) \]
                                14. *-commutativeN/A

                                  \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
                                15. lower-*.f64N/A

                                  \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
                                16. lower-log.f6495.9

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

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

                                \[\leadsto \left(t + z\right) + \left(i \cdot y + a\right) \]
                              7. Step-by-step derivation
                                1. Applied rewrites73.1%

                                  \[\leadsto \left(t + z\right) + \left(y \cdot i + a\right) \]
                              8. Recombined 2 regimes into one program.
                              9. Final simplification72.0%

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

                              Alternative 11: 71.6% accurate, 1.9× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \log c\\ \mathbf{if}\;b - 0.5 \leq -1 \cdot 10^{+230}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b - 0.5 \leq 2 \cdot 10^{+173}:\\ \;\;\;\;\left(z + t\right) + \left(a + 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 (* b (log c))))
                                 (if (<= (- b 0.5) -1e+230)
                                   t_1
                                   (if (<= (- b 0.5) 2e+173) (+ (+ z t) (+ a (* 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 = b * log(c);
                              	double tmp;
                              	if ((b - 0.5) <= -1e+230) {
                              		tmp = t_1;
                              	} else if ((b - 0.5) <= 2e+173) {
                              		tmp = (z + t) + (a + (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 = b * log(c)
                                  if ((b - 0.5d0) <= (-1d+230)) then
                                      tmp = t_1
                                  else if ((b - 0.5d0) <= 2d+173) then
                                      tmp = (z + t) + (a + (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 = b * Math.log(c);
                              	double tmp;
                              	if ((b - 0.5) <= -1e+230) {
                              		tmp = t_1;
                              	} else if ((b - 0.5) <= 2e+173) {
                              		tmp = (z + t) + (a + (y * i));
                              	} else {
                              		tmp = t_1;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t, a, b, c, i):
                              	t_1 = b * math.log(c)
                              	tmp = 0
                              	if (b - 0.5) <= -1e+230:
                              		tmp = t_1
                              	elif (b - 0.5) <= 2e+173:
                              		tmp = (z + t) + (a + (y * i))
                              	else:
                              		tmp = t_1
                              	return tmp
                              
                              function code(x, y, z, t, a, b, c, i)
                              	t_1 = Float64(b * log(c))
                              	tmp = 0.0
                              	if (Float64(b - 0.5) <= -1e+230)
                              		tmp = t_1;
                              	elseif (Float64(b - 0.5) <= 2e+173)
                              		tmp = Float64(Float64(z + t) + Float64(a + 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 = b * log(c);
                              	tmp = 0.0;
                              	if ((b - 0.5) <= -1e+230)
                              		tmp = t_1;
                              	elseif ((b - 0.5) <= 2e+173)
                              		tmp = (z + t) + (a + (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[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b - 0.5), $MachinePrecision], -1e+230], t$95$1, If[LessEqual[N[(b - 0.5), $MachinePrecision], 2e+173], N[(N[(z + t), $MachinePrecision] + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              t_1 := b \cdot \log c\\
                              \mathbf{if}\;b - 0.5 \leq -1 \cdot 10^{+230}:\\
                              \;\;\;\;t\_1\\
                              
                              \mathbf{elif}\;b - 0.5 \leq 2 \cdot 10^{+173}:\\
                              \;\;\;\;\left(z + t\right) + \left(a + y \cdot i\right)\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;t\_1\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if (-.f64 b #s(literal 1/2 binary64)) < -1.0000000000000001e230 or 2e173 < (-.f64 b #s(literal 1/2 binary64))

                                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. Add Preprocessing
                                3. Taylor expanded in b around inf

                                  \[\leadsto \color{blue}{b \cdot \log c} \]
                                4. Step-by-step derivation
                                  1. *-commutativeN/A

                                    \[\leadsto \color{blue}{\log c \cdot b} \]
                                  2. lower-*.f64N/A

                                    \[\leadsto \color{blue}{\log c \cdot b} \]
                                  3. lower-log.f6463.4

                                    \[\leadsto \color{blue}{\log c} \cdot b \]
                                5. Applied rewrites63.4%

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

                                if -1.0000000000000001e230 < (-.f64 b #s(literal 1/2 binary64)) < 2e173

                                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. Add Preprocessing
                                3. Taylor expanded in b around 0

                                  \[\leadsto \color{blue}{a + \left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right)} \]
                                4. Step-by-step derivation
                                  1. +-commutativeN/A

                                    \[\leadsto \color{blue}{\left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right) + a} \]
                                  2. associate-+r+N/A

                                    \[\leadsto \color{blue}{\left(\left(t + z\right) + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)} + a \]
                                  3. associate-+l+N/A

                                    \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
                                  4. lower-+.f64N/A

                                    \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
                                  5. lower-+.f64N/A

                                    \[\leadsto \color{blue}{\left(t + z\right)} + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right) \]
                                  6. lower-+.f64N/A

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

                                    \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(\left(i \cdot y + x \cdot \log y\right) + \frac{-1}{2} \cdot \log c\right)} + a\right) \]
                                  8. associate-+l+N/A

                                    \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(i \cdot y + \left(x \cdot \log y + \frac{-1}{2} \cdot \log c\right)\right)} + a\right) \]
                                  9. +-commutativeN/A

                                    \[\leadsto \left(t + z\right) + \left(\left(i \cdot y + \color{blue}{\left(\frac{-1}{2} \cdot \log c + x \cdot \log y\right)}\right) + a\right) \]
                                  10. lower-fma.f64N/A

                                    \[\leadsto \left(t + z\right) + \left(\color{blue}{\mathsf{fma}\left(i, y, \frac{-1}{2} \cdot \log c + x \cdot \log y\right)} + a\right) \]
                                  11. +-commutativeN/A

                                    \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{x \cdot \log y + \frac{-1}{2} \cdot \log c}\right) + a\right) \]
                                  12. lower-fma.f64N/A

                                    \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{\mathsf{fma}\left(x, \log y, \frac{-1}{2} \cdot \log c\right)}\right) + a\right) \]
                                  13. lower-log.f64N/A

                                    \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \color{blue}{\log y}, \frac{-1}{2} \cdot \log c\right)\right) + a\right) \]
                                  14. *-commutativeN/A

                                    \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
                                  15. lower-*.f64N/A

                                    \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
                                  16. lower-log.f6494.7

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

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

                                  \[\leadsto \left(t + z\right) + \left(i \cdot y + a\right) \]
                                7. Step-by-step derivation
                                  1. Applied rewrites72.7%

                                    \[\leadsto \left(t + z\right) + \left(y \cdot i + a\right) \]
                                8. Recombined 2 regimes into one program.
                                9. Final simplification70.8%

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

                                Alternative 12: 72.8% accurate, 2.0× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -3.4 \cdot 10^{+246}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{+240}:\\ \;\;\;\;\left(z + t\right) + \left(a + 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 (* x (log y))))
                                   (if (<= x -3.4e+246)
                                     t_1
                                     (if (<= x 1.7e+240) (+ (+ z t) (+ a (* 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.4e+246) {
                                		tmp = t_1;
                                	} else if (x <= 1.7e+240) {
                                		tmp = (z + t) + (a + (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 = x * log(y)
                                    if (x <= (-3.4d+246)) then
                                        tmp = t_1
                                    else if (x <= 1.7d+240) then
                                        tmp = (z + t) + (a + (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 = x * Math.log(y);
                                	double tmp;
                                	if (x <= -3.4e+246) {
                                		tmp = t_1;
                                	} else if (x <= 1.7e+240) {
                                		tmp = (z + t) + (a + (y * i));
                                	} else {
                                		tmp = 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.4e+246:
                                		tmp = t_1
                                	elif x <= 1.7e+240:
                                		tmp = (z + t) + (a + (y * i))
                                	else:
                                		tmp = 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.4e+246)
                                		tmp = t_1;
                                	elseif (x <= 1.7e+240)
                                		tmp = Float64(Float64(z + t) + Float64(a + 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 = x * log(y);
                                	tmp = 0.0;
                                	if (x <= -3.4e+246)
                                		tmp = t_1;
                                	elseif (x <= 1.7e+240)
                                		tmp = (z + t) + (a + (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[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.4e+246], t$95$1, If[LessEqual[x, 1.7e+240], N[(N[(z + t), $MachinePrecision] + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                t_1 := x \cdot \log y\\
                                \mathbf{if}\;x \leq -3.4 \cdot 10^{+246}:\\
                                \;\;\;\;t\_1\\
                                
                                \mathbf{elif}\;x \leq 1.7 \cdot 10^{+240}:\\
                                \;\;\;\;\left(z + t\right) + \left(a + y \cdot i\right)\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;t\_1\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if x < -3.39999999999999988e246 or 1.70000000000000004e240 < x

                                  1. Initial program 99.3%

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

                                    \[\leadsto \color{blue}{x \cdot \log y} \]
                                  4. Step-by-step derivation
                                    1. lower-*.f64N/A

                                      \[\leadsto \color{blue}{x \cdot \log y} \]
                                    2. lower-log.f6469.9

                                      \[\leadsto x \cdot \color{blue}{\log y} \]
                                  5. Applied rewrites69.9%

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

                                  if -3.39999999999999988e246 < x < 1.70000000000000004e240

                                  1. Initial program 99.9%

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

                                    \[\leadsto \color{blue}{a + \left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right)} \]
                                  4. Step-by-step derivation
                                    1. +-commutativeN/A

                                      \[\leadsto \color{blue}{\left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right) + a} \]
                                    2. associate-+r+N/A

                                      \[\leadsto \color{blue}{\left(\left(t + z\right) + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)} + a \]
                                    3. associate-+l+N/A

                                      \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
                                    4. lower-+.f64N/A

                                      \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
                                    5. lower-+.f64N/A

                                      \[\leadsto \color{blue}{\left(t + z\right)} + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right) \]
                                    6. lower-+.f64N/A

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

                                      \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(\left(i \cdot y + x \cdot \log y\right) + \frac{-1}{2} \cdot \log c\right)} + a\right) \]
                                    8. associate-+l+N/A

                                      \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(i \cdot y + \left(x \cdot \log y + \frac{-1}{2} \cdot \log c\right)\right)} + a\right) \]
                                    9. +-commutativeN/A

                                      \[\leadsto \left(t + z\right) + \left(\left(i \cdot y + \color{blue}{\left(\frac{-1}{2} \cdot \log c + x \cdot \log y\right)}\right) + a\right) \]
                                    10. lower-fma.f64N/A

                                      \[\leadsto \left(t + z\right) + \left(\color{blue}{\mathsf{fma}\left(i, y, \frac{-1}{2} \cdot \log c + x \cdot \log y\right)} + a\right) \]
                                    11. +-commutativeN/A

                                      \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{x \cdot \log y + \frac{-1}{2} \cdot \log c}\right) + a\right) \]
                                    12. lower-fma.f64N/A

                                      \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{\mathsf{fma}\left(x, \log y, \frac{-1}{2} \cdot \log c\right)}\right) + a\right) \]
                                    13. lower-log.f64N/A

                                      \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \color{blue}{\log y}, \frac{-1}{2} \cdot \log c\right)\right) + a\right) \]
                                    14. *-commutativeN/A

                                      \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
                                    15. lower-*.f64N/A

                                      \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
                                    16. lower-log.f6480.4

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

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

                                    \[\leadsto \left(t + z\right) + \left(i \cdot y + a\right) \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites68.5%

                                      \[\leadsto \left(t + z\right) + \left(y \cdot i + a\right) \]
                                  8. Recombined 2 regimes into one program.
                                  9. Final simplification68.7%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.4 \cdot 10^{+246}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{+240}:\\ \;\;\;\;\left(z + t\right) + \left(a + y \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \log y\\ \end{array} \]
                                  10. Add Preprocessing

                                  Alternative 13: 68.7% accurate, 15.6× speedup?

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

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

                                    \[\leadsto \color{blue}{a + \left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right)} \]
                                  4. Step-by-step derivation
                                    1. +-commutativeN/A

                                      \[\leadsto \color{blue}{\left(t + \left(z + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)\right) + a} \]
                                    2. associate-+r+N/A

                                      \[\leadsto \color{blue}{\left(\left(t + z\right) + \left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right)\right)} + a \]
                                    3. associate-+l+N/A

                                      \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
                                    4. lower-+.f64N/A

                                      \[\leadsto \color{blue}{\left(t + z\right) + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right)} \]
                                    5. lower-+.f64N/A

                                      \[\leadsto \color{blue}{\left(t + z\right)} + \left(\left(\frac{-1}{2} \cdot \log c + \left(i \cdot y + x \cdot \log y\right)\right) + a\right) \]
                                    6. lower-+.f64N/A

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

                                      \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(\left(i \cdot y + x \cdot \log y\right) + \frac{-1}{2} \cdot \log c\right)} + a\right) \]
                                    8. associate-+l+N/A

                                      \[\leadsto \left(t + z\right) + \left(\color{blue}{\left(i \cdot y + \left(x \cdot \log y + \frac{-1}{2} \cdot \log c\right)\right)} + a\right) \]
                                    9. +-commutativeN/A

                                      \[\leadsto \left(t + z\right) + \left(\left(i \cdot y + \color{blue}{\left(\frac{-1}{2} \cdot \log c + x \cdot \log y\right)}\right) + a\right) \]
                                    10. lower-fma.f64N/A

                                      \[\leadsto \left(t + z\right) + \left(\color{blue}{\mathsf{fma}\left(i, y, \frac{-1}{2} \cdot \log c + x \cdot \log y\right)} + a\right) \]
                                    11. +-commutativeN/A

                                      \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{x \cdot \log y + \frac{-1}{2} \cdot \log c}\right) + a\right) \]
                                    12. lower-fma.f64N/A

                                      \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \color{blue}{\mathsf{fma}\left(x, \log y, \frac{-1}{2} \cdot \log c\right)}\right) + a\right) \]
                                    13. lower-log.f64N/A

                                      \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \color{blue}{\log y}, \frac{-1}{2} \cdot \log c\right)\right) + a\right) \]
                                    14. *-commutativeN/A

                                      \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
                                    15. lower-*.f64N/A

                                      \[\leadsto \left(t + z\right) + \left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \color{blue}{\log c \cdot \frac{-1}{2}}\right)\right) + a\right) \]
                                    16. lower-log.f6482.5

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

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

                                    \[\leadsto \left(t + z\right) + \left(i \cdot y + a\right) \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites63.1%

                                      \[\leadsto \left(t + z\right) + \left(y \cdot i + a\right) \]
                                    2. Final simplification63.1%

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

                                    Alternative 14: 39.3% accurate, 26.0× speedup?

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

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

                                      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                                    4. Step-by-step derivation
                                      1. lower-+.f64N/A

                                        \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                                      2. +-commutativeN/A

                                        \[\leadsto a + \color{blue}{\left(\left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) + t\right)} \]
                                      3. associate-+r+N/A

                                        \[\leadsto a + \left(\color{blue}{\left(\left(z + i \cdot y\right) + \log c \cdot \left(b - \frac{1}{2}\right)\right)} + t\right) \]
                                      4. associate-+l+N/A

                                        \[\leadsto a + \color{blue}{\left(\left(z + i \cdot y\right) + \left(\log c \cdot \left(b - \frac{1}{2}\right) + t\right)\right)} \]
                                      5. lower-+.f64N/A

                                        \[\leadsto a + \color{blue}{\left(\left(z + i \cdot y\right) + \left(\log c \cdot \left(b - \frac{1}{2}\right) + t\right)\right)} \]
                                      6. +-commutativeN/A

                                        \[\leadsto a + \left(\color{blue}{\left(i \cdot y + z\right)} + \left(\log c \cdot \left(b - \frac{1}{2}\right) + t\right)\right) \]
                                      7. lower-fma.f64N/A

                                        \[\leadsto a + \left(\color{blue}{\mathsf{fma}\left(i, y, z\right)} + \left(\log c \cdot \left(b - \frac{1}{2}\right) + t\right)\right) \]
                                      8. lower-fma.f64N/A

                                        \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \color{blue}{\mathsf{fma}\left(\log c, b - \frac{1}{2}, t\right)}\right) \]
                                      9. lower-log.f64N/A

                                        \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\color{blue}{\log c}, b - \frac{1}{2}, t\right)\right) \]
                                      10. sub-negN/A

                                        \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, \color{blue}{b + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, t\right)\right) \]
                                      11. metadata-evalN/A

                                        \[\leadsto a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + \color{blue}{\frac{-1}{2}}, t\right)\right) \]
                                      12. lower-+.f6481.1

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

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

                                      \[\leadsto a + i \cdot \color{blue}{y} \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites38.4%

                                        \[\leadsto a + y \cdot \color{blue}{i} \]
                                      2. Add Preprocessing

                                      Alternative 15: 24.2% accurate, 39.0× speedup?

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

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

                                        \[\leadsto \color{blue}{i \cdot y} \]
                                      4. Step-by-step derivation
                                        1. lower-*.f6422.7

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

                                        \[\leadsto \color{blue}{i \cdot y} \]
                                      6. Final simplification22.7%

                                        \[\leadsto y \cdot i \]
                                      7. Add Preprocessing

                                      Reproduce

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