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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 45.6% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -4 \cdot 10^{+27}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t}, t, t\right)\\

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


\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)) < -1.90000000000000011e307

    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.90000000000000011e307 < (+.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)) < -4.0000000000000001e27

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -4.0000000000000001e27 < (+.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.8%

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

        \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
      4. Step-by-step derivation
        1. 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.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 rewrites85.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 inf

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

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

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

      Alternative 3: 72.7% accurate, 0.5× speedup?

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

        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 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.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 rewrites87.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 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 rewrites74.7%

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

          if -3.9999999999999999e101 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -275

          1. Initial program 99.8%

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

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

            \[\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 x around inf

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

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

            if -275 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 1.99999999999999988e166

            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.8

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

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

                \[\leadsto \left(t + a\right) + y \cdot \color{blue}{i} \]
              2. 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) \]
              3. Step-by-step derivation
                1. Applied rewrites83.1%

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

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

                1. Initial program 99.7%

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{x}{t}, \log y, \frac{z}{t}\right) + \frac{a}{t}, t, t\right) + y \cdot i \]
                  2. Step-by-step derivation
                    1. lift-+.f64N/A

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

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

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \mathsf{fma}\left(\mathsf{fma}\left(\frac{x}{t}, \log y, \frac{z}{t}\right) + \frac{a}{t}, t, t\right)\right)} \]
                  3. Applied rewrites30.1%

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

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

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

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

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

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

                Alternative 4: 93.5% accurate, 0.5× speedup?

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

                  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.f6491.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 rewrites91.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 -2e120 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 5.0000000000000001e85

                  1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  1. Initial program 99.8%

                    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                  2. Add Preprocessing
                  3. 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.f6494.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 rewrites94.5%

                    \[\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 3 regimes into one program.
                4. Final simplification96.1%

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

                Alternative 5: 55.0% accurate, 0.5× speedup?

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

                  1. Initial program 99.7%

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{x}{t}, \log y, \frac{z}{t}\right) + \frac{a}{t}, t, t\right) + y \cdot i \]
                    2. Step-by-step derivation
                      1. lift-+.f64N/A

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

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

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

                        \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \mathsf{fma}\left(\mathsf{fma}\left(\frac{x}{t}, \log y, \frac{z}{t}\right) + \frac{a}{t}, t, t\right)\right)} \]
                    3. Applied rewrites31.4%

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

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

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

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

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

                    if -3.9999999999999999e101 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -275

                    1. Initial program 99.8%

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

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

                      \[\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 x around inf

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

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

                      if -275 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 1.99999999999999988e166

                      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(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}{a} - 1\right)\right)} + y \cdot i \]
                      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(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}{a} - 1\right)} + y \cdot i \]
                        2. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(\frac{z}{a}, a, a\right) + y \cdot i \]
                      8. Recombined 3 regimes into one program.
                      9. Final simplification63.7%

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

                      Alternative 6: 52.9% accurate, 0.5× speedup?

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

                        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 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.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 rewrites87.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 b around inf

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

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

                          if -3.9999999999999999e101 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -275

                          1. Initial program 99.8%

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

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

                            \[\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 x around inf

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

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

                            if -275 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 9.9999999999999992e249

                            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(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}{a} - 1\right)\right)} + y \cdot i \]
                            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(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}{a} - 1\right)} + y \cdot i \]
                              2. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \color{blue}{b \cdot \log c} \]
                                2. lower-log.f6488.6

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

                                \[\leadsto \color{blue}{b \cdot \log c} \]
                            8. Recombined 4 regimes into one program.
                            9. Final simplification64.4%

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

                            Alternative 7: 52.7% accurate, 0.7× speedup?

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

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

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

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

                                if -2e120 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 9.9999999999999992e249

                                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(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}{a} - 1\right)\right)} + y \cdot i \]
                                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(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}{a} - 1\right)} + y \cdot i \]
                                  2. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \color{blue}{b \cdot \log c} \]
                                    2. lower-log.f6488.6

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

                                    \[\leadsto \color{blue}{b \cdot \log c} \]
                                8. Recombined 3 regimes into one program.
                                9. Final simplification59.3%

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

                                Alternative 8: 49.9% accurate, 0.7× speedup?

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

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

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

                                      \[\leadsto \color{blue}{b \cdot \log c} \]
                                    2. lower-log.f6461.5

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

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

                                  if -2e120 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 9.9999999999999992e249

                                  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(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}{a} - 1\right)\right)} + y \cdot i \]
                                  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(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}{a} - 1\right)} + y \cdot i \]
                                    2. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \mathsf{fma}\left(\frac{z}{a}, a, a\right) + y \cdot i \]
                                  8. Recombined 2 regimes into one program.
                                  9. Final simplification55.0%

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

                                  Alternative 9: 49.7% accurate, 0.9× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + i \cdot y \leq -100:\\ \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\frac{z}{t}, t, t\right)\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 (<=
                                        (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* i y))
                                        -100.0)
                                     (fma y i (fma (/ z t) t 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 (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (i * y)) <= -100.0) {
                                  		tmp = fma(y, i, fma((z / t), t, t));
                                  	} else {
                                  		tmp = (i * y) + (a + t);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  function code(x, y, z, t, a, b, c, i)
                                  	tmp = 0.0
                                  	if (Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(i * y)) <= -100.0)
                                  		tmp = fma(y, i, fma(Float64(z / t), t, 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[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[(i * y), $MachinePrecision]), $MachinePrecision], -100.0], N[(y * i + N[(N[(z / t), $MachinePrecision] * t + t), $MachinePrecision]), $MachinePrecision], N[(N[(i * y), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + i \cdot y \leq -100:\\
                                  \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\frac{z}{t}, t, t\right)\right)\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;i \cdot y + \left(a + t\right)\\
                                  
                                  
                                  \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)) < -100

                                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

                                        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{x}{t}, \log y, \frac{z}{t}\right) + \frac{a}{t}, t, t\right) + y \cdot i \]
                                      2. Step-by-step derivation
                                        1. lift-+.f64N/A

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

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

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

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \mathsf{fma}\left(\mathsf{fma}\left(\frac{x}{t}, \log y, \frac{z}{t}\right) + \frac{a}{t}, t, t\right)\right)} \]
                                      3. Applied rewrites55.1%

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

                                        \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\frac{z}{t}, t, t\right)\right) \]
                                      5. Step-by-step derivation
                                        1. Applied rewrites40.0%

                                          \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\frac{z}{t}, t, t\right)\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))

                                        1. Initial program 99.8%

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

                                          \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                                        4. Step-by-step derivation
                                          1. 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 rewrites51.2%

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

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

                                        Alternative 10: 92.5% 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.1 \cdot 10^{+107}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 4 \cdot 10^{+88}:\\ \;\;\;\;\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.1e+107)
                                             t_1
                                             (if (<= x 4e+88) (+ (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.1e+107) {
                                        		tmp = t_1;
                                        	} else if (x <= 4e+88) {
                                        		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.1e+107)
                                        		tmp = t_1;
                                        	elseif (x <= 4e+88)
                                        		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.1e+107], t$95$1, If[LessEqual[x, 4e+88], 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.1 \cdot 10^{+107}:\\
                                        \;\;\;\;t\_1\\
                                        
                                        \mathbf{elif}\;x \leq 4 \cdot 10^{+88}:\\
                                        \;\;\;\;\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.1e107 or 3.99999999999999984e88 < 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.f6486.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 rewrites86.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.1e107 < x < 3.99999999999999984e88

                                          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.f6498.8

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

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

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.1 \cdot 10^{+107}:\\ \;\;\;\;\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 4 \cdot 10^{+88}:\\ \;\;\;\;\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 11: 90.2% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{x}{t}, \log y, \frac{z}{t}\right) + \frac{a}{t}, t, t\right) + y \cdot i \]
                                            2. Step-by-step derivation
                                              1. lift-+.f64N/A

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

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

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

                                                \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \mathsf{fma}\left(\mathsf{fma}\left(\frac{x}{t}, \log y, \frac{z}{t}\right) + \frac{a}{t}, t, t\right)\right)} \]
                                            3. Applied rewrites62.2%

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

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

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

                                                \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\log y \cdot x}\right) \]
                                              3. lower-log.f6483.2

                                                \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\log y} \cdot x\right) \]
                                            6. Applied rewrites83.2%

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

                                            if -2.39999999999999981e218 < x < 1.3000000000000001e155

                                            1. Initial program 99.8%

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

                                              \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                                            4. Step-by-step derivation
                                              1. 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.f6494.8

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

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

                                            if 1.3000000000000001e155 < 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. Step-by-step derivation
                                              1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \mathsf{fma}\left(\log y, x, \color{blue}{b \cdot \log c}\right) + y \cdot i \]
                                              2. lower-log.f6482.4

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

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

                                            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.4 \cdot 10^{+218}:\\ \;\;\;\;\mathsf{fma}\left(y, i, x \cdot \log y\right)\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{+155}:\\ \;\;\;\;\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(\log y, x, b \cdot \log c\right) + i \cdot y\\ \end{array} \]
                                          10. Add Preprocessing

                                          Alternative 12: 90.3% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{x}{t}, \log y, \frac{z}{t}\right) + \frac{a}{t}, t, t\right) + y \cdot i \]
                                              2. Step-by-step derivation
                                                1. lift-+.f64N/A

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

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

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

                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \mathsf{fma}\left(\mathsf{fma}\left(\frac{x}{t}, \log y, \frac{z}{t}\right) + \frac{a}{t}, t, t\right)\right)} \]
                                              3. Applied rewrites62.2%

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

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

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

                                                  \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\log y \cdot x}\right) \]
                                                3. lower-log.f6483.2

                                                  \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\log y} \cdot x\right) \]
                                              6. Applied rewrites83.2%

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

                                              if -2.39999999999999981e218 < x < 1.10000000000000002e156

                                              1. Initial program 99.8%

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

                                                \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                                              4. Step-by-step derivation
                                                1. 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.f6494.8

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

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

                                              if 1.10000000000000002e156 < 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.2

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

                                                \[\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 a around 0

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

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

                                                \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.4 \cdot 10^{+218}:\\ \;\;\;\;\mathsf{fma}\left(y, i, x \cdot \log y\right)\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{+156}:\\ \;\;\;\;\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, t\right) + \mathsf{fma}\left(\log y, x, z\right)\\ \end{array} \]
                                              10. Add Preprocessing

                                              Alternative 13: 90.0% accurate, 1.7× speedup?

                                              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, i, x \cdot \log y\right)\\ \mathbf{if}\;x \leq -2.4 \cdot 10^{+218}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 5 \cdot 10^{+228}:\\ \;\;\;\;\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 y i (* x (log y)))))
                                                 (if (<= x -2.4e+218)
                                                   t_1
                                                   (if (<= x 5e+228) (+ (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(y, i, (x * log(y)));
                                              	double tmp;
                                              	if (x <= -2.4e+218) {
                                              		tmp = t_1;
                                              	} else if (x <= 5e+228) {
                                              		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 = fma(y, i, Float64(x * log(y)))
                                              	tmp = 0.0
                                              	if (x <= -2.4e+218)
                                              		tmp = t_1;
                                              	elseif (x <= 5e+228)
                                              		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[(y * i + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.4e+218], t$95$1, If[LessEqual[x, 5e+228], 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(y, i, x \cdot \log y\right)\\
                                              \mathbf{if}\;x \leq -2.4 \cdot 10^{+218}:\\
                                              \;\;\;\;t\_1\\
                                              
                                              \mathbf{elif}\;x \leq 5 \cdot 10^{+228}:\\
                                              \;\;\;\;\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.39999999999999981e218 or 5e228 < 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 t around inf

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

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

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

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

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

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

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

                                                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{x}{t}, \log y, \frac{z}{t}\right) + \frac{a}{t}, t, t\right) + y \cdot i \]
                                                  2. Step-by-step derivation
                                                    1. lift-+.f64N/A

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

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

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

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

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\log y \cdot x}\right) \]
                                                    3. lower-log.f6481.4

                                                      \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\log y} \cdot x\right) \]
                                                  6. Applied rewrites81.4%

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

                                                  if -2.39999999999999981e218 < x < 5e228

                                                  1. Initial program 99.8%

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

                                                    \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                                                  4. Step-by-step derivation
                                                    1. 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.f6492.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 rewrites92.4%

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

                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.4 \cdot 10^{+218}:\\ \;\;\;\;\mathsf{fma}\left(y, i, x \cdot \log y\right)\\ \mathbf{elif}\;x \leq 5 \cdot 10^{+228}:\\ \;\;\;\;\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(y, i, x \cdot \log y\right)\\ \end{array} \]
                                                10. Add Preprocessing

                                                Alternative 14: 66.8% accurate, 1.8× speedup?

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

                                                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    if -2.1e11 < i < 3.39999999999999983e189

                                                    1. Initial program 99.8%

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

                                                      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                                                    4. Step-by-step derivation
                                                      1. 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 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 rewrites74.6%

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

                                                      if 3.39999999999999983e189 < i

                                                      1. Initial program 99.8%

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

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

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

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

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

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

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

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

                                                          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{x}{t}, \log y, \frac{z}{t}\right) + \frac{a}{t}, t, t\right) + y \cdot i \]
                                                        2. Step-by-step derivation
                                                          1. lift-+.f64N/A

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

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

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

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

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

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

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

                                                            \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\log y \cdot x}\right) \]
                                                          3. lower-log.f6484.2

                                                            \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\log y} \cdot x\right) \]
                                                        6. Applied rewrites84.2%

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

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

                                                      Alternative 15: 55.1% accurate, 5.1× speedup?

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

                                                        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto \mathsf{fma}\left(\frac{z}{t} + \frac{a}{t}, t, t\right) + y \cdot i \]
                                                          3. Step-by-step derivation
                                                            1. Applied rewrites48.6%

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

                                                            if 1.39999999999999992e-55 < a

                                                            1. Initial program 99.9%

                                                              \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                            2. 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(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}{a} - 1\right)\right)} + y \cdot i \]
                                                            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(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}{a} - 1\right)} + y \cdot i \]
                                                              2. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                \[\leadsto \mathsf{fma}\left(\frac{z}{a}, a, a\right) + y \cdot i \]
                                                            8. Recombined 2 regimes into one program.
                                                            9. Final simplification53.6%

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

                                                            Alternative 16: 51.1% accurate, 7.3× speedup?

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

                                                              1. Initial program 99.8%

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

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

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

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

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

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

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

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

                                                                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{x}{t}, \log y, \frac{z}{t}\right) + \frac{a}{t}, t, t\right) + y \cdot i \]
                                                                2. Step-by-step derivation
                                                                  1. lift-+.f64N/A

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

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

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

                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \mathsf{fma}\left(\mathsf{fma}\left(\frac{x}{t}, \log y, \frac{z}{t}\right) + \frac{a}{t}, t, t\right)\right)} \]
                                                                3. Applied rewrites55.8%

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

                                                                  \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\frac{z}{t}, t, t\right)\right) \]
                                                                5. Step-by-step derivation
                                                                  1. Applied rewrites44.1%

                                                                    \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\frac{z}{t}, t, t\right)\right) \]

                                                                  if 1.39999999999999992e-55 < a

                                                                  1. Initial program 99.9%

                                                                    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                                  2. 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(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}{a} - 1\right)\right)} + y \cdot i \]
                                                                  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(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}{a} - 1\right)} + y \cdot i \]
                                                                    2. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                      \[\leadsto \mathsf{fma}\left(\frac{z}{a}, a, a\right) + y \cdot i \]
                                                                  8. Recombined 2 regimes into one program.
                                                                  9. Final simplification50.6%

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

                                                                  Alternative 17: 53.1% 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.8%

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

                                                                    \[\leadsto \color{blue}{a + \left(t + \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                                                                  4. Step-by-step derivation
                                                                    1. 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.f6483.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 rewrites83.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) + i \cdot \color{blue}{y} \]
                                                                  7. Step-by-step derivation
                                                                    1. Applied rewrites47.8%

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

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

                                                                    Alternative 18: 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.8%

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

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

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

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

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

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

                                                                    Reproduce

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