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

Percentage Accurate: 99.8% → 99.8%
Time: 11.8s
Alternatives: 15
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 32.5% accurate, 0.3× 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) + y \cdot i\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+308}:\\ \;\;\;\;i \cdot y\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+197}:\\ \;\;\;\;\mathsf{fma}\left(\frac{a}{z}, z, z\right)\\ \mathbf{elif}\;t\_1 \leq 10^{+305}:\\ \;\;\;\;\frac{a}{y} \cdot y\\ \mathbf{else}:\\ \;\;\;\;i \cdot y\\ \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)))
          (* y i))))
   (if (<= t_1 -1e+308)
     (* i y)
     (if (<= t_1 4e+197)
       (fma (/ a z) z z)
       (if (<= t_1 1e+305) (* (/ a y) y) (* i y))))))
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))) + (y * i);
	double tmp;
	if (t_1 <= -1e+308) {
		tmp = i * y;
	} else if (t_1 <= 4e+197) {
		tmp = fma((a / z), z, z);
	} else if (t_1 <= 1e+305) {
		tmp = (a / y) * y;
	} else {
		tmp = i * y;
	}
	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(y * i))
	tmp = 0.0
	if (t_1 <= -1e+308)
		tmp = Float64(i * y);
	elseif (t_1 <= 4e+197)
		tmp = fma(Float64(a / z), z, z);
	elseif (t_1 <= 1e+305)
		tmp = Float64(Float64(a / y) * y);
	else
		tmp = Float64(i * y);
	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[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+308], N[(i * y), $MachinePrecision], If[LessEqual[t$95$1, 4e+197], N[(N[(a / z), $MachinePrecision] * z + z), $MachinePrecision], If[LessEqual[t$95$1, 1e+305], N[(N[(a / y), $MachinePrecision] * y), $MachinePrecision], N[(i * y), $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) + y \cdot i\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+308}:\\
\;\;\;\;i \cdot y\\

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

\mathbf{elif}\;t\_1 \leq 10^{+305}:\\
\;\;\;\;\frac{a}{y} \cdot y\\

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


\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)) < -1e308 or 9.9999999999999994e304 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

    1. Initial program 100.0%

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

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

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

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

    if -1e308 < (+.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)) < 3.9999999999999998e197

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

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

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

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

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

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

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

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

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

      if 3.9999999999999998e197 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 9.9999999999999994e304

      1. Initial program 99.9%

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

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

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

        \[\leadsto \left(\frac{x \cdot \log y}{y} + i\right) \cdot y \]
      6. Step-by-step derivation
        1. Applied rewrites20.5%

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

          \[\leadsto \frac{a}{y} \cdot y \]
        3. Step-by-step derivation
          1. Applied rewrites16.5%

            \[\leadsto \frac{a}{y} \cdot y \]
        4. Recombined 3 regimes into one program.
        5. Final simplification37.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) + y \cdot i \leq -1 \cdot 10^{+308}:\\ \;\;\;\;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) + y \cdot i \leq 4 \cdot 10^{+197}:\\ \;\;\;\;\mathsf{fma}\left(\frac{a}{z}, z, z\right)\\ \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) + y \cdot i \leq 10^{+305}:\\ \;\;\;\;\frac{a}{y} \cdot y\\ \mathbf{else}:\\ \;\;\;\;i \cdot y\\ \end{array} \]
        6. Add Preprocessing

        Alternative 3: 23.2% accurate, 0.3× 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) + y \cdot i\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+308}:\\ \;\;\;\;i \cdot y\\ \mathbf{elif}\;t\_1 \leq -200:\\ \;\;\;\;\frac{z}{y} \cdot y\\ \mathbf{elif}\;t\_1 \leq 10^{+305}:\\ \;\;\;\;\frac{a}{y} \cdot y\\ \mathbf{else}:\\ \;\;\;\;i \cdot y\\ \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)))
                  (* y i))))
           (if (<= t_1 -1e+308)
             (* i y)
             (if (<= t_1 -200.0)
               (* (/ z y) y)
               (if (<= t_1 1e+305) (* (/ a y) y) (* i y))))))
        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))) + (y * i);
        	double tmp;
        	if (t_1 <= -1e+308) {
        		tmp = i * y;
        	} else if (t_1 <= -200.0) {
        		tmp = (z / y) * y;
        	} else if (t_1 <= 1e+305) {
        		tmp = (a / y) * y;
        	} else {
        		tmp = i * y;
        	}
        	return tmp;
        }
        
        real(8) function code(x, y, z, t, a, b, c, i)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8), intent (in) :: t
            real(8), intent (in) :: a
            real(8), intent (in) :: b
            real(8), intent (in) :: c
            real(8), intent (in) :: i
            real(8) :: t_1
            real(8) :: tmp
            t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
            if (t_1 <= (-1d+308)) then
                tmp = i * y
            else if (t_1 <= (-200.0d0)) then
                tmp = (z / y) * y
            else if (t_1 <= 1d+305) then
                tmp = (a / y) * y
            else
                tmp = i * y
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
        	double t_1 = (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
        	double tmp;
        	if (t_1 <= -1e+308) {
        		tmp = i * y;
        	} else if (t_1 <= -200.0) {
        		tmp = (z / y) * y;
        	} else if (t_1 <= 1e+305) {
        		tmp = (a / y) * y;
        	} else {
        		tmp = i * y;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a, b, c, i):
        	t_1 = (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
        	tmp = 0
        	if t_1 <= -1e+308:
        		tmp = i * y
        	elif t_1 <= -200.0:
        		tmp = (z / y) * y
        	elif t_1 <= 1e+305:
        		tmp = (a / y) * y
        	else:
        		tmp = i * y
        	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(y * i))
        	tmp = 0.0
        	if (t_1 <= -1e+308)
        		tmp = Float64(i * y);
        	elseif (t_1 <= -200.0)
        		tmp = Float64(Float64(z / y) * y);
        	elseif (t_1 <= 1e+305)
        		tmp = Float64(Float64(a / y) * y);
        	else
        		tmp = Float64(i * y);
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t, a, b, c, i)
        	t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
        	tmp = 0.0;
        	if (t_1 <= -1e+308)
        		tmp = i * y;
        	elseif (t_1 <= -200.0)
        		tmp = (z / y) * y;
        	elseif (t_1 <= 1e+305)
        		tmp = (a / y) * y;
        	else
        		tmp = i * y;
        	end
        	tmp_2 = 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[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+308], N[(i * y), $MachinePrecision], If[LessEqual[t$95$1, -200.0], N[(N[(z / y), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$1, 1e+305], N[(N[(a / y), $MachinePrecision] * y), $MachinePrecision], N[(i * y), $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) + y \cdot i\\
        \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+308}:\\
        \;\;\;\;i \cdot y\\
        
        \mathbf{elif}\;t\_1 \leq -200:\\
        \;\;\;\;\frac{z}{y} \cdot y\\
        
        \mathbf{elif}\;t\_1 \leq 10^{+305}:\\
        \;\;\;\;\frac{a}{y} \cdot y\\
        
        \mathbf{else}:\\
        \;\;\;\;i \cdot y\\
        
        
        \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)) < -1e308 or 9.9999999999999994e304 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

          1. Initial program 100.0%

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

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

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

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

          if -1e308 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -200

          1. Initial program 99.8%

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

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

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

            \[\leadsto \left(\frac{x \cdot \log y}{y} + i\right) \cdot y \]
          6. Step-by-step derivation
            1. Applied rewrites26.2%

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

              \[\leadsto \frac{z}{y} \cdot y \]
            3. Step-by-step derivation
              1. Applied rewrites14.5%

                \[\leadsto \frac{z}{y} \cdot y \]

              if -200 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 9.9999999999999994e304

              1. Initial program 99.9%

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

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

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

                \[\leadsto \left(\frac{x \cdot \log y}{y} + i\right) \cdot y \]
              6. Step-by-step derivation
                1. Applied rewrites23.9%

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

                  \[\leadsto \frac{a}{y} \cdot y \]
                3. Step-by-step derivation
                  1. Applied rewrites16.7%

                    \[\leadsto \frac{a}{y} \cdot y \]
                4. Recombined 3 regimes into one program.
                5. Final simplification27.2%

                  \[\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) + y \cdot i \leq -1 \cdot 10^{+308}:\\ \;\;\;\;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) + y \cdot i \leq -200:\\ \;\;\;\;\frac{z}{y} \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) + y \cdot i \leq 10^{+305}:\\ \;\;\;\;\frac{a}{y} \cdot y\\ \mathbf{else}:\\ \;\;\;\;i \cdot y\\ \end{array} \]
                6. Add Preprocessing

                Alternative 4: 24.5% 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) + y \cdot i\\ \mathbf{if}\;t\_1 \leq -200 \lor \neg \left(t\_1 \leq 10^{+305}\right):\\ \;\;\;\;i \cdot y\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{y} \cdot y\\ \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)))
                          (* y i))))
                   (if (or (<= t_1 -200.0) (not (<= t_1 1e+305))) (* i y) (* (/ a y) y))))
                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))) + (y * i);
                	double tmp;
                	if ((t_1 <= -200.0) || !(t_1 <= 1e+305)) {
                		tmp = i * y;
                	} else {
                		tmp = (a / y) * y;
                	}
                	return tmp;
                }
                
                real(8) function code(x, y, z, t, a, b, c, i)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    real(8), intent (in) :: z
                    real(8), intent (in) :: t
                    real(8), intent (in) :: a
                    real(8), intent (in) :: b
                    real(8), intent (in) :: c
                    real(8), intent (in) :: i
                    real(8) :: t_1
                    real(8) :: tmp
                    t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
                    if ((t_1 <= (-200.0d0)) .or. (.not. (t_1 <= 1d+305))) then
                        tmp = i * y
                    else
                        tmp = (a / y) * y
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                	double t_1 = (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
                	double tmp;
                	if ((t_1 <= -200.0) || !(t_1 <= 1e+305)) {
                		tmp = i * y;
                	} else {
                		tmp = (a / y) * y;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t, a, b, c, i):
                	t_1 = (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
                	tmp = 0
                	if (t_1 <= -200.0) or not (t_1 <= 1e+305):
                		tmp = i * y
                	else:
                		tmp = (a / y) * y
                	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(y * i))
                	tmp = 0.0
                	if ((t_1 <= -200.0) || !(t_1 <= 1e+305))
                		tmp = Float64(i * y);
                	else
                		tmp = Float64(Float64(a / y) * y);
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t, a, b, c, i)
                	t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                	tmp = 0.0;
                	if ((t_1 <= -200.0) || ~((t_1 <= 1e+305)))
                		tmp = i * y;
                	else
                		tmp = (a / y) * y;
                	end
                	tmp_2 = 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[(y * i), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -200.0], N[Not[LessEqual[t$95$1, 1e+305]], $MachinePrecision]], N[(i * y), $MachinePrecision], N[(N[(a / y), $MachinePrecision] * y), $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) + y \cdot i\\
                \mathbf{if}\;t\_1 \leq -200 \lor \neg \left(t\_1 \leq 10^{+305}\right):\\
                \;\;\;\;i \cdot y\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{a}{y} \cdot y\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -200 or 9.9999999999999994e304 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                  1. Initial program 99.9%

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

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

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

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

                  if -200 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 9.9999999999999994e304

                  1. Initial program 99.9%

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

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

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

                    \[\leadsto \left(\frac{x \cdot \log y}{y} + i\right) \cdot y \]
                  6. Step-by-step derivation
                    1. Applied rewrites23.9%

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

                      \[\leadsto \frac{a}{y} \cdot y \]
                    3. Step-by-step derivation
                      1. Applied rewrites16.7%

                        \[\leadsto \frac{a}{y} \cdot y \]
                    4. Recombined 2 regimes into one program.
                    5. Final simplification27.6%

                      \[\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) + y \cdot i \leq -200 \lor \neg \left(\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 \leq 10^{+305}\right):\\ \;\;\;\;i \cdot y\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{y} \cdot y\\ \end{array} \]
                    6. Add Preprocessing

                    Alternative 5: 84.5% accurate, 0.5× 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) + y \cdot i \leq -300:\\ \;\;\;\;\mathsf{fma}\left(y, i, \left(t + z\right) + \mathsf{fma}\left(\log c, b - 0.5, \log y \cdot x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, \mathsf{fma}\left(\log y, x, t\right)\right)\right) + a\\ \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))) (* y i))
                          -300.0)
                       (fma y i (+ (+ t z) (fma (log c) (- b 0.5) (* (log y) x))))
                       (+ (fma i y (fma (log c) (- b 0.5) (fma (log y) x t))) a)))
                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double tmp;
                    	if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -300.0) {
                    		tmp = fma(y, i, ((t + z) + fma(log(c), (b - 0.5), (log(y) * x))));
                    	} else {
                    		tmp = fma(i, y, fma(log(c), (b - 0.5), fma(log(y), x, t))) + a;
                    	}
                    	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(y * i)) <= -300.0)
                    		tmp = fma(y, i, Float64(Float64(t + z) + fma(log(c), Float64(b - 0.5), Float64(log(y) * x))));
                    	else
                    		tmp = Float64(fma(i, y, fma(log(c), Float64(b - 0.5), fma(log(y), x, t))) + a);
                    	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[(y * i), $MachinePrecision]), $MachinePrecision], -300.0], N[(y * i + N[(N[(t + z), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(i * y + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + a), $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) + y \cdot i \leq -300:\\
                    \;\;\;\;\mathsf{fma}\left(y, i, \left(t + z\right) + \mathsf{fma}\left(\log c, b - 0.5, \log y \cdot x\right)\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, \mathsf{fma}\left(\log y, x, t\right)\right)\right) + a\\
                    
                    
                    \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)) < -300

                      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if -300 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\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) + y \cdot i \leq -300:\\ \;\;\;\;\mathsf{fma}\left(y, i, \left(t + z\right) + \mathsf{fma}\left(\log c, b - 0.5, \log y \cdot x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, \mathsf{fma}\left(\log y, x, t\right)\right)\right) + a\\ \end{array} \]
                    5. Add Preprocessing

                    Alternative 6: 84.5% accurate, 0.5× 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) + y \cdot i \leq -300:\\ \;\;\;\;\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log y, x, \mathsf{fma}\left(b - 0.5, \log c, t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, \mathsf{fma}\left(\log y, x, t\right)\right)\right) + a\\ \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))) (* y i))
                          -300.0)
                       (+ (fma i y z) (fma (log y) x (fma (- b 0.5) (log c) t)))
                       (+ (fma i y (fma (log c) (- b 0.5) (fma (log y) x t))) a)))
                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double tmp;
                    	if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -300.0) {
                    		tmp = fma(i, y, z) + fma(log(y), x, fma((b - 0.5), log(c), t));
                    	} else {
                    		tmp = fma(i, y, fma(log(c), (b - 0.5), fma(log(y), x, t))) + a;
                    	}
                    	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(y * i)) <= -300.0)
                    		tmp = Float64(fma(i, y, z) + fma(log(y), x, fma(Float64(b - 0.5), log(c), t)));
                    	else
                    		tmp = Float64(fma(i, y, fma(log(c), Float64(b - 0.5), fma(log(y), x, t))) + a);
                    	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[(y * i), $MachinePrecision]), $MachinePrecision], -300.0], N[(N[(i * y + z), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(i * y + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + a), $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) + y \cdot i \leq -300:\\
                    \;\;\;\;\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log y, x, \mathsf{fma}\left(b - 0.5, \log c, t\right)\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, \mathsf{fma}\left(\log y, x, t\right)\right)\right) + a\\
                    
                    
                    \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)) < -300

                      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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if -300 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\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) + y \cdot i \leq -300:\\ \;\;\;\;\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log y, x, \mathsf{fma}\left(b - 0.5, \log c, t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, \mathsf{fma}\left(\log y, x, t\right)\right)\right) + a\\ \end{array} \]
                    5. Add Preprocessing

                    Alternative 7: 53.5% accurate, 0.7× 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) + y \cdot i \leq -2 \cdot 10^{+54}:\\ \;\;\;\;\mathsf{fma}\left(\frac{i \cdot y}{z}, z, z\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, t\right)\right) + a\\ \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))) (* y i))
                          -2e+54)
                       (fma (/ (* i y) z) z z)
                       (+ (fma i y (fma (log c) (- b 0.5) t)) a)))
                    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))) + (y * i)) <= -2e+54) {
                    		tmp = fma(((i * y) / z), z, z);
                    	} else {
                    		tmp = fma(i, y, fma(log(c), (b - 0.5), t)) + a;
                    	}
                    	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(y * i)) <= -2e+54)
                    		tmp = fma(Float64(Float64(i * y) / z), z, z);
                    	else
                    		tmp = Float64(fma(i, y, fma(log(c), Float64(b - 0.5), t)) + a);
                    	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[(y * i), $MachinePrecision]), $MachinePrecision], -2e+54], N[(N[(N[(i * y), $MachinePrecision] / z), $MachinePrecision] * z + z), $MachinePrecision], N[(N[(i * y + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $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) + y \cdot i \leq -2 \cdot 10^{+54}:\\
                    \;\;\;\;\mathsf{fma}\left(\frac{i \cdot y}{z}, z, z\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, t\right)\right) + a\\
                    
                    
                    \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)) < -2.0000000000000002e54

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

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

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

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

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

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

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

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

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

                        if -2.0000000000000002e54 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, t\right)\right) + a \]
                        13. Recombined 2 regimes into one program.
                        14. Final simplification62.3%

                          \[\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) + y \cdot i \leq -2 \cdot 10^{+54}:\\ \;\;\;\;\mathsf{fma}\left(\frac{i \cdot y}{z}, z, z\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, t\right)\right) + a\\ \end{array} \]
                        15. Add Preprocessing

                        Alternative 8: 34.1% 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) + y \cdot i \leq -200:\\ \;\;\;\;\mathsf{fma}\left(\frac{i \cdot y}{z}, z, z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{a}{y} + i\right) \cdot y\\ \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))) (* y i))
                              -200.0)
                           (fma (/ (* i y) z) z z)
                           (* (+ (/ a y) i) y)))
                        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))) + (y * i)) <= -200.0) {
                        		tmp = fma(((i * y) / z), z, z);
                        	} else {
                        		tmp = ((a / y) + i) * y;
                        	}
                        	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(y * i)) <= -200.0)
                        		tmp = fma(Float64(Float64(i * y) / z), z, z);
                        	else
                        		tmp = Float64(Float64(Float64(a / y) + i) * y);
                        	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[(y * i), $MachinePrecision]), $MachinePrecision], -200.0], N[(N[(N[(i * y), $MachinePrecision] / z), $MachinePrecision] * z + z), $MachinePrecision], N[(N[(N[(a / y), $MachinePrecision] + i), $MachinePrecision] * y), $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) + y \cdot i \leq -200:\\
                        \;\;\;\;\mathsf{fma}\left(\frac{i \cdot y}{z}, z, z\right)\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\left(\frac{a}{y} + i\right) \cdot y\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -200

                          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

                            if -200 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                            1. Initial program 99.9%

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

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

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

                              \[\leadsto \left(\frac{a}{y} + i\right) \cdot y \]
                            6. Step-by-step derivation
                              1. Applied rewrites40.4%

                                \[\leadsto \left(\frac{a}{y} + i\right) \cdot y \]
                            7. Recombined 2 regimes into one program.
                            8. Final simplification39.7%

                              \[\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) + y \cdot i \leq -200:\\ \;\;\;\;\mathsf{fma}\left(\frac{i \cdot y}{z}, z, z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{a}{y} + i\right) \cdot y\\ \end{array} \]
                            9. Add Preprocessing

                            Alternative 9: 93.5% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(i, y, x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right) + a \]
                              12. Step-by-step derivation
                                1. Applied rewrites87.5%

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

                                if -7.80000000000000036e144 < x < 9.79999999999999962e36

                                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. 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) \]
                                  4. associate-+r+N/A

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

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

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

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

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

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

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

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

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

                                if 9.79999999999999962e36 < x

                                1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, \mathsf{fma}\left(\log y, x, t\right)\right)\right) + a} \]
                              13. Recombined 3 regimes into one program.
                              14. Final simplification97.5%

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

                              Alternative 10: 91.4% accurate, 1.0× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -7.8 \cdot 10^{+144} \lor \neg \left(x \leq 9.8 \cdot 10^{+36}\right):\\ \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, \log y \cdot x\right)\right) + a\\ \mathbf{else}:\\ \;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)\\ \end{array} \end{array} \]
                              (FPCore (x y z t a b c i)
                               :precision binary64
                               (if (or (<= x -7.8e+144) (not (<= x 9.8e+36)))
                                 (+ (fma i y (fma (log c) (- b 0.5) (* (log y) x))) a)
                                 (+ (+ a t) (fma (- b 0.5) (log c) (fma i y z)))))
                              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                              	double tmp;
                              	if ((x <= -7.8e+144) || !(x <= 9.8e+36)) {
                              		tmp = fma(i, y, fma(log(c), (b - 0.5), (log(y) * x))) + a;
                              	} else {
                              		tmp = (a + t) + fma((b - 0.5), log(c), fma(i, y, z));
                              	}
                              	return tmp;
                              }
                              
                              function code(x, y, z, t, a, b, c, i)
                              	tmp = 0.0
                              	if ((x <= -7.8e+144) || !(x <= 9.8e+36))
                              		tmp = Float64(fma(i, y, fma(log(c), Float64(b - 0.5), Float64(log(y) * x))) + a);
                              	else
                              		tmp = Float64(Float64(a + t) + fma(Float64(b - 0.5), log(c), fma(i, y, z)));
                              	end
                              	return tmp
                              end
                              
                              code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -7.8e+144], N[Not[LessEqual[x, 9.8e+36]], $MachinePrecision]], N[(N[(i * y + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], N[(N[(a + t), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(i * y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;x \leq -7.8 \cdot 10^{+144} \lor \neg \left(x \leq 9.8 \cdot 10^{+36}\right):\\
                              \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, \log y \cdot x\right)\right) + a\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if x < -7.80000000000000036e144 or 9.79999999999999962e36 < 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if -7.80000000000000036e144 < x < 9.79999999999999962e36

                                  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. 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) \]
                                    4. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

                                Alternative 11: 89.3% accurate, 1.0× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.16 \cdot 10^{+145} \lor \neg \left(x \leq 4.4 \cdot 10^{+109}\right):\\ \;\;\;\;\mathsf{fma}\left(\log y, x, \mathsf{fma}\left(\log c, b - 0.5, t\right)\right) + a\\ \mathbf{else}:\\ \;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)\\ \end{array} \end{array} \]
                                (FPCore (x y z t a b c i)
                                 :precision binary64
                                 (if (or (<= x -1.16e+145) (not (<= x 4.4e+109)))
                                   (+ (fma (log y) x (fma (log c) (- b 0.5) t)) a)
                                   (+ (+ a t) (fma (- b 0.5) (log c) (fma i y z)))))
                                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                	double tmp;
                                	if ((x <= -1.16e+145) || !(x <= 4.4e+109)) {
                                		tmp = fma(log(y), x, fma(log(c), (b - 0.5), t)) + a;
                                	} else {
                                		tmp = (a + t) + fma((b - 0.5), log(c), fma(i, y, z));
                                	}
                                	return tmp;
                                }
                                
                                function code(x, y, z, t, a, b, c, i)
                                	tmp = 0.0
                                	if ((x <= -1.16e+145) || !(x <= 4.4e+109))
                                		tmp = Float64(fma(log(y), x, fma(log(c), Float64(b - 0.5), t)) + a);
                                	else
                                		tmp = Float64(Float64(a + t) + fma(Float64(b - 0.5), log(c), fma(i, y, z)));
                                	end
                                	return tmp
                                end
                                
                                code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.16e+145], N[Not[LessEqual[x, 4.4e+109]], $MachinePrecision]], N[(N[(N[Log[y], $MachinePrecision] * x + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], N[(N[(a + t), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(i * y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;x \leq -1.16 \cdot 10^{+145} \lor \neg \left(x \leq 4.4 \cdot 10^{+109}\right):\\
                                \;\;\;\;\mathsf{fma}\left(\log y, x, \mathsf{fma}\left(\log c, b - 0.5, t\right)\right) + a\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if x < -1.15999999999999999e145 or 4.3999999999999998e109 < 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if -1.15999999999999999e145 < x < 4.3999999999999998e109

                                    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. 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) \]
                                      4. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

                                  Alternative 12: 88.6% accurate, 1.7× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.6 \cdot 10^{+240} \lor \neg \left(x \leq 7.8 \cdot 10^{+238}\right):\\ \;\;\;\;\log y \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)\\ \end{array} \end{array} \]
                                  (FPCore (x y z t a b c i)
                                   :precision binary64
                                   (if (or (<= x -1.6e+240) (not (<= x 7.8e+238)))
                                     (* (log y) x)
                                     (+ (+ a t) (fma (- b 0.5) (log c) (fma i y z)))))
                                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                  	double tmp;
                                  	if ((x <= -1.6e+240) || !(x <= 7.8e+238)) {
                                  		tmp = log(y) * x;
                                  	} else {
                                  		tmp = (a + t) + fma((b - 0.5), log(c), fma(i, y, z));
                                  	}
                                  	return tmp;
                                  }
                                  
                                  function code(x, y, z, t, a, b, c, i)
                                  	tmp = 0.0
                                  	if ((x <= -1.6e+240) || !(x <= 7.8e+238))
                                  		tmp = Float64(log(y) * x);
                                  	else
                                  		tmp = Float64(Float64(a + t) + fma(Float64(b - 0.5), log(c), fma(i, y, z)));
                                  	end
                                  	return tmp
                                  end
                                  
                                  code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.6e+240], N[Not[LessEqual[x, 7.8e+238]], $MachinePrecision]], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision], N[(N[(a + t), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(i * y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;x \leq -1.6 \cdot 10^{+240} \lor \neg \left(x \leq 7.8 \cdot 10^{+238}\right):\\
                                  \;\;\;\;\log y \cdot x\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if x < -1.59999999999999999e240 or 7.79999999999999986e238 < x

                                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \color{blue}{\log y} \cdot x \]
                                    7. Applied rewrites76.1%

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

                                    if -1.59999999999999999e240 < x < 7.79999999999999986e238

                                    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. 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) \]
                                      4. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

                                  Alternative 13: 74.2% accurate, 1.8× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.6 \cdot 10^{+240} \lor \neg \left(x \leq 7.8 \cdot 10^{+238}\right):\\ \;\;\;\;\log y \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + a\right) + y \cdot i\\ \end{array} \end{array} \]
                                  (FPCore (x y z t a b c i)
                                   :precision binary64
                                   (if (or (<= x -1.6e+240) (not (<= x 7.8e+238)))
                                     (* (log y) x)
                                     (+ (+ (fma (log c) (- b 0.5) z) a) (* y i))))
                                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                  	double tmp;
                                  	if ((x <= -1.6e+240) || !(x <= 7.8e+238)) {
                                  		tmp = log(y) * x;
                                  	} else {
                                  		tmp = (fma(log(c), (b - 0.5), z) + a) + (y * i);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  function code(x, y, z, t, a, b, c, i)
                                  	tmp = 0.0
                                  	if ((x <= -1.6e+240) || !(x <= 7.8e+238))
                                  		tmp = Float64(log(y) * x);
                                  	else
                                  		tmp = Float64(Float64(fma(log(c), Float64(b - 0.5), z) + a) + Float64(y * i));
                                  	end
                                  	return tmp
                                  end
                                  
                                  code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.6e+240], N[Not[LessEqual[x, 7.8e+238]], $MachinePrecision]], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision], N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + a), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;x \leq -1.6 \cdot 10^{+240} \lor \neg \left(x \leq 7.8 \cdot 10^{+238}\right):\\
                                  \;\;\;\;\log y \cdot x\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + a\right) + y \cdot i\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if x < -1.59999999999999999e240 or 7.79999999999999986e238 < x

                                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \color{blue}{\log y} \cdot x \]
                                    7. Applied rewrites76.1%

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

                                    if -1.59999999999999999e240 < x < 7.79999999999999986e238

                                    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.6 \cdot 10^{+240} \lor \neg \left(x \leq 7.8 \cdot 10^{+238}\right):\\ \;\;\;\;\log y \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + a\right) + y \cdot i\\ \end{array} \]
                                    10. Add Preprocessing

                                    Alternative 14: 41.3% accurate, 9.0× speedup?

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

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

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

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

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

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

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

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

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

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

                                        if 1.0499999999999999e48 < y

                                        1. Initial program 99.9%

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

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

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

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

                                            \[\leadsto \left(\frac{a}{y} + i\right) \cdot y \]
                                        7. Recombined 2 regimes into one program.
                                        8. Final simplification43.4%

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

                                        Alternative 15: 24.9% accurate, 39.0× speedup?

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

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

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

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

                                          \[\leadsto \color{blue}{i \cdot y} \]
                                        6. Final simplification26.0%

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

                                        Reproduce

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