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

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

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

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

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

Alternative 2: 52.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \log y \cdot x\\ t_2 := i \cdot y + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(z + t\_1\right)\right)\right)\right)\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+39}:\\ \;\;\;\;\log c \cdot b + \mathsf{fma}\left(y, i, z\right)\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+242}:\\ \;\;\;\;t\_1 + \left(a + t\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot y + \left(a + t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* (log y) x))
        (t_2 (+ (* i y) (+ (* (log c) (- b 0.5)) (+ a (+ t (+ z t_1)))))))
   (if (<= t_2 -2e+39)
     (+ (* (log c) b) (fma y i z))
     (if (<= t_2 5e+242) (+ t_1 (+ a t)) (+ (* i y) (+ a t))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = log(y) * x;
	double t_2 = (i * y) + ((log(c) * (b - 0.5)) + (a + (t + (z + t_1))));
	double tmp;
	if (t_2 <= -2e+39) {
		tmp = (log(c) * b) + fma(y, i, z);
	} else if (t_2 <= 5e+242) {
		tmp = t_1 + (a + t);
	} else {
		tmp = (i * y) + (a + t);
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(log(y) * x)
	t_2 = Float64(Float64(i * y) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(t + Float64(z + t_1)))))
	tmp = 0.0
	if (t_2 <= -2e+39)
		tmp = Float64(Float64(log(c) * b) + fma(y, i, z));
	elseif (t_2 <= 5e+242)
		tmp = Float64(t_1 + Float64(a + t));
	else
		tmp = Float64(Float64(i * y) + Float64(a + t));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(i * y), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+39], N[(N[(N[Log[c], $MachinePrecision] * b), $MachinePrecision] + N[(y * i + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+242], N[(t$95$1 + N[(a + t), $MachinePrecision]), $MachinePrecision], N[(N[(i * y), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+242}:\\
\;\;\;\;t\_1 + \left(a + t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -1.99999999999999988e39

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(y, i, z\right) + b \cdot \color{blue}{\log c} \]
    7. Step-by-step derivation
      1. Applied rewrites50.3%

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

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

      1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(t + a\right) + x \cdot \color{blue}{\log y} \]
      7. Step-by-step derivation
        1. Applied rewrites62.8%

          \[\leadsto \left(t + a\right) + \log y \cdot \color{blue}{x} \]

        if 5.0000000000000004e242 < (+.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 x around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(t + a\right) + i \cdot \color{blue}{y} \]
        7. Step-by-step derivation
          1. Applied rewrites61.0%

            \[\leadsto \left(t + a\right) + y \cdot \color{blue}{i} \]
        8. Recombined 3 regimes into one program.
        9. Final simplification56.3%

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

        Alternative 3: 42.9% accurate, 0.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \log y \cdot x\\ t_2 := i \cdot y + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(z + t\_1\right)\right)\right)\right)\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+39}:\\ \;\;\;\;\left(\frac{z}{i} + y\right) \cdot i\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+242}:\\ \;\;\;\;t\_1 + \left(a + t\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot y + \left(a + t\right)\\ \end{array} \end{array} \]
        (FPCore (x y z t a b c i)
         :precision binary64
         (let* ((t_1 (* (log y) x))
                (t_2 (+ (* i y) (+ (* (log c) (- b 0.5)) (+ a (+ t (+ z t_1)))))))
           (if (<= t_2 -2e+39)
             (* (+ (/ z i) y) i)
             (if (<= t_2 5e+242) (+ t_1 (+ a t)) (+ (* i y) (+ a t))))))
        double code(double x, double y, double z, double t, double a, double b, double c, double i) {
        	double t_1 = log(y) * x;
        	double t_2 = (i * y) + ((log(c) * (b - 0.5)) + (a + (t + (z + t_1))));
        	double tmp;
        	if (t_2 <= -2e+39) {
        		tmp = ((z / i) + y) * i;
        	} else if (t_2 <= 5e+242) {
        		tmp = t_1 + (a + t);
        	} else {
        		tmp = (i * y) + (a + t);
        	}
        	return tmp;
        }
        
        real(8) function code(x, y, z, t, a, b, c, i)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8), intent (in) :: t
            real(8), intent (in) :: a
            real(8), intent (in) :: b
            real(8), intent (in) :: c
            real(8), intent (in) :: i
            real(8) :: t_1
            real(8) :: t_2
            real(8) :: tmp
            t_1 = log(y) * x
            t_2 = (i * y) + ((log(c) * (b - 0.5d0)) + (a + (t + (z + t_1))))
            if (t_2 <= (-2d+39)) then
                tmp = ((z / i) + y) * i
            else if (t_2 <= 5d+242) then
                tmp = t_1 + (a + t)
            else
                tmp = (i * y) + (a + t)
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
        	double t_1 = Math.log(y) * x;
        	double t_2 = (i * y) + ((Math.log(c) * (b - 0.5)) + (a + (t + (z + t_1))));
        	double tmp;
        	if (t_2 <= -2e+39) {
        		tmp = ((z / i) + y) * i;
        	} else if (t_2 <= 5e+242) {
        		tmp = t_1 + (a + t);
        	} else {
        		tmp = (i * y) + (a + t);
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a, b, c, i):
        	t_1 = math.log(y) * x
        	t_2 = (i * y) + ((math.log(c) * (b - 0.5)) + (a + (t + (z + t_1))))
        	tmp = 0
        	if t_2 <= -2e+39:
        		tmp = ((z / i) + y) * i
        	elif t_2 <= 5e+242:
        		tmp = t_1 + (a + t)
        	else:
        		tmp = (i * y) + (a + t)
        	return tmp
        
        function code(x, y, z, t, a, b, c, i)
        	t_1 = Float64(log(y) * x)
        	t_2 = Float64(Float64(i * y) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(t + Float64(z + t_1)))))
        	tmp = 0.0
        	if (t_2 <= -2e+39)
        		tmp = Float64(Float64(Float64(z / i) + y) * i);
        	elseif (t_2 <= 5e+242)
        		tmp = Float64(t_1 + Float64(a + t));
        	else
        		tmp = Float64(Float64(i * y) + Float64(a + t));
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t, a, b, c, i)
        	t_1 = log(y) * x;
        	t_2 = (i * y) + ((log(c) * (b - 0.5)) + (a + (t + (z + t_1))));
        	tmp = 0.0;
        	if (t_2 <= -2e+39)
        		tmp = ((z / i) + y) * i;
        	elseif (t_2 <= 5e+242)
        		tmp = t_1 + (a + t);
        	else
        		tmp = (i * y) + (a + t);
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(i * y), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+39], N[(N[(N[(z / i), $MachinePrecision] + y), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[t$95$2, 5e+242], N[(t$95$1 + N[(a + t), $MachinePrecision]), $MachinePrecision], N[(N[(i * y), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \log y \cdot x\\
        t_2 := i \cdot y + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(z + t\_1\right)\right)\right)\right)\\
        \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+39}:\\
        \;\;\;\;\left(\frac{z}{i} + y\right) \cdot i\\
        
        \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+242}:\\
        \;\;\;\;t\_1 + \left(a + t\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;i \cdot y + \left(a + t\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -1.99999999999999988e39

          1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

            1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(t + a\right) + x \cdot \color{blue}{\log y} \]
            7. Step-by-step derivation
              1. Applied rewrites62.8%

                \[\leadsto \left(t + a\right) + \log y \cdot \color{blue}{x} \]

              if 5.0000000000000004e242 < (+.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 x around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(t + a\right) + i \cdot \color{blue}{y} \]
              7. Step-by-step derivation
                1. Applied rewrites61.0%

                  \[\leadsto \left(t + a\right) + y \cdot \color{blue}{i} \]
              8. Recombined 3 regimes into one program.
              9. Final simplification45.0%

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

              Alternative 4: 43.2% accurate, 0.4× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := i \cdot y + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(z + \log y \cdot x\right)\right)\right)\right)\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+63}:\\ \;\;\;\;\left(\frac{z}{i} + y\right) \cdot i\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+246}:\\ \;\;\;\;\log c \cdot b + \left(a + t\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot y + \left(a + t\right)\\ \end{array} \end{array} \]
              (FPCore (x y z t a b c i)
               :precision binary64
               (let* ((t_1
                       (+
                        (* i y)
                        (+ (* (log c) (- b 0.5)) (+ a (+ t (+ z (* (log y) x))))))))
                 (if (<= t_1 -2e+63)
                   (* (+ (/ z i) y) i)
                   (if (<= t_1 5e+246) (+ (* (log c) b) (+ a t)) (+ (* i y) (+ a t))))))
              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
              	double t_1 = (i * y) + ((log(c) * (b - 0.5)) + (a + (t + (z + (log(y) * x)))));
              	double tmp;
              	if (t_1 <= -2e+63) {
              		tmp = ((z / i) + y) * i;
              	} else if (t_1 <= 5e+246) {
              		tmp = (log(c) * b) + (a + t);
              	} else {
              		tmp = (i * y) + (a + t);
              	}
              	return tmp;
              }
              
              real(8) function code(x, y, z, t, a, b, c, i)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  real(8), intent (in) :: a
                  real(8), intent (in) :: b
                  real(8), intent (in) :: c
                  real(8), intent (in) :: i
                  real(8) :: t_1
                  real(8) :: tmp
                  t_1 = (i * y) + ((log(c) * (b - 0.5d0)) + (a + (t + (z + (log(y) * x)))))
                  if (t_1 <= (-2d+63)) then
                      tmp = ((z / i) + y) * i
                  else if (t_1 <= 5d+246) then
                      tmp = (log(c) * b) + (a + t)
                  else
                      tmp = (i * y) + (a + t)
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
              	double t_1 = (i * y) + ((Math.log(c) * (b - 0.5)) + (a + (t + (z + (Math.log(y) * x)))));
              	double tmp;
              	if (t_1 <= -2e+63) {
              		tmp = ((z / i) + y) * i;
              	} else if (t_1 <= 5e+246) {
              		tmp = (Math.log(c) * b) + (a + t);
              	} else {
              		tmp = (i * y) + (a + t);
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a, b, c, i):
              	t_1 = (i * y) + ((math.log(c) * (b - 0.5)) + (a + (t + (z + (math.log(y) * x)))))
              	tmp = 0
              	if t_1 <= -2e+63:
              		tmp = ((z / i) + y) * i
              	elif t_1 <= 5e+246:
              		tmp = (math.log(c) * b) + (a + t)
              	else:
              		tmp = (i * y) + (a + t)
              	return tmp
              
              function code(x, y, z, t, a, b, c, i)
              	t_1 = Float64(Float64(i * y) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(t + Float64(z + Float64(log(y) * x))))))
              	tmp = 0.0
              	if (t_1 <= -2e+63)
              		tmp = Float64(Float64(Float64(z / i) + y) * i);
              	elseif (t_1 <= 5e+246)
              		tmp = Float64(Float64(log(c) * b) + Float64(a + t));
              	else
              		tmp = Float64(Float64(i * y) + Float64(a + t));
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a, b, c, i)
              	t_1 = (i * y) + ((log(c) * (b - 0.5)) + (a + (t + (z + (log(y) * x)))));
              	tmp = 0.0;
              	if (t_1 <= -2e+63)
              		tmp = ((z / i) + y) * i;
              	elseif (t_1 <= 5e+246)
              		tmp = (log(c) * b) + (a + t);
              	else
              		tmp = (i * y) + (a + t);
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(i * y), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(z + N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+63], N[(N[(N[(z / i), $MachinePrecision] + y), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[t$95$1, 5e+246], N[(N[(N[Log[c], $MachinePrecision] * b), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision], N[(N[(i * y), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := i \cdot y + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(z + \log y \cdot x\right)\right)\right)\right)\\
              \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+63}:\\
              \;\;\;\;\left(\frac{z}{i} + y\right) \cdot i\\
              
              \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+246}:\\
              \;\;\;\;\log c \cdot b + \left(a + t\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;i \cdot y + \left(a + t\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -2.00000000000000012e63

                1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                  1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(t + a\right) + b \cdot \color{blue}{\log c} \]

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

                    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left(t + a\right) + y \cdot \color{blue}{i} \]
                    8. Recombined 3 regimes into one program.
                    9. Final simplification41.9%

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

                    Alternative 5: 37.4% accurate, 0.5× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := i \cdot y + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(z + \log y \cdot x\right)\right)\right)\right)\\ \mathbf{if}\;t\_1 \leq -9 \cdot 10^{+303}:\\ \;\;\;\;i \cdot y\\ \mathbf{elif}\;t\_1 \leq -200:\\ \;\;\;\;\frac{z}{i} \cdot i\\ \mathbf{else}:\\ \;\;\;\;i \cdot y + \left(a + t\right)\\ \end{array} \end{array} \]
                    (FPCore (x y z t a b c i)
                     :precision binary64
                     (let* ((t_1
                             (+
                              (* i y)
                              (+ (* (log c) (- b 0.5)) (+ a (+ t (+ z (* (log y) x))))))))
                       (if (<= t_1 -9e+303)
                         (* i y)
                         (if (<= t_1 -200.0) (* (/ z i) i) (+ (* i y) (+ a t))))))
                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double t_1 = (i * y) + ((log(c) * (b - 0.5)) + (a + (t + (z + (log(y) * x)))));
                    	double tmp;
                    	if (t_1 <= -9e+303) {
                    		tmp = i * y;
                    	} else if (t_1 <= -200.0) {
                    		tmp = (z / i) * i;
                    	} else {
                    		tmp = (i * y) + (a + t);
                    	}
                    	return tmp;
                    }
                    
                    real(8) function code(x, y, z, t, a, b, c, i)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8), intent (in) :: t
                        real(8), intent (in) :: a
                        real(8), intent (in) :: b
                        real(8), intent (in) :: c
                        real(8), intent (in) :: i
                        real(8) :: t_1
                        real(8) :: tmp
                        t_1 = (i * y) + ((log(c) * (b - 0.5d0)) + (a + (t + (z + (log(y) * x)))))
                        if (t_1 <= (-9d+303)) then
                            tmp = i * y
                        else if (t_1 <= (-200.0d0)) then
                            tmp = (z / i) * i
                        else
                            tmp = (i * y) + (a + t)
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double t_1 = (i * y) + ((Math.log(c) * (b - 0.5)) + (a + (t + (z + (Math.log(y) * x)))));
                    	double tmp;
                    	if (t_1 <= -9e+303) {
                    		tmp = i * y;
                    	} else if (t_1 <= -200.0) {
                    		tmp = (z / i) * i;
                    	} else {
                    		tmp = (i * y) + (a + t);
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t, a, b, c, i):
                    	t_1 = (i * y) + ((math.log(c) * (b - 0.5)) + (a + (t + (z + (math.log(y) * x)))))
                    	tmp = 0
                    	if t_1 <= -9e+303:
                    		tmp = i * y
                    	elif t_1 <= -200.0:
                    		tmp = (z / i) * i
                    	else:
                    		tmp = (i * y) + (a + t)
                    	return tmp
                    
                    function code(x, y, z, t, a, b, c, i)
                    	t_1 = Float64(Float64(i * y) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(t + Float64(z + Float64(log(y) * x))))))
                    	tmp = 0.0
                    	if (t_1 <= -9e+303)
                    		tmp = Float64(i * y);
                    	elseif (t_1 <= -200.0)
                    		tmp = Float64(Float64(z / i) * i);
                    	else
                    		tmp = Float64(Float64(i * y) + Float64(a + t));
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t, a, b, c, i)
                    	t_1 = (i * y) + ((log(c) * (b - 0.5)) + (a + (t + (z + (log(y) * x)))));
                    	tmp = 0.0;
                    	if (t_1 <= -9e+303)
                    		tmp = i * y;
                    	elseif (t_1 <= -200.0)
                    		tmp = (z / i) * i;
                    	else
                    		tmp = (i * y) + (a + t);
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(i * y), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(z + N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -9e+303], N[(i * y), $MachinePrecision], If[LessEqual[t$95$1, -200.0], N[(N[(z / i), $MachinePrecision] * i), $MachinePrecision], N[(N[(i * y), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := i \cdot y + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(z + \log y \cdot x\right)\right)\right)\right)\\
                    \mathbf{if}\;t\_1 \leq -9 \cdot 10^{+303}:\\
                    \;\;\;\;i \cdot y\\
                    
                    \mathbf{elif}\;t\_1 \leq -200:\\
                    \;\;\;\;\frac{z}{i} \cdot i\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;i \cdot y + \left(a + t\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -8.9999999999999997e303

                      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. *-commutativeN/A

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

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

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

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

                      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(t + a\right) + i \cdot \color{blue}{y} \]
                        7. Step-by-step derivation
                          1. Applied rewrites49.9%

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

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

                        Alternative 6: 41.8% accurate, 0.9× speedup?

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

                          1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

                            if 1.0000000000000001e54 < (+.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 x around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \left(t + a\right) + y \cdot \color{blue}{i} \]
                            8. Recombined 2 regimes into one program.
                            9. Final simplification38.3%

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

                            Alternative 7: 93.2% accurate, 1.0× speedup?

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

                              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if -3.09999999999999991e113 < x < 7.0000000000000001e119

                              1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 8: 89.7% accurate, 1.0× speedup?

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

                              1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if 2.1000000000000001e116 < a

                              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 9: 84.3% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 10: 89.9% accurate, 1.7× speedup?

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

                              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(y, i, z\right) + x \cdot \color{blue}{\log y} \]
                              7. Step-by-step derivation
                                1. Applied rewrites80.5%

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

                                if -1.1500000000000001e144 < x < 1.80000000000000001e119

                                1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 11: 89.9% accurate, 1.7× speedup?

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

                                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(y, i, z\right) + x \cdot \color{blue}{\log y} \]
                                7. Step-by-step derivation
                                  1. Applied rewrites80.5%

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

                                  if -1.1500000000000001e144 < x < 1.80000000000000001e119

                                  1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 12: 77.0% accurate, 1.8× speedup?

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

                                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \mathsf{fma}\left(y, i, z\right) + x \cdot \color{blue}{\log y} \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites80.5%

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

                                    if -1.1500000000000001e144 < x < 1.39999999999999993e118

                                    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 13: 52.4% accurate, 19.5× speedup?

                                    \[\begin{array}{l} \\ i \cdot y + \left(a + t\right) \end{array} \]
                                    (FPCore (x y z t a b c i) :precision binary64 (+ (* i y) (+ a t)))
                                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                    	return (i * y) + (a + t);
                                    }
                                    
                                    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) + (a + t)
                                    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) + (a + t);
                                    }
                                    
                                    def code(x, y, z, t, a, b, c, i):
                                    	return (i * y) + (a + t)
                                    
                                    function code(x, y, z, t, a, b, c, i)
                                    	return Float64(Float64(i * y) + Float64(a + t))
                                    end
                                    
                                    function tmp = code(x, y, z, t, a, b, c, i)
                                    	tmp = (i * y) + (a + t);
                                    end
                                    
                                    code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(i * y), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    i \cdot y + \left(a + t\right)
                                    \end{array}
                                    
                                    Derivation
                                    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \left(t + a\right) + i \cdot \color{blue}{y} \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites50.9%

                                        \[\leadsto \left(t + a\right) + y \cdot \color{blue}{i} \]
                                      2. Final simplification50.9%

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

                                      Alternative 14: 23.5% accurate, 39.0× speedup?

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

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

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

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

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

                                        \[\leadsto \color{blue}{y \cdot i} \]
                                      6. Final simplification20.8%

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

                                      Reproduce

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