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

Percentage Accurate: 99.8% → 99.8%
Time: 11.7s
Alternatives: 17
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 17 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.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. Add Preprocessing

Alternative 2: 29.9% 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 -200:\\ \;\;\;\;\frac{z}{x} \cdot x\\ \mathbf{elif}\;t\_1 \leq 10^{+307}:\\ \;\;\;\;\left(\frac{t}{a} + 1\right) \cdot a\\ \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 -200.0)
       (* (/ z x) x)
       (if (<= t_1 1e+307) (* (+ (/ t a) 1.0) a) (* 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 <= -200.0) {
		tmp = (z / x) * x;
	} else if (t_1 <= 1e+307) {
		tmp = ((t / a) + 1.0) * a;
	} 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 <= (-200.0d0)) then
        tmp = (z / x) * x
    else if (t_1 <= 1d+307) then
        tmp = ((t / a) + 1.0d0) * a
    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 <= -200.0) {
		tmp = (z / x) * x;
	} else if (t_1 <= 1e+307) {
		tmp = ((t / a) + 1.0) * a;
	} 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 <= -200.0:
		tmp = (z / x) * x
	elif t_1 <= 1e+307:
		tmp = ((t / a) + 1.0) * a
	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 <= -200.0)
		tmp = Float64(Float64(z / x) * x);
	elseif (t_1 <= 1e+307)
		tmp = Float64(Float64(Float64(t / a) + 1.0) * a);
	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 <= -200.0)
		tmp = (z / x) * x;
	elseif (t_1 <= 1e+307)
		tmp = ((t / a) + 1.0) * a;
	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, -200.0], N[(N[(z / x), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t$95$1, 1e+307], N[(N[(N[(t / a), $MachinePrecision] + 1.0), $MachinePrecision] * a), $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 -200:\\
\;\;\;\;\frac{z}{x} \cdot x\\

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

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

    1. Initial program 100.0%

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

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

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

      \[\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)) < -200

    1. Initial program 99.9%

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

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

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

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

      \[\leadsto \frac{z}{x} \cdot x \]
    7. Step-by-step derivation
      1. Applied rewrites13.5%

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

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

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\frac{t}{a} + 1\right) \cdot a \]
        4. Recombined 3 regimes into one program.
        5. Add Preprocessing

        Alternative 3: 22.9% 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 -200:\\ \;\;\;\;\frac{z}{x} \cdot x\\ \mathbf{elif}\;t\_1 \leq 10^{+307}:\\ \;\;\;\;\frac{a}{x} \cdot x\\ \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 -200.0)
               (* (/ z x) x)
               (if (<= t_1 1e+307) (* (/ a x) x) (* 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 <= -200.0) {
        		tmp = (z / x) * x;
        	} else if (t_1 <= 1e+307) {
        		tmp = (a / x) * x;
        	} 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 <= (-200.0d0)) then
                tmp = (z / x) * x
            else if (t_1 <= 1d+307) then
                tmp = (a / x) * x
            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 <= -200.0) {
        		tmp = (z / x) * x;
        	} else if (t_1 <= 1e+307) {
        		tmp = (a / x) * x;
        	} 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 <= -200.0:
        		tmp = (z / x) * x
        	elif t_1 <= 1e+307:
        		tmp = (a / x) * x
        	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 <= -200.0)
        		tmp = Float64(Float64(z / x) * x);
        	elseif (t_1 <= 1e+307)
        		tmp = Float64(Float64(a / x) * x);
        	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 <= -200.0)
        		tmp = (z / x) * x;
        	elseif (t_1 <= 1e+307)
        		tmp = (a / x) * x;
        	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, -200.0], N[(N[(z / x), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t$95$1, 1e+307], N[(N[(a / x), $MachinePrecision] * x), $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 -200:\\
        \;\;\;\;\frac{z}{x} \cdot x\\
        
        \mathbf{elif}\;t\_1 \leq 10^{+307}:\\
        \;\;\;\;\frac{a}{x} \cdot x\\
        
        \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 9.99999999999999986e306 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

          1. Initial program 100.0%

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

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

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

            \[\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)) < -200

          1. Initial program 99.9%

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

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

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

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

            \[\leadsto \frac{z}{x} \cdot x \]
          7. Step-by-step derivation
            1. Applied rewrites13.5%

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

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

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{a + \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) + a} \]
                2. lower-+.f64N/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) + a} \]
              5. Applied rewrites99.8%

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

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

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

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

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

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

                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                      1. Initial program 100.0%

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

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

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

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

                    Alternative 5: 23.6% accurate, 0.5× speedup?

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

                      1. Initial program 99.9%

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

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

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

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

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

                      1. Initial program 99.8%

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

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

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

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

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

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

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

                      Alternative 6: 77.0% accurate, 0.5× speedup?

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

                        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.f6485.5

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

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

                        1. Initial program 99.8%

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

                          \[\leadsto \color{blue}{a + \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) + a} \]
                          2. lower-+.f64N/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) + a} \]
                        5. Applied rewrites86.7%

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

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

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

                        Alternative 7: 80.3% accurate, 1.0× speedup?

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

                          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.f6498.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 rewrites98.6%

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

                          if -7.1999999999999999e149 < b < 2.5999999999999999e120

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

                            \[\leadsto \color{blue}{a + \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) + a} \]
                            2. lower-+.f64N/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) + a} \]
                          5. Applied rewrites84.9%

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

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

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

                            if 2.5999999999999999e120 < b

                            1. Initial program 99.7%

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

                              \[\leadsto \color{blue}{a + \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) + a} \]
                              2. lower-+.f64N/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) + a} \]
                            5. Applied rewrites89.6%

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

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

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

                            Alternative 8: 75.8% accurate, 1.0× speedup?

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

                              1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\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.8499999999999998e122 < z

                              1. Initial program 99.8%

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

                                \[\leadsto \color{blue}{a + \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) + a} \]
                                2. lower-+.f64N/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) + a} \]
                              5. Applied rewrites84.4%

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

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

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

                              Alternative 9: 83.8% accurate, 1.0× speedup?

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

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

                                \[\leadsto \color{blue}{a + \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) + a} \]
                                2. lower-+.f64N/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) + a} \]
                              5. Applied rewrites86.5%

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

                              Alternative 10: 77.7% accurate, 1.8× speedup?

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

                                1. Initial program 99.7%

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

                                  \[\leadsto \color{blue}{a + \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) + a} \]
                                  2. lower-+.f64N/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) + a} \]
                                5. Applied rewrites89.9%

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

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

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

                                  if -4.3000000000000002e159 < b < 2.5999999999999999e120

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

                                    \[\leadsto \color{blue}{a + \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) + a} \]
                                    2. lower-+.f64N/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) + a} \]
                                  5. Applied rewrites85.1%

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

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

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

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

                                        \[\leadsto \mathsf{fma}\left(i, y, \mathsf{fma}\left(\log y, x, 1 \cdot z\right)\right) + a \]
                                    4. Recombined 2 regimes into one program.
                                    5. Final simplification83.5%

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

                                    Alternative 11: 78.9% accurate, 1.8× speedup?

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

                                      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.f6498.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 rewrites98.6%

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

                                      if -7.1999999999999999e149 < b < 2.5999999999999999e120

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

                                        \[\leadsto \color{blue}{a + \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) + a} \]
                                        2. lower-+.f64N/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) + a} \]
                                      5. Applied rewrites84.9%

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

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

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

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

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

                                          if 2.5999999999999999e120 < b

                                          1. Initial program 99.7%

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

                                            \[\leadsto \color{blue}{a + \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) + a} \]
                                            2. lower-+.f64N/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) + a} \]
                                          5. Applied rewrites89.6%

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

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

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

                                          Alternative 12: 72.6% accurate, 1.8× speedup?

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

                                            1. Initial program 99.8%

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

                                              \[\leadsto \color{blue}{a + \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) + a} \]
                                              2. lower-+.f64N/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) + a} \]
                                            5. Applied rewrites96.6%

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

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

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

                                            if -4.20000000000000025e260 < x < 1.0800000000000001e217

                                            1. Initial program 99.8%

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

                                              \[\leadsto \color{blue}{a + \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) + a} \]
                                              2. lower-+.f64N/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) + a} \]
                                            5. Applied rewrites85.3%

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

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

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

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

                                            Alternative 13: 41.6% accurate, 2.0× speedup?

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

                                              1. Initial program 99.6%

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

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

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

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

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

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

                                              if -1e164 < b < 2.39999999999999997e184

                                              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.f6481.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 rewrites81.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 a around inf

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

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

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

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

                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{+164} \lor \neg \left(b \leq 2.4 \cdot 10^{+184}\right):\\ \;\;\;\;\log c \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{i \cdot y}{a} + 1\right) \cdot a\\ \end{array} \]
                                                6. Add Preprocessing

                                                Alternative 14: 38.3% accurate, 7.5× speedup?

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

                                                  1. Initial program 99.8%

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

                                                    \[\leadsto \color{blue}{a + \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) + a} \]
                                                    2. lower-+.f64N/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) + a} \]
                                                  5. Applied rewrites85.3%

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

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

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

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

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

                                                      if 3.6e9 < 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 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.f6483.1

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

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

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

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

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

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

                                                        Alternative 15: 41.8% accurate, 9.0× speedup?

                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 235:\\ \;\;\;\;\left(\frac{z}{a} + 1\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{z}{y} + i\right) \cdot y\\ \end{array} \end{array} \]
                                                        (FPCore (x y z t a b c i)
                                                         :precision binary64
                                                         (if (<= y 235.0) (* (+ (/ z a) 1.0) a) (* (+ (/ z y) i) y)))
                                                        double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                        	double tmp;
                                                        	if (y <= 235.0) {
                                                        		tmp = ((z / a) + 1.0) * a;
                                                        	} else {
                                                        		tmp = ((z / y) + i) * y;
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        real(8) function code(x, y, z, t, a, b, c, i)
                                                            real(8), intent (in) :: x
                                                            real(8), intent (in) :: y
                                                            real(8), intent (in) :: z
                                                            real(8), intent (in) :: t
                                                            real(8), intent (in) :: a
                                                            real(8), intent (in) :: b
                                                            real(8), intent (in) :: c
                                                            real(8), intent (in) :: i
                                                            real(8) :: tmp
                                                            if (y <= 235.0d0) then
                                                                tmp = ((z / a) + 1.0d0) * a
                                                            else
                                                                tmp = ((z / y) + i) * y
                                                            end if
                                                            code = tmp
                                                        end function
                                                        
                                                        public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                        	double tmp;
                                                        	if (y <= 235.0) {
                                                        		tmp = ((z / a) + 1.0) * a;
                                                        	} else {
                                                        		tmp = ((z / y) + i) * y;
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        def code(x, y, z, t, a, b, c, i):
                                                        	tmp = 0
                                                        	if y <= 235.0:
                                                        		tmp = ((z / a) + 1.0) * a
                                                        	else:
                                                        		tmp = ((z / y) + i) * y
                                                        	return tmp
                                                        
                                                        function code(x, y, z, t, a, b, c, i)
                                                        	tmp = 0.0
                                                        	if (y <= 235.0)
                                                        		tmp = Float64(Float64(Float64(z / a) + 1.0) * a);
                                                        	else
                                                        		tmp = Float64(Float64(Float64(z / y) + i) * y);
                                                        	end
                                                        	return tmp
                                                        end
                                                        
                                                        function tmp_2 = code(x, y, z, t, a, b, c, i)
                                                        	tmp = 0.0;
                                                        	if (y <= 235.0)
                                                        		tmp = ((z / a) + 1.0) * a;
                                                        	else
                                                        		tmp = ((z / y) + i) * y;
                                                        	end
                                                        	tmp_2 = tmp;
                                                        end
                                                        
                                                        code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 235.0], N[(N[(N[(z / a), $MachinePrecision] + 1.0), $MachinePrecision] * a), $MachinePrecision], N[(N[(N[(z / y), $MachinePrecision] + i), $MachinePrecision] * y), $MachinePrecision]]
                                                        
                                                        \begin{array}{l}
                                                        
                                                        \\
                                                        \begin{array}{l}
                                                        \mathbf{if}\;y \leq 235:\\
                                                        \;\;\;\;\left(\frac{z}{a} + 1\right) \cdot a\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;\left(\frac{z}{y} + i\right) \cdot y\\
                                                        
                                                        
                                                        \end{array}
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 2 regimes
                                                        2. if y < 235

                                                          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                                                              if 235 < y

                                                              1. Initial program 99.8%

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

                                                                \[\leadsto \color{blue}{a + \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) + a} \]
                                                                2. lower-+.f64N/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) + a} \]
                                                              5. Applied rewrites89.7%

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

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

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

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

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

                                                                Alternative 16: 41.4% accurate, 9.0× speedup?

                                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 110:\\ \;\;\;\;\left(\frac{z}{a} + 1\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{a}{y} + i\right) \cdot y\\ \end{array} \end{array} \]
                                                                (FPCore (x y z t a b c i)
                                                                 :precision binary64
                                                                 (if (<= y 110.0) (* (+ (/ z a) 1.0) a) (* (+ (/ a y) i) y)))
                                                                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                                	double tmp;
                                                                	if (y <= 110.0) {
                                                                		tmp = ((z / a) + 1.0) * a;
                                                                	} else {
                                                                		tmp = ((a / y) + i) * y;
                                                                	}
                                                                	return tmp;
                                                                }
                                                                
                                                                real(8) function code(x, y, z, t, a, b, c, i)
                                                                    real(8), intent (in) :: x
                                                                    real(8), intent (in) :: y
                                                                    real(8), intent (in) :: z
                                                                    real(8), intent (in) :: t
                                                                    real(8), intent (in) :: a
                                                                    real(8), intent (in) :: b
                                                                    real(8), intent (in) :: c
                                                                    real(8), intent (in) :: i
                                                                    real(8) :: tmp
                                                                    if (y <= 110.0d0) then
                                                                        tmp = ((z / a) + 1.0d0) * a
                                                                    else
                                                                        tmp = ((a / y) + i) * y
                                                                    end if
                                                                    code = tmp
                                                                end function
                                                                
                                                                public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                                	double tmp;
                                                                	if (y <= 110.0) {
                                                                		tmp = ((z / a) + 1.0) * a;
                                                                	} else {
                                                                		tmp = ((a / y) + i) * y;
                                                                	}
                                                                	return tmp;
                                                                }
                                                                
                                                                def code(x, y, z, t, a, b, c, i):
                                                                	tmp = 0
                                                                	if y <= 110.0:
                                                                		tmp = ((z / a) + 1.0) * a
                                                                	else:
                                                                		tmp = ((a / y) + i) * y
                                                                	return tmp
                                                                
                                                                function code(x, y, z, t, a, b, c, i)
                                                                	tmp = 0.0
                                                                	if (y <= 110.0)
                                                                		tmp = Float64(Float64(Float64(z / a) + 1.0) * a);
                                                                	else
                                                                		tmp = Float64(Float64(Float64(a / y) + i) * y);
                                                                	end
                                                                	return tmp
                                                                end
                                                                
                                                                function tmp_2 = code(x, y, z, t, a, b, c, i)
                                                                	tmp = 0.0;
                                                                	if (y <= 110.0)
                                                                		tmp = ((z / a) + 1.0) * a;
                                                                	else
                                                                		tmp = ((a / y) + i) * y;
                                                                	end
                                                                	tmp_2 = tmp;
                                                                end
                                                                
                                                                code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 110.0], N[(N[(N[(z / a), $MachinePrecision] + 1.0), $MachinePrecision] * a), $MachinePrecision], N[(N[(N[(a / y), $MachinePrecision] + i), $MachinePrecision] * y), $MachinePrecision]]
                                                                
                                                                \begin{array}{l}
                                                                
                                                                \\
                                                                \begin{array}{l}
                                                                \mathbf{if}\;y \leq 110:\\
                                                                \;\;\;\;\left(\frac{z}{a} + 1\right) \cdot a\\
                                                                
                                                                \mathbf{else}:\\
                                                                \;\;\;\;\left(\frac{a}{y} + i\right) \cdot y\\
                                                                
                                                                
                                                                \end{array}
                                                                \end{array}
                                                                
                                                                Derivation
                                                                1. Split input into 2 regimes
                                                                2. if y < 110

                                                                  1. Initial program 99.8%

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

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

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

                                                                      \[\leadsto \color{blue}{\left(a + t\right) + \left(z + \left(i \cdot y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)} \]
                                                                    3. 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.f6483.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 rewrites83.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. Taylor expanded in a around inf

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

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

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

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

                                                                      if 110 < y

                                                                      1. Initial program 99.9%

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

                                                                        \[\leadsto \color{blue}{a + \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) + a} \]
                                                                        2. lower-+.f64N/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) + a} \]
                                                                      5. Applied rewrites89.8%

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

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

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

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

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

                                                                        Alternative 17: 24.2% accurate, 39.0× speedup?

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

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

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

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

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

                                                                        Reproduce

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