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

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

\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \left(\mathsf{fma}\left(\log y, x, z\right) + t\right) + a\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. Final simplification99.9%

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

Alternative 2: 27.6% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+94}:\\
\;\;\;\;\frac{z}{i} \cdot i\\

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


\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)) < -5e258

    1. Initial program 99.9%

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

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

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

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

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

    if -5e258 < (+.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)) < -5.0000000000000001e94

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{z}{i} \cdot i \]
    7. Step-by-step derivation
      1. Applied rewrites10.6%

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

      if -5.0000000000000001e94 < (+.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 i around -inf

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 3: 74.8% accurate, 0.7× speedup?

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

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

        if -9.9999999999999998e146 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 2.0000000000000001e167

        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 x around 0

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, \color{blue}{-0.5}, \left(z + t\right) + a\right)\right) \]
        10. Recombined 2 regimes into one program.
        11. Add Preprocessing

        Alternative 4: 30.7% accurate, 0.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;i \cdot y + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) \leq -100:\\ \;\;\;\;\mathsf{fma}\left(y, i, \frac{z}{x} \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \frac{a}{x} \cdot x\right)\\ \end{array} \end{array} \]
        (FPCore (x y z t a b c i)
         :precision binary64
         (if (<=
              (+ (* i y) (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))))
              -100.0)
           (fma y i (* (/ z x) x))
           (fma y i (* (/ a x) x))))
        double code(double x, double y, double z, double t, double a, double b, double c, double i) {
        	double tmp;
        	if (((i * y) + (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c)))) <= -100.0) {
        		tmp = fma(y, i, ((z / x) * x));
        	} else {
        		tmp = fma(y, i, ((a / x) * x));
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b, c, i)
        	tmp = 0.0
        	if (Float64(Float64(i * y) + Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c)))) <= -100.0)
        		tmp = fma(y, i, Float64(Float64(z / x) * x));
        	else
        		tmp = fma(y, i, Float64(Float64(a / x) * x));
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(i * y), $MachinePrecision] + 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]), $MachinePrecision], -100.0], N[(y * i + N[(N[(z / x), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(N[(a / x), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;i \cdot y + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) \leq -100:\\
        \;\;\;\;\mathsf{fma}\left(y, i, \frac{z}{x} \cdot x\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(y, i, \frac{a}{x} \cdot x\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -100

          1. Initial program 99.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 x around inf

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

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

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

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

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

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

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

            1. Initial program 99.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 x around inf

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(y, i, \frac{a}{x} \cdot x\right) \]
            10. Recombined 2 regimes into one program.
            11. Final simplification34.2%

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

            Alternative 5: 31.3% accurate, 0.9× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;i \cdot y + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) \leq -100:\\ \;\;\;\;\left(\frac{z}{i} + y\right) \cdot i\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \frac{a}{x} \cdot x\right)\\ \end{array} \end{array} \]
            (FPCore (x y z t a b c i)
             :precision binary64
             (if (<=
                  (+ (* i y) (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))))
                  -100.0)
               (* (+ (/ z i) y) i)
               (fma y i (* (/ a x) x))))
            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
            	double tmp;
            	if (((i * y) + (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c)))) <= -100.0) {
            		tmp = ((z / i) + y) * i;
            	} else {
            		tmp = fma(y, i, ((a / x) * x));
            	}
            	return tmp;
            }
            
            function code(x, y, z, t, a, b, c, i)
            	tmp = 0.0
            	if (Float64(Float64(i * y) + Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c)))) <= -100.0)
            		tmp = Float64(Float64(Float64(z / i) + y) * i);
            	else
            		tmp = fma(y, i, Float64(Float64(a / x) * x));
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(i * y), $MachinePrecision] + 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]), $MachinePrecision], -100.0], N[(N[(N[(z / i), $MachinePrecision] + y), $MachinePrecision] * i), $MachinePrecision], N[(y * i + N[(N[(a / x), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;i \cdot y + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) \leq -100:\\
            \;\;\;\;\left(\frac{z}{i} + y\right) \cdot i\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(y, i, \frac{a}{x} \cdot x\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -100

              1. Initial program 99.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 i around -inf

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

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

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

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

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

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

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

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

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

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

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

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

                1. Initial program 99.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 x around inf

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(y, i, \frac{a}{x} \cdot x\right) \]
                10. Recombined 2 regimes into one program.
                11. Final simplification32.9%

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

                Alternative 6: 31.8% accurate, 0.9× speedup?

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

                  1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                    1. Initial program 99.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 i around -inf

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 7: 90.1% accurate, 1.0× speedup?

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

                      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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if 3.90000000000000023e-84 < 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. 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 x around 0

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

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

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

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

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

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

                    Alternative 8: 90.4% accurate, 1.7× speedup?

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

                      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. 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.f64100.0

                          \[\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.f64100.0

                          \[\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-+.f64100.0

                          \[\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-+.f64100.0

                          \[\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.f64100.0

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

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

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

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

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

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

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

                        if -3.7000000000000002e243 < x < 6.00000000000000002e223

                        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 x around 0

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

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

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

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

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

                        if 6.00000000000000002e223 < 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.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 x around inf

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log y, \color{blue}{x}, \frac{a}{x} \cdot x\right)\right) \]
                          3. Recombined 3 regimes into one program.
                          4. Add Preprocessing

                          Alternative 9: 90.4% accurate, 1.7× speedup?

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

                            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. 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.f64100.0

                                \[\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.f64100.0

                                \[\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-+.f64100.0

                                \[\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-+.f64100.0

                                \[\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.f64100.0

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

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

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

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

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

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

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

                              if -3.7000000000000002e243 < x < 6.00000000000000002e223

                              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 x around 0

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

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

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

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

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

                              if 6.00000000000000002e223 < 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.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 x around inf

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(y, i, \left(\frac{a}{x} + \log y\right) \cdot x\right) \]
                              10. Recombined 3 regimes into one program.
                              11. Add Preprocessing

                              Alternative 10: 89.9% accurate, 1.7× speedup?

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

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

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

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

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

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

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

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

                                  if -1.02e119 < x < 6.00000000000000002e223

                                  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 x around 0

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

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

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

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

                                    \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \color{blue}{\left(z + t\right) + a}\right)\right) \]
                                10. Recombined 2 regimes into one program.
                                11. Add Preprocessing

                                Alternative 11: 85.5% accurate, 1.8× speedup?

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

                                  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 x around 0

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

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

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

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

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

                                  if 9.5e272 < x

                                  1. Initial program 99.6%

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

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

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

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

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

                                    \[\leadsto \color{blue}{\log y \cdot x} \]
                                3. Recombined 2 regimes into one program.
                                4. Final simplification87.6%

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

                                Alternative 12: 85.5% accurate, 1.8× speedup?

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

                                  1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if 9.5e272 < x

                                  1. Initial program 99.6%

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

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

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

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

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

                                    \[\leadsto \color{blue}{\log y \cdot x} \]
                                3. Recombined 2 regimes into one program.
                                4. Final simplification87.6%

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

                                Alternative 13: 26.2% accurate, 8.1× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 4.8 \cdot 10^{-208}:\\ \;\;\;\;\frac{z}{i} \cdot i\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{+46}:\\ \;\;\;\;\frac{a}{i} \cdot i\\ \mathbf{else}:\\ \;\;\;\;i \cdot y\\ \end{array} \end{array} \]
                                (FPCore (x y z t a b c i)
                                 :precision binary64
                                 (if (<= y 4.8e-208) (* (/ z i) i) (if (<= y 1.8e+46) (* (/ a i) i) (* i y))))
                                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                	double tmp;
                                	if (y <= 4.8e-208) {
                                		tmp = (z / i) * i;
                                	} else if (y <= 1.8e+46) {
                                		tmp = (a / i) * i;
                                	} 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) :: tmp
                                    if (y <= 4.8d-208) then
                                        tmp = (z / i) * i
                                    else if (y <= 1.8d+46) then
                                        tmp = (a / i) * i
                                    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 tmp;
                                	if (y <= 4.8e-208) {
                                		tmp = (z / i) * i;
                                	} else if (y <= 1.8e+46) {
                                		tmp = (a / i) * i;
                                	} else {
                                		tmp = i * y;
                                	}
                                	return tmp;
                                }
                                
                                def code(x, y, z, t, a, b, c, i):
                                	tmp = 0
                                	if y <= 4.8e-208:
                                		tmp = (z / i) * i
                                	elif y <= 1.8e+46:
                                		tmp = (a / i) * i
                                	else:
                                		tmp = i * y
                                	return tmp
                                
                                function code(x, y, z, t, a, b, c, i)
                                	tmp = 0.0
                                	if (y <= 4.8e-208)
                                		tmp = Float64(Float64(z / i) * i);
                                	elseif (y <= 1.8e+46)
                                		tmp = Float64(Float64(a / i) * i);
                                	else
                                		tmp = Float64(i * y);
                                	end
                                	return tmp
                                end
                                
                                function tmp_2 = code(x, y, z, t, a, b, c, i)
                                	tmp = 0.0;
                                	if (y <= 4.8e-208)
                                		tmp = (z / i) * i;
                                	elseif (y <= 1.8e+46)
                                		tmp = (a / i) * i;
                                	else
                                		tmp = i * y;
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 4.8e-208], N[(N[(z / i), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[y, 1.8e+46], N[(N[(a / i), $MachinePrecision] * i), $MachinePrecision], N[(i * y), $MachinePrecision]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;y \leq 4.8 \cdot 10^{-208}:\\
                                \;\;\;\;\frac{z}{i} \cdot i\\
                                
                                \mathbf{elif}\;y \leq 1.8 \cdot 10^{+46}:\\
                                \;\;\;\;\frac{a}{i} \cdot i\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;i \cdot y\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 3 regimes
                                2. if y < 4.7999999999999998e-208

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{z}{i} \cdot i \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites9.2%

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

                                    if 4.7999999999999998e-208 < y < 1.7999999999999999e46

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \frac{a}{i} \cdot i \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites15.8%

                                        \[\leadsto \frac{a}{i} \cdot i \]

                                      if 1.7999999999999999e46 < 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}{i \cdot y} \]
                                      4. Step-by-step derivation
                                        1. *-commutativeN/A

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

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

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

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 4.8 \cdot 10^{-208}:\\ \;\;\;\;\frac{z}{i} \cdot i\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{+46}:\\ \;\;\;\;\frac{a}{i} \cdot i\\ \mathbf{else}:\\ \;\;\;\;i \cdot y\\ \end{array} \]
                                    10. Add Preprocessing

                                    Alternative 14: 26.5% accurate, 10.2× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 1.8 \cdot 10^{+46}:\\ \;\;\;\;\frac{a}{i} \cdot i\\ \mathbf{else}:\\ \;\;\;\;i \cdot y\\ \end{array} \end{array} \]
                                    (FPCore (x y z t a b c i)
                                     :precision binary64
                                     (if (<= y 1.8e+46) (* (/ a i) i) (* 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.8e+46) {
                                    		tmp = (a / i) * i;
                                    	} 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) :: tmp
                                        if (y <= 1.8d+46) then
                                            tmp = (a / i) * i
                                        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 tmp;
                                    	if (y <= 1.8e+46) {
                                    		tmp = (a / i) * i;
                                    	} else {
                                    		tmp = i * y;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(x, y, z, t, a, b, c, i):
                                    	tmp = 0
                                    	if y <= 1.8e+46:
                                    		tmp = (a / i) * i
                                    	else:
                                    		tmp = i * y
                                    	return tmp
                                    
                                    function code(x, y, z, t, a, b, c, i)
                                    	tmp = 0.0
                                    	if (y <= 1.8e+46)
                                    		tmp = Float64(Float64(a / i) * i);
                                    	else
                                    		tmp = Float64(i * y);
                                    	end
                                    	return tmp
                                    end
                                    
                                    function tmp_2 = code(x, y, z, t, a, b, c, i)
                                    	tmp = 0.0;
                                    	if (y <= 1.8e+46)
                                    		tmp = (a / i) * i;
                                    	else
                                    		tmp = i * y;
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 1.8e+46], N[(N[(a / i), $MachinePrecision] * i), $MachinePrecision], N[(i * y), $MachinePrecision]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    \mathbf{if}\;y \leq 1.8 \cdot 10^{+46}:\\
                                    \;\;\;\;\frac{a}{i} \cdot i\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;i \cdot y\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if y < 1.7999999999999999e46

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{a}{i} \cdot i \]
                                      7. Step-by-step derivation
                                        1. Applied rewrites14.9%

                                          \[\leadsto \frac{a}{i} \cdot i \]

                                        if 1.7999999999999999e46 < 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}{i \cdot y} \]
                                        4. Step-by-step derivation
                                          1. *-commutativeN/A

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

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

                                          \[\leadsto \color{blue}{y \cdot i} \]
                                      8. Recombined 2 regimes into one program.
                                      9. Final simplification31.7%

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.8 \cdot 10^{+46}:\\ \;\;\;\;\frac{a}{i} \cdot i\\ \mathbf{else}:\\ \;\;\;\;i \cdot y\\ \end{array} \]
                                      10. Add Preprocessing

                                      Alternative 15: 23.8% accurate, 39.0× speedup?

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

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

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

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

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

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

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

                                      Reproduce

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