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

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

Alternative 2: 38.0% 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 -\infty \lor \neg \left(t\_1 \leq 2 \cdot 10^{+307}\right):\\ \;\;\;\;i \cdot y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{a}{z}, z, z\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1
         (+
          (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
          (* y i))))
   (if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+307)))
     (* i y)
     (fma (/ a z) z z))))
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 <= -((double) INFINITY)) || !(t_1 <= 2e+307)) {
		tmp = i * y;
	} else {
		tmp = fma((a / z), z, z);
	}
	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 <= Float64(-Inf)) || !(t_1 <= 2e+307))
		tmp = Float64(i * y);
	else
		tmp = fma(Float64(a / z), z, z);
	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[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+307]], $MachinePrecision]], N[(i * y), $MachinePrecision], N[(N[(a / z), $MachinePrecision] * z + z), $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 -\infty \lor \neg \left(t\_1 \leq 2 \cdot 10^{+307}\right):\\
\;\;\;\;i \cdot y\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{a}{z}, z, z\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -inf.0 or 1.99999999999999997e307 < (+.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-*.f6489.9

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

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

    if -inf.0 < (+.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.99999999999999997e307

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{a}{z}, z, z\right) \]
    8. Recombined 2 regimes into one program.
    9. Final simplification40.1%

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

    Alternative 3: 40.4% accurate, 0.9× speedup?

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

      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

        1. Initial program 99.8%

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

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

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

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

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

          Alternative 4: 95.2% accurate, 1.0× speedup?

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

            1. Initial program 99.6%

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

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

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

            if -1.2999999999999999e170 < x < 3.2999999999999998e77

            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.f6497.9

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.3 \cdot 10^{+170} \lor \neg \left(x \leq 3.3 \cdot 10^{+77}\right):\\ \;\;\;\;\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}:\\ \;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)\\ \end{array} \]
          5. Add Preprocessing

          Alternative 5: 89.6% accurate, 1.0× speedup?

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

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

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

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

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

                if -1.3500000000000001e170 < x < 2.6000000000000001e84

                1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 2.6000000000000001e84 < x

                1. Initial program 99.6%

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

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

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

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

                Alternative 6: 89.6% accurate, 1.0× speedup?

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

                  1. Initial program 99.6%

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

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

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

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

                      if -1.3500000000000001e170 < x < 2.6000000000000001e84

                      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 7: 89.4% accurate, 1.0× speedup?

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

                      1. Initial program 99.5%

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

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

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

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

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

                          if -1.1000000000000001e267 < x < 1.70000000000000001e168

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

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

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

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

                        Alternative 8: 84.5% 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.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. Add Preprocessing

                        Alternative 9: 88.0% accurate, 1.7× speedup?

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

                          1. Initial program 99.4%

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

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

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

                          if -1.1000000000000001e267 < x < 7.7999999999999995e178

                          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.f6493.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 rewrites93.3%

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

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

                        Alternative 10: 73.4% accurate, 1.8× speedup?

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

                          1. Initial program 99.4%

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

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

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

                          if -1.1000000000000001e267 < x < 7.7999999999999995e178

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

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

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

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

                          Alternative 11: 73.4% accurate, 1.8× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.1 \cdot 10^{+267} \lor \neg \left(x \leq 7.8 \cdot 10^{+178}\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 -1.1e+267) (not (<= x 7.8e+178)))
                             (* (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 <= -1.1e+267) || !(x <= 7.8e+178)) {
                          		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 <= -1.1e+267) || !(x <= 7.8e+178))
                          		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, -1.1e+267], N[Not[LessEqual[x, 7.8e+178]], $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 -1.1 \cdot 10^{+267} \lor \neg \left(x \leq 7.8 \cdot 10^{+178}\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 < -1.1000000000000001e267 or 7.7999999999999995e178 < x

                            1. Initial program 99.4%

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

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

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

                            if -1.1000000000000001e267 < x < 7.7999999999999995e178

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

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.1 \cdot 10^{+267} \lor \neg \left(x \leq 7.8 \cdot 10^{+178}\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 12: 60.8% accurate, 1.9× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;i \leq -4.8 \cdot 10^{+83} \lor \neg \left(i \leq 9 \cdot 10^{-31}\right):\\ \;\;\;\;\left(\frac{z}{i} + y\right) \cdot i + a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, z\right) + a\\ \end{array} \end{array} \]
                            (FPCore (x y z t a b c i)
                             :precision binary64
                             (if (or (<= i -4.8e+83) (not (<= i 9e-31)))
                               (+ (* (+ (/ z i) y) i) a)
                               (+ (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 ((i <= -4.8e+83) || !(i <= 9e-31)) {
                            		tmp = (((z / i) + y) * i) + a;
                            	} else {
                            		tmp = fma(log(c), (b - 0.5), z) + a;
                            	}
                            	return tmp;
                            }
                            
                            function code(x, y, z, t, a, b, c, i)
                            	tmp = 0.0
                            	if ((i <= -4.8e+83) || !(i <= 9e-31))
                            		tmp = Float64(Float64(Float64(Float64(z / i) + y) * i) + a);
                            	else
                            		tmp = Float64(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[i, -4.8e+83], N[Not[LessEqual[i, 9e-31]], $MachinePrecision]], N[(N[(N[(N[(z / i), $MachinePrecision] + y), $MachinePrecision] * i), $MachinePrecision] + a), $MachinePrecision], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + a), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;i \leq -4.8 \cdot 10^{+83} \lor \neg \left(i \leq 9 \cdot 10^{-31}\right):\\
                            \;\;\;\;\left(\frac{z}{i} + y\right) \cdot i + a\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, z\right) + a\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if i < -4.79999999999999982e83 or 9.0000000000000008e-31 < 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 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 rewrites88.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 i around inf

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

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

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

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

                                  if -4.79999999999999982e83 < i < 9.0000000000000008e-31

                                  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 rewrites82.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 y around 0

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

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

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

                                        \[\leadsto \mathsf{fma}\left(\log c, b - 0.5, z\right) + a \]
                                    4. Recombined 2 regimes into one program.
                                    5. Final simplification63.9%

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -4.8 \cdot 10^{+83} \lor \neg \left(i \leq 9 \cdot 10^{-31}\right):\\ \;\;\;\;\left(\frac{z}{i} + y\right) \cdot i + a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, z\right) + a\\ \end{array} \]
                                    6. Add Preprocessing

                                    Alternative 13: 59.5% accurate, 1.9× speedup?

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

                                      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 rewrites97.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 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 rewrites85.3%

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

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

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

                                          if -1.99999999999999993e118 < 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 rewrites82.2%

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

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

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

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

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

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

                                              Alternative 14: 61.3% accurate, 1.9× speedup?

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

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

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

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

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

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

                                                    if 1.30000000000000007e46 < 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 rewrites85.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 rewrites75.7%

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

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

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

                                                      Alternative 15: 48.9% accurate, 6.7× speedup?

                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;i \leq -1.45 \cdot 10^{-48} \lor \neg \left(i \leq 1.55 \cdot 10^{-40}\right):\\ \;\;\;\;\left(\frac{z}{i} + y\right) \cdot i + a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{a}{z}, z, z\right)\\ \end{array} \end{array} \]
                                                      (FPCore (x y z t a b c i)
                                                       :precision binary64
                                                       (if (or (<= i -1.45e-48) (not (<= i 1.55e-40)))
                                                         (+ (* (+ (/ z i) y) i) a)
                                                         (fma (/ a z) z z)))
                                                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                      	double tmp;
                                                      	if ((i <= -1.45e-48) || !(i <= 1.55e-40)) {
                                                      		tmp = (((z / i) + y) * i) + a;
                                                      	} else {
                                                      		tmp = fma((a / z), z, z);
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      function code(x, y, z, t, a, b, c, i)
                                                      	tmp = 0.0
                                                      	if ((i <= -1.45e-48) || !(i <= 1.55e-40))
                                                      		tmp = Float64(Float64(Float64(Float64(z / i) + y) * i) + a);
                                                      	else
                                                      		tmp = fma(Float64(a / z), z, z);
                                                      	end
                                                      	return tmp
                                                      end
                                                      
                                                      code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -1.45e-48], N[Not[LessEqual[i, 1.55e-40]], $MachinePrecision]], N[(N[(N[(N[(z / i), $MachinePrecision] + y), $MachinePrecision] * i), $MachinePrecision] + a), $MachinePrecision], N[(N[(a / z), $MachinePrecision] * z + z), $MachinePrecision]]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      \mathbf{if}\;i \leq -1.45 \cdot 10^{-48} \lor \neg \left(i \leq 1.55 \cdot 10^{-40}\right):\\
                                                      \;\;\;\;\left(\frac{z}{i} + y\right) \cdot i + a\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;\mathsf{fma}\left(\frac{a}{z}, z, z\right)\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 2 regimes
                                                      2. if i < -1.4500000000000001e-48 or 1.55000000000000005e-40 < 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 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.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 i around inf

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

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

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

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

                                                            if -1.4500000000000001e-48 < i < 1.55000000000000005e-40

                                                            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                                                            Alternative 16: 24.4% accurate, 39.0× speedup?

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

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

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

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

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

                                                            Reproduce

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