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

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

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

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

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

Alternative 2: 47.8% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+225}:\\
\;\;\;\;\frac{z}{y} \cdot y + \left(a + t\right)\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+15}:\\
\;\;\;\;\mathsf{fma}\left(y, i, t\_2\right)\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+302}:\\
\;\;\;\;t\_2 + \left(a + t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 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)) < -1.00000000000000002e306

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{y \cdot i} \]
      2. lower-*.f64100.0

        \[\leadsto \color{blue}{y \cdot i} \]
    5. Applied rewrites100.0%

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

    if -1.00000000000000002e306 < (+.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)) < -9.99999999999999928e224

    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. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(t + a\right) + \frac{z}{y} \cdot y \]
      3. Step-by-step derivation
        1. Applied rewrites49.2%

          \[\leadsto \left(t + a\right) + \frac{z}{y} \cdot y \]

        if -9.99999999999999928e224 < (+.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)) < 5e15

        1. Initial program 99.9%

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

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

            \[\leadsto \color{blue}{b \cdot \log c} + y \cdot i \]
          2. lower-log.f6442.8

            \[\leadsto b \cdot \color{blue}{\log c} + y \cdot i \]
        5. Applied rewrites42.8%

          \[\leadsto \color{blue}{b \cdot \log c} + y \cdot i \]
        6. Step-by-step derivation
          1. lift-+.f64N/A

            \[\leadsto \color{blue}{b \cdot \log c + y \cdot i} \]
          2. +-commutativeN/A

            \[\leadsto \color{blue}{y \cdot i + b \cdot \log c} \]
          3. lift-*.f64N/A

            \[\leadsto \color{blue}{y \cdot i} + b \cdot \log c \]
          4. lower-fma.f6442.8

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \log c \cdot b\right)} \]

        if 5e15 < (+.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)) < 2.0000000000000002e302

        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. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 2.0000000000000002e302 < (+.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. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(t + a\right) + y \cdot \color{blue}{i} \]
            2. Step-by-step derivation
              1. Applied rewrites74.4%

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

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

            Alternative 3: 57.0% accurate, 0.3× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \log y \cdot x\\ t_2 := i \cdot y + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(z + t\_1\right)\right)\right)\right)\\ t_3 := t\_1 + i \cdot y\\ \mathbf{if}\;t\_2 \leq -4 \cdot 10^{+303}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 100:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \log c, z\right) + \left(a + t\right)\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+302}:\\ \;\;\;\;\log c \cdot b + \left(a + t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
            (FPCore (x y z t a b c i)
             :precision binary64
             (let* ((t_1 (* (log y) x))
                    (t_2 (+ (* i y) (+ (* (log c) (- b 0.5)) (+ a (+ t (+ z t_1))))))
                    (t_3 (+ t_1 (* i y))))
               (if (<= t_2 -4e+303)
                 t_3
                 (if (<= t_2 100.0)
                   (+ (fma -0.5 (log c) z) (+ a t))
                   (if (<= t_2 2e+302) (+ (* (log c) b) (+ a t)) t_3)))))
            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
            	double t_1 = log(y) * x;
            	double t_2 = (i * y) + ((log(c) * (b - 0.5)) + (a + (t + (z + t_1))));
            	double t_3 = t_1 + (i * y);
            	double tmp;
            	if (t_2 <= -4e+303) {
            		tmp = t_3;
            	} else if (t_2 <= 100.0) {
            		tmp = fma(-0.5, log(c), z) + (a + t);
            	} else if (t_2 <= 2e+302) {
            		tmp = (log(c) * b) + (a + t);
            	} else {
            		tmp = t_3;
            	}
            	return tmp;
            }
            
            function code(x, y, z, t, a, b, c, i)
            	t_1 = Float64(log(y) * x)
            	t_2 = Float64(Float64(i * y) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(t + Float64(z + t_1)))))
            	t_3 = Float64(t_1 + Float64(i * y))
            	tmp = 0.0
            	if (t_2 <= -4e+303)
            		tmp = t_3;
            	elseif (t_2 <= 100.0)
            		tmp = Float64(fma(-0.5, log(c), z) + Float64(a + t));
            	elseif (t_2 <= 2e+302)
            		tmp = Float64(Float64(log(c) * b) + Float64(a + t));
            	else
            		tmp = t_3;
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(i * y), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(i * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -4e+303], t$95$3, If[LessEqual[t$95$2, 100.0], N[(N[(-0.5 * N[Log[c], $MachinePrecision] + z), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+302], N[(N[(N[Log[c], $MachinePrecision] * b), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \log y \cdot x\\
            t_2 := i \cdot y + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(z + t\_1\right)\right)\right)\right)\\
            t_3 := t\_1 + i \cdot y\\
            \mathbf{if}\;t\_2 \leq -4 \cdot 10^{+303}:\\
            \;\;\;\;t\_3\\
            
            \mathbf{elif}\;t\_2 \leq 100:\\
            \;\;\;\;\mathsf{fma}\left(-0.5, \log c, z\right) + \left(a + t\right)\\
            
            \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+302}:\\
            \;\;\;\;\log c \cdot b + \left(a + t\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_3\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 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)) < -4e303 or 2.0000000000000002e302 < (+.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 100.0%

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

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

                  \[\leadsto \color{blue}{\log y \cdot x} + y \cdot i \]
                2. lower-*.f64N/A

                  \[\leadsto \color{blue}{\log y \cdot x} + y \cdot i \]
                3. lower-log.f6497.7

                  \[\leadsto \color{blue}{\log y} \cdot x + y \cdot i \]
              5. Applied rewrites97.7%

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

              if -4e303 < (+.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)) < 100

              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. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 100 < (+.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)) < 2.0000000000000002e302

                  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. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(t + a\right) + b \cdot \color{blue}{\log c} \]
                  8. Recombined 3 regimes into one program.
                  9. Final simplification61.5%

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

                  Alternative 4: 55.2% accurate, 0.3× speedup?

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

                    1. Initial program 100.0%

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

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

                        \[\leadsto \color{blue}{y \cdot i} \]
                      2. lower-*.f64100.0

                        \[\leadsto \color{blue}{y \cdot i} \]
                    5. Applied rewrites100.0%

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

                    if -1.00000000000000002e306 < (+.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)) < 100

                    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. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 100 < (+.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)) < 2.0000000000000002e302

                        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. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if 2.0000000000000002e302 < (+.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. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \left(t + a\right) + y \cdot \color{blue}{i} \]
                            2. Step-by-step derivation
                              1. Applied rewrites74.4%

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

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

                            Alternative 5: 71.7% accurate, 0.4× speedup?

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

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

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

                                  \[\leadsto \color{blue}{\log y \cdot x} + y \cdot i \]
                                2. lower-*.f64N/A

                                  \[\leadsto \color{blue}{\log y \cdot x} + y \cdot i \]
                                3. lower-log.f6497.7

                                  \[\leadsto \color{blue}{\log y} \cdot x + y \cdot i \]
                              5. Applied rewrites97.7%

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

                              if -4e303 < (+.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)) < 2.0000000000000002e302

                              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. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 6: 91.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if -2.04999999999999993e226 < x < 2.4000000000000001e151

                                1. Initial program 100.0%

                                  \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                2. Add Preprocessing
                                3. Taylor expanded in 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. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 7: 89.8% accurate, 1.0× speedup?

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

                                1. Initial program 99.5%

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

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

                                    \[\leadsto \color{blue}{\log y \cdot x} + y \cdot i \]
                                  2. lower-*.f64N/A

                                    \[\leadsto \color{blue}{\log y \cdot x} + y \cdot i \]
                                  3. lower-log.f6490.3

                                    \[\leadsto \color{blue}{\log y} \cdot x + y \cdot i \]
                                5. Applied rewrites90.3%

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

                                if -4.40000000000000018e243 < x < 8.0000000000000004e222

                                1. Initial program 100.0%

                                  \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                2. Add Preprocessing
                                3. Taylor expanded in 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. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if 8.0000000000000004e222 < 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 y around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(\log y, x, t\right)\right) + \color{blue}{a} \]
                                8. Recombined 3 regimes into one program.
                                9. Final simplification93.1%

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

                                Alternative 8: 89.3% accurate, 1.7× speedup?

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

                                  1. Initial program 99.6%

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

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

                                      \[\leadsto \color{blue}{\log y \cdot x} + y \cdot i \]
                                    2. lower-*.f64N/A

                                      \[\leadsto \color{blue}{\log y \cdot x} + y \cdot i \]
                                    3. lower-log.f6492.3

                                      \[\leadsto \color{blue}{\log y} \cdot x + y \cdot i \]
                                  5. Applied rewrites92.3%

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

                                  if -4.40000000000000018e243 < x < 1.35e237

                                  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. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 9: 75.3% accurate, 1.9× speedup?

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

                                  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. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if 1.2999999999999999e33 < y

                                    1. Initial program 99.9%

                                      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in 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. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 10: 50.5% accurate, 2.0× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 10^{-251}:\\ \;\;\;\;\log c \cdot b + \left(a + t\right)\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{-227}:\\ \;\;\;\;\log y \cdot x\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{-59}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, a, a\right)\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{+30}:\\ \;\;\;\;\frac{z}{y} \cdot y + \left(a + t\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot y + \left(a + t\right)\\ \end{array} \end{array} \]
                                    (FPCore (x y z t a b c i)
                                     :precision binary64
                                     (if (<= y 1e-251)
                                       (+ (* (log c) b) (+ a t))
                                       (if (<= y 3.2e-227)
                                         (* (log y) x)
                                         (if (<= y 7.8e-59)
                                           (fma (/ z a) a a)
                                           (if (<= y 7.5e+30) (+ (* (/ z y) y) (+ a t)) (+ (* i y) (+ a t)))))))
                                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                    	double tmp;
                                    	if (y <= 1e-251) {
                                    		tmp = (log(c) * b) + (a + t);
                                    	} else if (y <= 3.2e-227) {
                                    		tmp = log(y) * x;
                                    	} else if (y <= 7.8e-59) {
                                    		tmp = fma((z / a), a, a);
                                    	} else if (y <= 7.5e+30) {
                                    		tmp = ((z / y) * y) + (a + t);
                                    	} else {
                                    		tmp = (i * y) + (a + t);
                                    	}
                                    	return tmp;
                                    }
                                    
                                    function code(x, y, z, t, a, b, c, i)
                                    	tmp = 0.0
                                    	if (y <= 1e-251)
                                    		tmp = Float64(Float64(log(c) * b) + Float64(a + t));
                                    	elseif (y <= 3.2e-227)
                                    		tmp = Float64(log(y) * x);
                                    	elseif (y <= 7.8e-59)
                                    		tmp = fma(Float64(z / a), a, a);
                                    	elseif (y <= 7.5e+30)
                                    		tmp = Float64(Float64(Float64(z / y) * y) + Float64(a + t));
                                    	else
                                    		tmp = Float64(Float64(i * y) + Float64(a + t));
                                    	end
                                    	return tmp
                                    end
                                    
                                    code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 1e-251], N[(N[(N[Log[c], $MachinePrecision] * b), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e-227], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y, 7.8e-59], N[(N[(z / a), $MachinePrecision] * a + a), $MachinePrecision], If[LessEqual[y, 7.5e+30], N[(N[(N[(z / y), $MachinePrecision] * y), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision], N[(N[(i * y), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision]]]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    \mathbf{if}\;y \leq 10^{-251}:\\
                                    \;\;\;\;\log c \cdot b + \left(a + t\right)\\
                                    
                                    \mathbf{elif}\;y \leq 3.2 \cdot 10^{-227}:\\
                                    \;\;\;\;\log y \cdot x\\
                                    
                                    \mathbf{elif}\;y \leq 7.8 \cdot 10^{-59}:\\
                                    \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, a, a\right)\\
                                    
                                    \mathbf{elif}\;y \leq 7.5 \cdot 10^{+30}:\\
                                    \;\;\;\;\frac{z}{y} \cdot y + \left(a + t\right)\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;i \cdot y + \left(a + t\right)\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 5 regimes
                                    2. if y < 1.00000000000000002e-251

                                      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. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        if 1.00000000000000002e-251 < y < 3.2000000000000001e-227

                                        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 inf

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

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

                                            \[\leadsto \color{blue}{\log y \cdot x} \]
                                          3. lower-log.f6461.0

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

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

                                        if 3.2000000000000001e-227 < y < 7.80000000000000038e-59

                                        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 a around -inf

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(\frac{z}{a}, a, a\right) \]
                                        7. Step-by-step derivation
                                          1. Applied rewrites35.0%

                                            \[\leadsto \mathsf{fma}\left(\frac{z}{a}, a, a\right) \]

                                          if 7.80000000000000038e-59 < y < 7.49999999999999973e30

                                          1. Initial program 100.0%

                                            \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                          2. Add Preprocessing
                                          3. Taylor expanded in 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. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \left(t + a\right) + \frac{z}{y} \cdot y \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites55.3%

                                                \[\leadsto \left(t + a\right) + \frac{z}{y} \cdot y \]

                                              if 7.49999999999999973e30 < y

                                              1. Initial program 99.9%

                                                \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                              2. Add Preprocessing
                                              3. Taylor expanded in 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. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 10^{-251}:\\ \;\;\;\;\log c \cdot b + \left(a + t\right)\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{-227}:\\ \;\;\;\;\log y \cdot x\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{-59}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, a, a\right)\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{+30}:\\ \;\;\;\;\frac{z}{y} \cdot y + \left(a + t\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot y + \left(a + t\right)\\ \end{array} \]
                                              10. Add Preprocessing

                                              Alternative 11: 48.1% accurate, 6.7× speedup?

                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 7.8 \cdot 10^{-59}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, a, a\right)\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{+30}:\\ \;\;\;\;\frac{z}{y} \cdot y + \left(a + t\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot y + \left(a + t\right)\\ \end{array} \end{array} \]
                                              (FPCore (x y z t a b c i)
                                               :precision binary64
                                               (if (<= y 7.8e-59)
                                                 (fma (/ z a) a a)
                                                 (if (<= y 7.5e+30) (+ (* (/ z y) y) (+ a t)) (+ (* i y) (+ a t)))))
                                              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                              	double tmp;
                                              	if (y <= 7.8e-59) {
                                              		tmp = fma((z / a), a, a);
                                              	} else if (y <= 7.5e+30) {
                                              		tmp = ((z / y) * y) + (a + t);
                                              	} else {
                                              		tmp = (i * y) + (a + t);
                                              	}
                                              	return tmp;
                                              }
                                              
                                              function code(x, y, z, t, a, b, c, i)
                                              	tmp = 0.0
                                              	if (y <= 7.8e-59)
                                              		tmp = fma(Float64(z / a), a, a);
                                              	elseif (y <= 7.5e+30)
                                              		tmp = Float64(Float64(Float64(z / y) * y) + Float64(a + t));
                                              	else
                                              		tmp = Float64(Float64(i * y) + Float64(a + t));
                                              	end
                                              	return tmp
                                              end
                                              
                                              code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 7.8e-59], N[(N[(z / a), $MachinePrecision] * a + a), $MachinePrecision], If[LessEqual[y, 7.5e+30], N[(N[(N[(z / y), $MachinePrecision] * y), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision], N[(N[(i * y), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision]]]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \begin{array}{l}
                                              \mathbf{if}\;y \leq 7.8 \cdot 10^{-59}:\\
                                              \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, a, a\right)\\
                                              
                                              \mathbf{elif}\;y \leq 7.5 \cdot 10^{+30}:\\
                                              \;\;\;\;\frac{z}{y} \cdot y + \left(a + t\right)\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;i \cdot y + \left(a + t\right)\\
                                              
                                              
                                              \end{array}
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 3 regimes
                                              2. if y < 7.80000000000000038e-59

                                                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 a around -inf

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \mathsf{fma}\left(\frac{z}{a}, a, a\right) \]
                                                7. Step-by-step derivation
                                                  1. Applied rewrites30.4%

                                                    \[\leadsto \mathsf{fma}\left(\frac{z}{a}, a, a\right) \]

                                                  if 7.80000000000000038e-59 < y < 7.49999999999999973e30

                                                  1. Initial program 100.0%

                                                    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                  2. Add Preprocessing
                                                  3. Taylor expanded in 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. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto \left(t + a\right) + \frac{z}{y} \cdot y \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites55.3%

                                                        \[\leadsto \left(t + a\right) + \frac{z}{y} \cdot y \]

                                                      if 7.49999999999999973e30 < y

                                                      1. Initial program 99.9%

                                                        \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                      2. Add Preprocessing
                                                      3. Taylor expanded in 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. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 7.8 \cdot 10^{-59}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, a, a\right)\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{+30}:\\ \;\;\;\;\frac{z}{y} \cdot y + \left(a + t\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot y + \left(a + t\right)\\ \end{array} \]
                                                      10. Add Preprocessing

                                                      Alternative 12: 53.1% accurate, 9.7× speedup?

                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+136}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, a, a\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot y + \left(a + t\right)\\ \end{array} \end{array} \]
                                                      (FPCore (x y z t a b c i)
                                                       :precision binary64
                                                       (if (<= z -2e+136) (fma (/ z a) a a) (+ (* i y) (+ a t))))
                                                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                      	double tmp;
                                                      	if (z <= -2e+136) {
                                                      		tmp = fma((z / a), a, a);
                                                      	} else {
                                                      		tmp = (i * y) + (a + t);
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      function code(x, y, z, t, a, b, c, i)
                                                      	tmp = 0.0
                                                      	if (z <= -2e+136)
                                                      		tmp = fma(Float64(z / a), a, a);
                                                      	else
                                                      		tmp = Float64(Float64(i * y) + Float64(a + t));
                                                      	end
                                                      	return tmp
                                                      end
                                                      
                                                      code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2e+136], N[(N[(z / a), $MachinePrecision] * a + a), $MachinePrecision], N[(N[(i * y), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision]]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      \mathbf{if}\;z \leq -2 \cdot 10^{+136}:\\
                                                      \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, a, a\right)\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;i \cdot y + \left(a + t\right)\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 2 regimes
                                                      2. if z < -2.00000000000000012e136

                                                        1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto \mathsf{fma}\left(\frac{z}{a}, a, a\right) \]
                                                        7. Step-by-step derivation
                                                          1. Applied rewrites34.1%

                                                            \[\leadsto \mathsf{fma}\left(\frac{z}{a}, a, a\right) \]

                                                          if -2.00000000000000012e136 < z

                                                          1. Initial program 99.9%

                                                            \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                          2. Add Preprocessing
                                                          3. Taylor expanded in 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. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          Alternative 13: 52.9% accurate, 19.5× speedup?

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

                                                            \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                          2. Add Preprocessing
                                                          3. 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. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            Alternative 14: 24.2% accurate, 39.0× speedup?

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

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

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

                                                                \[\leadsto \color{blue}{y \cdot i} \]
                                                              2. lower-*.f6427.8

                                                                \[\leadsto \color{blue}{y \cdot i} \]
                                                            5. Applied rewrites27.8%

                                                              \[\leadsto \color{blue}{y \cdot i} \]
                                                            6. Final simplification27.8%

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

                                                            Reproduce

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