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

Percentage Accurate: 99.8% → 99.8%
Time: 10.2s
Alternatives: 18
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);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
    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 18 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);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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

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

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

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

    \[\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. Add Preprocessing

Alternative 2: 37.5% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 10^{+124}:\\
\;\;\;\;\mathsf{fma}\left(\frac{a}{z}, z, z\right)\\

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

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


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

    1. Initial program 100.0%

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

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

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

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

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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)} \]
    6. Taylor expanded in 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 rewrites63.7%

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\frac{a}{z}, z, z\right) \]

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

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\frac{t}{a}, a, a\right) \]
          8. Recombined 3 regimes into one program.
          9. Add Preprocessing

          Alternative 3: 50.8% accurate, 0.4× speedup?

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

            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)} \]
            6. Taylor expanded in 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 rewrites68.3%

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

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

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

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

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

                  if -1e238 < (+.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.9999999999999998e297

                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      1. Initial program 100.0%

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(\frac{i \cdot y}{a}, a, a\right) \]
                      8. Recombined 3 regimes into one program.
                      9. Add Preprocessing

                      Alternative 4: 39.9% accurate, 0.4× speedup?

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

                        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if -5.00000000000000007e42 < (+.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.9999999999999998e297

                              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \color{blue}{\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)} \]
                              6. Taylor expanded in 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 rewrites68.8%

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

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

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

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

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

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

                                    1. Initial program 100.0%

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

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

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

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

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

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

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

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

                                        \[\leadsto \mathsf{fma}\left(\frac{i \cdot y}{a}, a, a\right) \]
                                    8. Recombined 3 regimes into one program.
                                    9. Add Preprocessing

                                    Alternative 5: 36.5% accurate, 0.5× speedup?

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

                                      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            1. Initial program 99.8%

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

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

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

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

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

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

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

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

                                                \[\leadsto \mathsf{fma}\left(\frac{t}{a}, a, a\right) \]

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

                                              1. Initial program 100.0%

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

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

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

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

                                            Alternative 6: 54.5% accurate, 0.7× speedup?

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

                                              1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto \mathsf{fma}\left(\log c, b - 0.5, z\right) + 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 rewrites52.5%

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

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

                                                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      Alternative 7: 61.4% accurate, 0.7× speedup?

                                                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - 0.5\right) \cdot \log c\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+184} \lor \neg \left(t\_1 \leq 4 \cdot 10^{+130}\right):\\ \;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, z\right) + a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \log c, z\right) + \mathsf{fma}\left(i, y, a\right)\\ \end{array} \end{array} \]
                                                      (FPCore (x y z t a b c i)
                                                       :precision binary64
                                                       (let* ((t_1 (* (- b 0.5) (log c))))
                                                         (if (or (<= t_1 -5e+184) (not (<= t_1 4e+130)))
                                                           (+ (fma (log c) (- b 0.5) z) a)
                                                           (+ (fma -0.5 (log c) z) (fma i y a)))))
                                                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                      	double t_1 = (b - 0.5) * log(c);
                                                      	double tmp;
                                                      	if ((t_1 <= -5e+184) || !(t_1 <= 4e+130)) {
                                                      		tmp = fma(log(c), (b - 0.5), z) + a;
                                                      	} else {
                                                      		tmp = fma(-0.5, log(c), z) + fma(i, y, a);
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      function code(x, y, z, t, a, b, c, i)
                                                      	t_1 = Float64(Float64(b - 0.5) * log(c))
                                                      	tmp = 0.0
                                                      	if ((t_1 <= -5e+184) || !(t_1 <= 4e+130))
                                                      		tmp = Float64(fma(log(c), Float64(b - 0.5), z) + a);
                                                      	else
                                                      		tmp = Float64(fma(-0.5, log(c), z) + fma(i, y, a));
                                                      	end
                                                      	return tmp
                                                      end
                                                      
                                                      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+184], N[Not[LessEqual[t$95$1, 4e+130]], $MachinePrecision]], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + a), $MachinePrecision], N[(N[(-0.5 * N[Log[c], $MachinePrecision] + z), $MachinePrecision] + N[(i * y + a), $MachinePrecision]), $MachinePrecision]]]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      t_1 := \left(b - 0.5\right) \cdot \log c\\
                                                      \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+184} \lor \neg \left(t\_1 \leq 4 \cdot 10^{+130}\right):\\
                                                      \;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, z\right) + a\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;\mathsf{fma}\left(-0.5, \log c, z\right) + \mathsf{fma}\left(i, y, a\right)\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 2 regimes
                                                      2. if (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -4.9999999999999999e184 or 4.0000000000000002e130 < (*.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. lower-+.f64N/A

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto \color{blue}{\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)} \]
                                                        6. Taylor expanded in 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 rewrites84.3%

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

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

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

                                                            if -4.9999999999999999e184 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 4.0000000000000002e130

                                                            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              Alternative 8: 63.0% accurate, 0.7× speedup?

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

                                                                1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                    if -2.0000000000000001e152 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 4.0000000000000002e130

                                                                    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                      \[\leadsto \color{blue}{\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)} \]
                                                                    6. Taylor expanded in 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 rewrites65.0%

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

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

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

                                                                        if 4.0000000000000002e130 < (*.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. lower-+.f64N/A

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

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

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

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

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

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

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

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

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

                                                                          \[\leadsto \color{blue}{\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)} \]
                                                                        6. Taylor expanded in 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 rewrites84.0%

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

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

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

                                                                          Alternative 9: 35.0% accurate, 0.9× speedup?

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

                                                                            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

                                                                                      \[\leadsto \mathsf{fma}\left(\frac{i \cdot y}{a}, a, a\right) \]
                                                                                  8. Recombined 2 regimes into one program.
                                                                                  9. Add Preprocessing

                                                                                  Alternative 10: 89.8% accurate, 1.0× speedup?

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

                                                                                    1. Initial program 99.8%

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

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

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

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

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

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

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

                                                                                      if -1.22000000000000002e79 < x < 1.3e21

                                                                                      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                    Alternative 11: 81.3% accurate, 1.0× speedup?

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

                                                                                      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 rewrites81.6%

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

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

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

                                                                                        if 4.8e11 < y

                                                                                        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                      Alternative 12: 84.2% accurate, 1.0× speedup?

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

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

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

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

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

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

                                                                                      Alternative 13: 85.6% accurate, 1.7× speedup?

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

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

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

                                                                                          \[\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. Taylor expanded in x around inf

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

                                                                                            \[\leadsto \color{blue}{\log y} \cdot x \]
                                                                                        7. Applied rewrites78.6%

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

                                                                                        if -2.39999999999999987e208 < x < 7.7999999999999998e177

                                                                                        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                        if 7.7999999999999998e177 < x

                                                                                        1. Initial program 99.8%

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

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

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

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

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

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

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

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

                                                                                            \[\leadsto \mathsf{fma}\left(\frac{\log y \cdot x}{a}, a, a\right) \]
                                                                                        8. Recombined 3 regimes into one program.
                                                                                        9. Final simplification88.1%

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

                                                                                        Alternative 14: 85.6% accurate, 1.7× speedup?

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

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

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

                                                                                            \[\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. Taylor expanded in x around inf

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

                                                                                              \[\leadsto \color{blue}{\log y} \cdot x \]
                                                                                          7. Applied rewrites78.6%

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

                                                                                          if -2.39999999999999987e208 < x < 7.7999999999999998e177

                                                                                          1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                          if 7.7999999999999998e177 < x

                                                                                          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

                                                                                                \[\leadsto \mathsf{fma}\left(x \cdot \frac{\log y}{a}, a, a\right) \]
                                                                                            3. Recombined 3 regimes into one program.
                                                                                            4. Final simplification88.1%

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

                                                                                            Alternative 15: 86.1% accurate, 1.8× speedup?

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

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

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

                                                                                                \[\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. Taylor expanded in x around inf

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

                                                                                                  \[\leadsto \color{blue}{\log y} \cdot x \]
                                                                                              7. Applied rewrites78.6%

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

                                                                                              if -2.39999999999999987e208 < x

                                                                                              1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                            Alternative 16: 71.2% accurate, 1.8× speedup?

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

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

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

                                                                                                \[\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. Taylor expanded in x around inf

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

                                                                                                  \[\leadsto \color{blue}{\log y} \cdot x \]
                                                                                              7. Applied rewrites78.6%

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

                                                                                              if -2.39999999999999987e208 < x

                                                                                              1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                              Alternative 17: 36.3% accurate, 7.8× speedup?

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

                                                                                                1. Initial program 99.8%

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

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

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

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

                                                                                                if -4.2e118 < i < 5.69999999999999998e141

                                                                                                1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{a}{z}, z, z\right) \]
                                                                                                    4. Recombined 2 regimes into one program.
                                                                                                    5. Final simplification38.4%

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

                                                                                                    Alternative 18: 24.8% 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;
                                                                                                    }
                                                                                                    
                                                                                                    module fmin_fmax_functions
                                                                                                        implicit none
                                                                                                        private
                                                                                                        public fmax
                                                                                                        public fmin
                                                                                                    
                                                                                                        interface fmax
                                                                                                            module procedure fmax88
                                                                                                            module procedure fmax44
                                                                                                            module procedure fmax84
                                                                                                            module procedure fmax48
                                                                                                        end interface
                                                                                                        interface fmin
                                                                                                            module procedure fmin88
                                                                                                            module procedure fmin44
                                                                                                            module procedure fmin84
                                                                                                            module procedure fmin48
                                                                                                        end interface
                                                                                                    contains
                                                                                                        real(8) function fmax88(x, y) result (res)
                                                                                                            real(8), intent (in) :: x
                                                                                                            real(8), intent (in) :: y
                                                                                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                        end function
                                                                                                        real(4) function fmax44(x, y) result (res)
                                                                                                            real(4), intent (in) :: x
                                                                                                            real(4), intent (in) :: y
                                                                                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                        end function
                                                                                                        real(8) function fmax84(x, y) result(res)
                                                                                                            real(8), intent (in) :: x
                                                                                                            real(4), intent (in) :: y
                                                                                                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                        end function
                                                                                                        real(8) function fmax48(x, y) result(res)
                                                                                                            real(4), intent (in) :: x
                                                                                                            real(8), intent (in) :: y
                                                                                                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                        end function
                                                                                                        real(8) function fmin88(x, y) result (res)
                                                                                                            real(8), intent (in) :: x
                                                                                                            real(8), intent (in) :: y
                                                                                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                        end function
                                                                                                        real(4) function fmin44(x, y) result (res)
                                                                                                            real(4), intent (in) :: x
                                                                                                            real(4), intent (in) :: y
                                                                                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                        end function
                                                                                                        real(8) function fmin84(x, y) result(res)
                                                                                                            real(8), intent (in) :: x
                                                                                                            real(4), intent (in) :: y
                                                                                                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                        end function
                                                                                                        real(8) function fmin48(x, y) result(res)
                                                                                                            real(4), intent (in) :: x
                                                                                                            real(8), intent (in) :: y
                                                                                                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                        end function
                                                                                                    end module
                                                                                                    
                                                                                                    real(8) function code(x, y, z, t, a, b, c, i)
                                                                                                    use fmin_fmax_functions
                                                                                                        real(8), intent (in) :: x
                                                                                                        real(8), intent (in) :: y
                                                                                                        real(8), intent (in) :: z
                                                                                                        real(8), intent (in) :: t
                                                                                                        real(8), intent (in) :: a
                                                                                                        real(8), intent (in) :: b
                                                                                                        real(8), intent (in) :: c
                                                                                                        real(8), intent (in) :: i
                                                                                                        code = i * y
                                                                                                    end function
                                                                                                    
                                                                                                    public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                                                                    	return i * y;
                                                                                                    }
                                                                                                    
                                                                                                    def code(x, y, z, t, a, b, c, i):
                                                                                                    	return i * y
                                                                                                    
                                                                                                    function code(x, y, z, t, a, b, c, i)
                                                                                                    	return Float64(i * y)
                                                                                                    end
                                                                                                    
                                                                                                    function tmp = code(x, y, z, t, a, b, c, i)
                                                                                                    	tmp = i * y;
                                                                                                    end
                                                                                                    
                                                                                                    code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(i * y), $MachinePrecision]
                                                                                                    
                                                                                                    \begin{array}{l}
                                                                                                    
                                                                                                    \\
                                                                                                    i \cdot y
                                                                                                    \end{array}
                                                                                                    
                                                                                                    Derivation
                                                                                                    1. Initial program 99.8%

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

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

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

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

                                                                                                    Reproduce

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