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

Percentage Accurate: 99.8% → 99.8%
Time: 13.4s
Alternatives: 16
Speedup: 1.0×

Specification

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

\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 16 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 99.8% accurate, 1.0× speedup?

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

\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 58.5% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 10^{+306}:\\
\;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, z\right) + a\\

\mathbf{else}:\\
\;\;\;\;t\_3\\


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

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

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

        \[\leadsto \color{blue}{\log y \cdot x} + y \cdot i \]
      3. lower-log.f6497.4

        \[\leadsto \color{blue}{\log y} \cdot x + y \cdot i \]
    5. Applied rewrites97.4%

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

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

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

        \[\leadsto \color{blue}{y \cdot i} + \log y \cdot x \]
      4. lower-fma.f6497.4

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \log y \cdot x\right)} \]
    7. Applied rewrites97.4%

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

    if -4.9999999999999997e304 < (+.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.00000000000000002e306

    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.f6487.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 rewrites87.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 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 rewrites69.9%

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

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

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

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

      Alternative 3: 59.6% accurate, 0.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \log c + \left(a + t\right)\\ t_2 := \left(b - 0.5\right) \cdot \log c\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+91}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 10^{+81}:\\ \;\;\;\;i \cdot y + \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 (+ (* b (log c)) (+ a t))) (t_2 (* (- b 0.5) (log c))))
         (if (<= t_2 -2e+91) t_1 (if (<= t_2 1e+81) (+ (* i y) (+ 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 = (b * log(c)) + (a + t);
      	double t_2 = (b - 0.5) * log(c);
      	double tmp;
      	if (t_2 <= -2e+91) {
      		tmp = t_1;
      	} else if (t_2 <= 1e+81) {
      		tmp = (i * y) + (a + t);
      	} else {
      		tmp = t_1;
      	}
      	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 = (b * log(c)) + (a + t)
          t_2 = (b - 0.5d0) * log(c)
          if (t_2 <= (-2d+91)) then
              tmp = t_1
          else if (t_2 <= 1d+81) then
              tmp = (i * y) + (a + t)
          else
              tmp = t_1
          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 = (b * Math.log(c)) + (a + t);
      	double t_2 = (b - 0.5) * Math.log(c);
      	double tmp;
      	if (t_2 <= -2e+91) {
      		tmp = t_1;
      	} else if (t_2 <= 1e+81) {
      		tmp = (i * y) + (a + t);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b, c, i):
      	t_1 = (b * math.log(c)) + (a + t)
      	t_2 = (b - 0.5) * math.log(c)
      	tmp = 0
      	if t_2 <= -2e+91:
      		tmp = t_1
      	elif t_2 <= 1e+81:
      		tmp = (i * y) + (a + t)
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a, b, c, i)
      	t_1 = Float64(Float64(b * log(c)) + Float64(a + t))
      	t_2 = Float64(Float64(b - 0.5) * log(c))
      	tmp = 0.0
      	if (t_2 <= -2e+91)
      		tmp = t_1;
      	elseif (t_2 <= 1e+81)
      		tmp = Float64(Float64(i * y) + Float64(a + t));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b, c, i)
      	t_1 = (b * log(c)) + (a + t);
      	t_2 = (b - 0.5) * log(c);
      	tmp = 0.0;
      	if (t_2 <= -2e+91)
      		tmp = t_1;
      	elseif (t_2 <= 1e+81)
      		tmp = (i * y) + (a + t);
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+91], t$95$1, If[LessEqual[t$95$2, 1e+81], N[(N[(i * y), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := b \cdot \log c + \left(a + t\right)\\
      t_2 := \left(b - 0.5\right) \cdot \log c\\
      \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+91}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t\_2 \leq 10^{+81}:\\
      \;\;\;\;i \cdot y + \left(a + t\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -2.00000000000000016e91 or 9.99999999999999921e80 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))

        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.f6486.4

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

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

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

          if -2.00000000000000016e91 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 9.99999999999999921e80

          1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 4: 57.1% accurate, 0.7× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \log c + a\\ t_2 := \left(b - 0.5\right) \cdot \log c\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+91}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+138}:\\ \;\;\;\;i \cdot y + \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 (+ (* b (log c)) a)) (t_2 (* (- b 0.5) (log c))))
             (if (<= t_2 -2e+91) t_1 (if (<= t_2 5e+138) (+ (* i y) (+ 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 = (b * log(c)) + a;
          	double t_2 = (b - 0.5) * log(c);
          	double tmp;
          	if (t_2 <= -2e+91) {
          		tmp = t_1;
          	} else if (t_2 <= 5e+138) {
          		tmp = (i * y) + (a + t);
          	} else {
          		tmp = t_1;
          	}
          	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 = (b * log(c)) + a
              t_2 = (b - 0.5d0) * log(c)
              if (t_2 <= (-2d+91)) then
                  tmp = t_1
              else if (t_2 <= 5d+138) then
                  tmp = (i * y) + (a + t)
              else
                  tmp = t_1
              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 = (b * Math.log(c)) + a;
          	double t_2 = (b - 0.5) * Math.log(c);
          	double tmp;
          	if (t_2 <= -2e+91) {
          		tmp = t_1;
          	} else if (t_2 <= 5e+138) {
          		tmp = (i * y) + (a + t);
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b, c, i):
          	t_1 = (b * math.log(c)) + a
          	t_2 = (b - 0.5) * math.log(c)
          	tmp = 0
          	if t_2 <= -2e+91:
          		tmp = t_1
          	elif t_2 <= 5e+138:
          		tmp = (i * y) + (a + t)
          	else:
          		tmp = t_1
          	return tmp
          
          function code(x, y, z, t, a, b, c, i)
          	t_1 = Float64(Float64(b * log(c)) + a)
          	t_2 = Float64(Float64(b - 0.5) * log(c))
          	tmp = 0.0
          	if (t_2 <= -2e+91)
          		tmp = t_1;
          	elseif (t_2 <= 5e+138)
          		tmp = Float64(Float64(i * y) + Float64(a + t));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a, b, c, i)
          	t_1 = (b * log(c)) + a;
          	t_2 = (b - 0.5) * log(c);
          	tmp = 0.0;
          	if (t_2 <= -2e+91)
          		tmp = t_1;
          	elseif (t_2 <= 5e+138)
          		tmp = (i * y) + (a + t);
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+91], t$95$1, If[LessEqual[t$95$2, 5e+138], N[(N[(i * y), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := b \cdot \log c + a\\
          t_2 := \left(b - 0.5\right) \cdot \log c\\
          \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+91}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+138}:\\
          \;\;\;\;i \cdot y + \left(a + t\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -2.00000000000000016e91 or 5.00000000000000016e138 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))

            1. Initial program 99.6%

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

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

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

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

                \[\leadsto b \cdot \log c + a \]
              3. Step-by-step derivation
                1. Applied rewrites60.9%

                  \[\leadsto b \cdot \log c + a \]

                if -2.00000000000000016e91 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 5.00000000000000016e138

                1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 5: 56.1% accurate, 0.7× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \log c\\ t_2 := \left(b - 0.5\right) \cdot \log c\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+151}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 10^{+150}:\\ \;\;\;\;i \cdot y + \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 (* b (log c))) (t_2 (* (- b 0.5) (log c))))
                   (if (<= t_2 -1e+151) t_1 (if (<= t_2 1e+150) (+ (* i y) (+ 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 = b * log(c);
                	double t_2 = (b - 0.5) * log(c);
                	double tmp;
                	if (t_2 <= -1e+151) {
                		tmp = t_1;
                	} else if (t_2 <= 1e+150) {
                		tmp = (i * y) + (a + t);
                	} else {
                		tmp = t_1;
                	}
                	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 = b * log(c)
                    t_2 = (b - 0.5d0) * log(c)
                    if (t_2 <= (-1d+151)) then
                        tmp = t_1
                    else if (t_2 <= 1d+150) then
                        tmp = (i * y) + (a + t)
                    else
                        tmp = t_1
                    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 = b * Math.log(c);
                	double t_2 = (b - 0.5) * Math.log(c);
                	double tmp;
                	if (t_2 <= -1e+151) {
                		tmp = t_1;
                	} else if (t_2 <= 1e+150) {
                		tmp = (i * y) + (a + t);
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t, a, b, c, i):
                	t_1 = b * math.log(c)
                	t_2 = (b - 0.5) * math.log(c)
                	tmp = 0
                	if t_2 <= -1e+151:
                		tmp = t_1
                	elif t_2 <= 1e+150:
                		tmp = (i * y) + (a + t)
                	else:
                		tmp = t_1
                	return tmp
                
                function code(x, y, z, t, a, b, c, i)
                	t_1 = Float64(b * log(c))
                	t_2 = Float64(Float64(b - 0.5) * log(c))
                	tmp = 0.0
                	if (t_2 <= -1e+151)
                		tmp = t_1;
                	elseif (t_2 <= 1e+150)
                		tmp = Float64(Float64(i * y) + Float64(a + t));
                	else
                		tmp = t_1;
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t, a, b, c, i)
                	t_1 = b * log(c);
                	t_2 = (b - 0.5) * log(c);
                	tmp = 0.0;
                	if (t_2 <= -1e+151)
                		tmp = t_1;
                	elseif (t_2 <= 1e+150)
                		tmp = (i * y) + (a + t);
                	else
                		tmp = t_1;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+151], t$95$1, If[LessEqual[t$95$2, 1e+150], N[(N[(i * y), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := b \cdot \log c\\
                t_2 := \left(b - 0.5\right) \cdot \log c\\
                \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+151}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;t\_2 \leq 10^{+150}:\\
                \;\;\;\;i \cdot y + \left(a + t\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -1.00000000000000002e151 or 9.99999999999999981e149 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))

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

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

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

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

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

                  if -1.00000000000000002e151 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 9.99999999999999981e149

                  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.f6487.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 rewrites87.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 rewrites66.6%

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

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

                  Alternative 6: 90.2% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if -8.50000000000000091e211 < x < 1.06e217

                      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.f6496.1

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

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

                      if 1.06e217 < x

                      1. Initial program 99.5%

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

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

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

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

                    Alternative 7: 84.5% accurate, 1.0× speedup?

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

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

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

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

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

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

                    Alternative 8: 89.2% accurate, 1.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -8.50000000000000091e211 < x < 1.59999999999999989e226

                        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.f6496.1

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

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

                        if 1.59999999999999989e226 < x

                        1. Initial program 99.4%

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

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

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

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

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

                        Alternative 9: 74.9% accurate, 1.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if -8.50000000000000091e211 < x < 1.59999999999999989e226

                            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.f6496.1

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

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

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

                              if 1.59999999999999989e226 < x

                              1. Initial program 99.4%

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

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

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

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

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

                              Alternative 10: 74.5% accurate, 1.8× speedup?

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

                                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 inf

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

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

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

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

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

                                if -2.7999999999999999e213 < x < 1.59999999999999989e226

                                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.f6496.1

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

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

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

                                  if 1.59999999999999989e226 < x

                                  1. Initial program 99.4%

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

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

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

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

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

                                  Alternative 11: 58.3% accurate, 1.9× speedup?

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

                                    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.f6487.6

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

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

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

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

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

                                        if 4.5000000000000002e172 < a

                                        1. Initial program 99.9%

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

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

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

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

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

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

                                        Alternative 12: 43.4% accurate, 2.0× speedup?

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

                                          1. Initial program 99.8%

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

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

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

                                              \[\leadsto \color{blue}{\log y \cdot x} + y \cdot i \]
                                            3. lower-log.f6437.2

                                              \[\leadsto \color{blue}{\log y} \cdot x + y \cdot i \]
                                          5. Applied rewrites37.2%

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

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

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

                                              \[\leadsto \color{blue}{y \cdot i} + \log y \cdot x \]
                                            4. lower-fma.f6437.2

                                              \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \log y \cdot x\right)} \]
                                          7. Applied rewrites37.2%

                                            \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, x \cdot \log y\right)} \]
                                          8. Taylor expanded in b around inf

                                            \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{b \cdot \log c}\right) \]
                                          9. Step-by-step derivation
                                            1. lower-*.f64N/A

                                              \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{b \cdot \log c}\right) \]
                                            2. lower-log.f6445.5

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

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

                                          if 2.40000000000000015e154 < a

                                          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.f6489.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 rewrites89.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 rewrites81.4%

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

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

                                          Alternative 13: 53.4% accurate, 10.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              if -3.60000000000000003e211 < z

                                              1. Initial program 99.8%

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

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

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

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

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

                                              Alternative 14: 52.7% 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.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.f6487.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 rewrites87.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 rewrites55.5%

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

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

                                                Alternative 15: 38.3% accurate, 26.0× speedup?

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

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

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

                                                    \[\leadsto i \cdot y + a \]
                                                  3. Step-by-step derivation
                                                    1. Applied rewrites40.8%

                                                      \[\leadsto y \cdot i + a \]
                                                    2. Final simplification40.8%

                                                      \[\leadsto i \cdot y + a \]
                                                    3. Add Preprocessing

                                                    Alternative 16: 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.8%

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

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

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

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

                                                      \[\leadsto \color{blue}{y \cdot i} \]
                                                    6. Final simplification25.9%

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

                                                    Reproduce

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