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

Percentage Accurate: 99.8% → 99.8%
Time: 11.6s
Alternatives: 20
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 20 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} \\ \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}
Derivation
  1. Initial program 99.5%

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

Alternative 2: 22.3% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -100:\\
\;\;\;\;\frac{z}{i} \cdot i\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+307}:\\
\;\;\;\;\frac{a}{i} \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -2.00000000000000003e306 or 5e307 < (+.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 97.3%

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

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

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

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

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

    1. Initial program 99.8%

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

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

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

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

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

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

        \[\leadsto \left(y + \color{blue}{\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 \]
      6. 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 rewrites64.6%

      \[\leadsto \color{blue}{\left(\frac{\left(\mathsf{fma}\left(\log y, x, \mathsf{fma}\left(b - 0.5, \log c, z\right)\right) + t\right) + a}{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.5%

        \[\leadsto \frac{z}{i} \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)) < 5e307

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

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

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

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

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

          \[\leadsto \left(y + \color{blue}{\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 \]
        6. 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.5%

        \[\leadsto \color{blue}{\left(\frac{\left(\mathsf{fma}\left(\log y, x, \mathsf{fma}\left(b - 0.5, \log c, z\right)\right) + t\right) + a}{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 rewrites11.9%

          \[\leadsto \frac{a}{i} \cdot i \]
      8. Recombined 3 regimes into one program.
      9. Add Preprocessing

      Alternative 3: 22.3% accurate, 0.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;t\_1 \leq 5 \cdot 10^{+26} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+307}\right):\\ \;\;\;\;i \cdot y\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{i} \cdot i\\ \end{array} \end{array} \]
      (FPCore (x y z t a b c i)
       :precision binary64
       (let* ((t_1
               (+
                (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
                (* y i))))
         (if (or (<= t_1 5e+26) (not (<= t_1 5e+307))) (* i y) (* (/ a i) i))))
      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
      	double t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
      	double tmp;
      	if ((t_1 <= 5e+26) || !(t_1 <= 5e+307)) {
      		tmp = i * y;
      	} else {
      		tmp = (a / i) * 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 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
          if ((t_1 <= 5d+26) .or. (.not. (t_1 <= 5d+307))) then
              tmp = i * y
          else
              tmp = (a / i) * 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 = (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
      	double tmp;
      	if ((t_1 <= 5e+26) || !(t_1 <= 5e+307)) {
      		tmp = i * y;
      	} else {
      		tmp = (a / i) * i;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b, c, i):
      	t_1 = (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
      	tmp = 0
      	if (t_1 <= 5e+26) or not (t_1 <= 5e+307):
      		tmp = i * y
      	else:
      		tmp = (a / i) * i
      	return tmp
      
      function code(x, y, z, t, a, b, c, i)
      	t_1 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
      	tmp = 0.0
      	if ((t_1 <= 5e+26) || !(t_1 <= 5e+307))
      		tmp = Float64(i * y);
      	else
      		tmp = Float64(Float64(a / i) * i);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b, c, i)
      	t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
      	tmp = 0.0;
      	if ((t_1 <= 5e+26) || ~((t_1 <= 5e+307)))
      		tmp = i * y;
      	else
      		tmp = (a / i) * i;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, 5e+26], N[Not[LessEqual[t$95$1, 5e+307]], $MachinePrecision]], N[(i * y), $MachinePrecision], N[(N[(a / i), $MachinePrecision] * i), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
      \mathbf{if}\;t\_1 \leq 5 \cdot 10^{+26} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+307}\right):\\
      \;\;\;\;i \cdot y\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{a}{i} \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)) < 5.0000000000000001e26 or 5e307 < (+.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.2%

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

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

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

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

        if 5.0000000000000001e26 < (+.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)) < 5e307

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

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

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

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

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

            \[\leadsto \left(y + \color{blue}{\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 \]
          6. 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 rewrites64.8%

          \[\leadsto \color{blue}{\left(\frac{\left(\mathsf{fma}\left(\log y, x, \mathsf{fma}\left(b - 0.5, \log c, z\right)\right) + t\right) + a}{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 rewrites12.3%

            \[\leadsto \frac{a}{i} \cdot i \]
        8. Recombined 2 regimes into one program.
        9. Final simplification22.2%

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

        Alternative 4: 83.9% accurate, 0.5× speedup?

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

          1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -4.9999999999999996e22 < (+.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.2%

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

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

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

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

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

        Alternative 5: 87.8% accurate, 1.0× speedup?

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

          1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 2.05e135 < a

          1. Initial program 99.9%

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(i, y, \mathsf{fma}\left(\log y, x, \mathsf{fma}\left(-0.5, \log c, t\right)\right)\right) + a \]
          8. Recombined 2 regimes into one program.
          9. Add Preprocessing

          Alternative 6: 91.5% accurate, 1.0× speedup?

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

            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 4.7000000000000002e29 < y

              1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 7: 87.6% accurate, 1.0× speedup?

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

              1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 9.00000000000000029e208 < x

                1. Initial program 99.7%

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

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

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

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

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

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

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

                Alternative 8: 87.1% accurate, 1.1× speedup?

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

                  1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 9.00000000000000029e208 < x

                    1. Initial program 99.7%

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(-0.5, \log c, \mathsf{fma}\left(\log y, x, t\right)\right) + a \]
                      4. Recombined 2 regimes into one program.
                      5. Add Preprocessing

                      Alternative 9: 70.1% accurate, 1.1× speedup?

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

                        1. Initial program 99.3%

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

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

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

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

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

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

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

                        1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \left(\left(1 \cdot z + t\right) + a\right) + y \cdot i \]
                          4. Recombined 2 regimes into one program.
                          5. Add Preprocessing

                          Alternative 10: 86.3% accurate, 1.8× speedup?

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

                            1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if 1.5e212 < x

                              1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \color{blue}{x \cdot \log y} \]
                              7. 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.f6463.9

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

                                \[\leadsto \color{blue}{\log y \cdot x} \]
                            7. Recombined 2 regimes into one program.
                            8. Add Preprocessing

                            Alternative 11: 86.3% accurate, 1.8× speedup?

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

                              1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if 1.5e212 < x

                              1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \color{blue}{x \cdot \log y} \]
                              7. 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.f6463.9

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

                                \[\leadsto \color{blue}{\log y \cdot x} \]
                            3. Recombined 2 regimes into one program.
                            4. Add Preprocessing

                            Alternative 12: 71.3% accurate, 1.8× speedup?

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

                              1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if 1.5e212 < x

                                1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \color{blue}{x \cdot \log y} \]
                                7. 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.f6463.9

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

                                  \[\leadsto \color{blue}{\log y \cdot x} \]
                              8. Recombined 2 regimes into one program.
                              9. Final simplification72.1%

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

                              Alternative 13: 71.3% accurate, 1.9× speedup?

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

                                1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if 1.5e212 < x

                                    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \color{blue}{x \cdot \log y} \]
                                    7. 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.f6463.9

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

                                      \[\leadsto \color{blue}{\log y \cdot x} \]
                                  4. Recombined 2 regimes into one program.
                                  5. Add Preprocessing

                                  Alternative 14: 61.4% accurate, 1.9× speedup?

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

                                    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        if -1.34999999999999992e85 < z

                                        1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right) + a \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites54.9%

                                                \[\leadsto \mathsf{fma}\left(\log c, b - 0.5, i \cdot y\right) + a \]
                                            4. Recombined 2 regimes into one program.
                                            5. Add Preprocessing

                                            Alternative 15: 76.1% accurate, 1.9× speedup?

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

                                              1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \color{blue}{\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)} \]
                                              6. Step-by-step derivation
                                                1. Applied rewrites80.6%

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

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

                                                    \[\leadsto \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + \color{blue}{a} \]
                                                  2. Step-by-step derivation
                                                    1. Applied rewrites77.4%

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

                                                    if 5.50000000000000002e31 < y

                                                    1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto \left(\left(1 \cdot z + t\right) + a\right) + y \cdot i \]
                                                      4. Recombined 2 regimes into one program.
                                                      5. Add Preprocessing

                                                      Alternative 16: 76.1% accurate, 1.9× speedup?

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

                                                        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto \color{blue}{\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)} \]
                                                        6. Step-by-step derivation
                                                          1. Applied rewrites80.6%

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

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

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

                                                            if 5.50000000000000002e31 < y

                                                            1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  \[\leadsto \left(\left(1 \cdot z + t\right) + a\right) + y \cdot i \]
                                                              4. Recombined 2 regimes into one program.
                                                              5. Add Preprocessing

                                                              Alternative 17: 66.0% accurate, 2.0× speedup?

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

                                                                1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  \[\leadsto \color{blue}{\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)} \]
                                                                6. Step-by-step derivation
                                                                  1. Applied rewrites80.6%

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

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

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

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

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

                                                                      if 5.50000000000000002e31 < y

                                                                      1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                            \[\leadsto \left(\left(1 \cdot z + t\right) + a\right) + y \cdot i \]
                                                                        4. Recombined 2 regimes into one program.
                                                                        5. Add Preprocessing

                                                                        Alternative 18: 70.6% accurate, 2.1× speedup?

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

                                                                          1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                              if 7.40000000000000019e211 < x

                                                                              1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                \[\leadsto \color{blue}{x \cdot \log y} \]
                                                                              7. 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.f6463.9

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

                                                                                \[\leadsto \color{blue}{\log y \cdot x} \]
                                                                            4. Recombined 2 regimes into one program.
                                                                            5. Add Preprocessing

                                                                            Alternative 19: 68.4% accurate, 11.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                Alternative 20: 23.5% 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.5%

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

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

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

                                                                                  \[\leadsto \color{blue}{i \cdot y} \]
                                                                                6. Add Preprocessing

                                                                                Reproduce

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