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

Percentage Accurate: 99.8% → 99.9%
Time: 8.5s
Alternatives: 13
Speedup: 1.1×

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}

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 13 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.9% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.8% accurate, 1.1× speedup?

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(y, i, \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) \]
    6. lift-+.f64N/A

      \[\leadsto \mathsf{fma}\left(y, i, \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) \]
    7. associate-+l+N/A

      \[\leadsto \mathsf{fma}\left(y, i, \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) \]
    8. lift-+.f64N/A

      \[\leadsto \mathsf{fma}\left(y, i, \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) \]
    9. +-commutativeN/A

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

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

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

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

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

Alternative 3: 91.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - 0.5\right) \cdot \log c\\ t_2 := x \cdot \log y\\ \mathbf{if}\;\left(\left(\left(\left(t\_2 + z\right) + t\right) + a\right) + t\_1\right) + y \cdot i \leq -120:\\ \;\;\;\;t + \left(z + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(t + t\_2\right) + a\right) + t\_1\right) + y \cdot i\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* (- b 0.5) (log c))) (t_2 (* x (log y))))
   (if (<= (+ (+ (+ (+ (+ t_2 z) t) a) t_1) (* y i)) -120.0)
     (+ t (+ z (fma i y (fma x (log y) (* (log c) (- b 0.5))))))
     (+ (+ (+ (+ t t_2) a) t_1) (* y i)))))
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 t_2 = x * log(y);
	double tmp;
	if ((((((t_2 + z) + t) + a) + t_1) + (y * i)) <= -120.0) {
		tmp = t + (z + fma(i, y, fma(x, log(y), (log(c) * (b - 0.5)))));
	} else {
		tmp = (((t + t_2) + a) + t_1) + (y * i);
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(b - 0.5) * log(c))
	t_2 = Float64(x * log(y))
	tmp = 0.0
	if (Float64(Float64(Float64(Float64(Float64(t_2 + z) + t) + a) + t_1) + Float64(y * i)) <= -120.0)
		tmp = Float64(t + Float64(z + fma(i, y, fma(x, log(y), Float64(log(c) * Float64(b - 0.5))))));
	else
		tmp = Float64(Float64(Float64(Float64(t + t_2) + a) + t_1) + Float64(y * i));
	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]}, Block[{t$95$2 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(t$95$2 + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + t$95$1), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], -120.0], N[(t + N[(z + N[(i * y + N[(x * N[Log[y], $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(t + t$95$2), $MachinePrecision] + a), $MachinePrecision] + t$95$1), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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


\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)) < -120

    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. Taylor expanded in a around 0

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

        \[\leadsto t + \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)} \]
      2. lower-+.f64N/A

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

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

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

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

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

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

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

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

    if -120 < (+.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. Taylor expanded in z around 0

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

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

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

        \[\leadsto \left(\left(\left(t + x \cdot \log y\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    4. Applied rewrites84.4%

      \[\leadsto \left(\left(\color{blue}{\left(t + x \cdot \log y\right)} + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 4: 91.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 4 \cdot 10^{+58}:\\
\;\;\;\;t + \left(z + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, z + a\right)\right) + t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 3.99999999999999978e58

    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. Taylor expanded in a around 0

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

        \[\leadsto t + \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)} \]
      2. lower-+.f64N/A

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

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

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

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

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

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

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

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

    if 3.99999999999999978e58 < a

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, a + \color{blue}{z}\right) + t\right) \]
      2. Step-by-step derivation
        1. lift--.f64N/A

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

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

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

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

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

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

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

    Alternative 5: 90.5% accurate, 1.1× speedup?

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

      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. 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 \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 \]
        3. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.14999999999999996e-29 < y

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, a + \color{blue}{z}\right) + t\right) \]
        2. Step-by-step derivation
          1. lift--.f64N/A

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

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

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

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

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

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

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

      Alternative 6: 89.4% accurate, 1.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right)\\ \mathbf{if}\;x \leq -2.15 \cdot 10^{+197}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.95 \cdot 10^{+229}:\\ \;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, z + a\right)\right) + t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b c i)
       :precision binary64
       (let* ((t_1 (+ t (fma i y (fma x (log y) (* (log c) (- b 0.5)))))))
         (if (<= x -2.15e+197)
           t_1
           (if (<= x 1.95e+229)
             (+ (fma (- b 0.5) (log c) (fma y i (+ z a))) t)
             t_1))))
      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
      	double t_1 = t + fma(i, y, fma(x, log(y), (log(c) * (b - 0.5))));
      	double tmp;
      	if (x <= -2.15e+197) {
      		tmp = t_1;
      	} else if (x <= 1.95e+229) {
      		tmp = fma((b - 0.5), log(c), fma(y, i, (z + a))) + t;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b, c, i)
      	t_1 = Float64(t + fma(i, y, fma(x, log(y), Float64(log(c) * Float64(b - 0.5)))))
      	tmp = 0.0
      	if (x <= -2.15e+197)
      		tmp = t_1;
      	elseif (x <= 1.95e+229)
      		tmp = Float64(fma(Float64(b - 0.5), log(c), fma(y, i, Float64(z + a))) + t);
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(t + N[(i * y + N[(x * N[Log[y], $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.15e+197], t$95$1, If[LessEqual[x, 1.95e+229], N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(y * i + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right)\\
      \mathbf{if}\;x \leq -2.15 \cdot 10^{+197}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;x \leq 1.95 \cdot 10^{+229}:\\
      \;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, z + a\right)\right) + t\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < -2.14999999999999998e197 or 1.9499999999999999e229 < 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. Taylor expanded in a around 0

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

            \[\leadsto t + \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)} \]
          2. lower-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
          7. lower--.f6470.4

            \[\leadsto t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right) \]
        7. Applied rewrites70.4%

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

        if -2.14999999999999998e197 < x < 1.9499999999999999e229

        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. 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 \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 \]
          3. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, a + \color{blue}{z}\right) + t\right) \]
          2. Step-by-step derivation
            1. lift--.f64N/A

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

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

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

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

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

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

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

        Alternative 7: 84.8% accurate, 1.2× speedup?

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

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

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

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

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

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

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

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

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

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

            \[\leadsto -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{i \cdot y}{x}\right)\right) \]
          6. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{i \cdot y}{x}\right)\right) \]
            2. lower-*.f6435.7

              \[\leadsto -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{i \cdot y}{x}\right)\right) \]
          7. Applied rewrites35.7%

            \[\leadsto -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{i \cdot y}{x}\right)\right) \]
          8. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{i \cdot y}{x}\right)\right) \]
            2. lift-*.f64N/A

              \[\leadsto -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{i \cdot y}{x}\right)\right) \]
            3. associate-/l*N/A

              \[\leadsto -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \left(i \cdot \frac{y}{x}\right)\right)\right) \]
            4. *-commutativeN/A

              \[\leadsto -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \left(\frac{y}{x} \cdot i\right)\right)\right) \]
            5. lower-*.f64N/A

              \[\leadsto -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \left(\frac{y}{x} \cdot i\right)\right)\right) \]
            6. lower-/.f6435.3

              \[\leadsto -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \left(\frac{y}{x} \cdot i\right)\right)\right) \]
          9. Applied rewrites35.3%

            \[\leadsto -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \left(\frac{y}{x} \cdot i\right)\right)\right) \]
          10. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto -1 \cdot \color{blue}{\left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \left(\frac{y}{x} \cdot i\right)\right)\right)} \]
            2. mul-1-negN/A

              \[\leadsto \mathsf{neg}\left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \left(\frac{y}{x} \cdot i\right)\right)\right) \]
            3. lift-*.f64N/A

              \[\leadsto \mathsf{neg}\left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \left(\frac{y}{x} \cdot i\right)\right)\right) \]
            4. *-commutativeN/A

              \[\leadsto \mathsf{neg}\left(\mathsf{fma}\left(-1, \log y, -1 \cdot \left(\frac{y}{x} \cdot i\right)\right) \cdot x\right) \]
            5. distribute-rgt-neg-inN/A

              \[\leadsto \mathsf{fma}\left(-1, \log y, -1 \cdot \left(\frac{y}{x} \cdot i\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)} \]
            6. lower-*.f64N/A

              \[\leadsto \mathsf{fma}\left(-1, \log y, -1 \cdot \left(\frac{y}{x} \cdot i\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)} \]
          11. Applied rewrites35.3%

            \[\leadsto \left(\left(-\log y\right) - \frac{y}{x} \cdot i\right) \cdot \color{blue}{\left(-x\right)} \]

          if -1.05000000000000006e198 < x < 4.5999999999999999e229

          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. 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 \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 \]
            3. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, a + \color{blue}{z}\right) + t\right) \]
            2. Step-by-step derivation
              1. lift--.f64N/A

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

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

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

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

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

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

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

            if 4.5999999999999999e229 < 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. Taylor expanded in x around -inf

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

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

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

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

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

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

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

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

              \[\leadsto -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{i \cdot y}{x}\right)\right) \]
            6. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{i \cdot y}{x}\right)\right) \]
              2. lower-*.f6435.7

                \[\leadsto -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{i \cdot y}{x}\right)\right) \]
            7. Applied rewrites35.7%

              \[\leadsto -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{i \cdot y}{x}\right)\right) \]
            8. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto -1 \cdot \color{blue}{\left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{i \cdot y}{x}\right)\right)} \]
              2. mul-1-negN/A

                \[\leadsto \mathsf{neg}\left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{i \cdot y}{x}\right)\right) \]
              3. lift-*.f64N/A

                \[\leadsto \mathsf{neg}\left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{i \cdot y}{x}\right)\right) \]
              4. *-commutativeN/A

                \[\leadsto \mathsf{neg}\left(\mathsf{fma}\left(-1, \log y, -1 \cdot \frac{i \cdot y}{x}\right) \cdot x\right) \]
              5. distribute-rgt-neg-inN/A

                \[\leadsto \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{i \cdot y}{x}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)} \]
              6. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{i \cdot y}{x}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)} \]
            9. Applied rewrites35.7%

              \[\leadsto \left(\left(-\log y\right) - \frac{y \cdot i}{x}\right) \cdot \color{blue}{\left(-x\right)} \]
          6. Recombined 3 regimes into one program.
          7. Add Preprocessing

          Alternative 8: 78.4% accurate, 0.7× speedup?

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

            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. Taylor expanded in a around 0

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

                \[\leadsto t + \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)} \]
              2. lower-+.f64N/A

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

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

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

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

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

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

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

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

              \[\leadsto t + \left(z + \mathsf{fma}\left(i, y, b \cdot \left(\log c + \left(\frac{-1}{2} \cdot \frac{\log c}{b} + \frac{x \cdot \log y}{b}\right)\right)\right)\right) \]
            6. Step-by-step derivation
              1. lower-*.f64N/A

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

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

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

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

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

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

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

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

                \[\leadsto t + \left(z + \mathsf{fma}\left(i, y, b \cdot \left(\log c + \mathsf{fma}\left(-0.5, \frac{\log c}{b}, \frac{x \cdot \log y}{b}\right)\right)\right)\right) \]
            7. Applied rewrites76.0%

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

              \[\leadsto t + \left(z + \mathsf{fma}\left(i, y, b \cdot \log c\right)\right) \]
            9. Step-by-step derivation
              1. lower-log.f6467.9

                \[\leadsto t + \left(z + \mathsf{fma}\left(i, y, b \cdot \log c\right)\right) \]
            10. Applied rewrites67.9%

              \[\leadsto t + \left(z + \mathsf{fma}\left(i, y, b \cdot \log c\right)\right) \]
            11. Step-by-step derivation
              1. lift-+.f64N/A

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

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

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

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

                \[\leadsto \mathsf{fma}\left(i, y, b \cdot \log c\right) + \color{blue}{\left(t + z\right)} \]
            12. Applied rewrites67.9%

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

            if -5.00000000000000036e190 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 1e164

            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. 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 \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 \]
              3. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, a + \color{blue}{z}\right) + t\right) \]
              2. Step-by-step derivation
                1. lift--.f64N/A

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

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

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

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

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

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

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

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

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

              Alternative 9: 74.4% accurate, 1.4× speedup?

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

                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. Taylor expanded in a around 0

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

                    \[\leadsto t + \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)} \]
                  2. lower-+.f64N/A

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

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

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

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

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

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

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

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

                  \[\leadsto t + \left(z + \mathsf{fma}\left(i, y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                6. Step-by-step derivation
                  1. lower-*.f64N/A

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

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

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

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

                if 5.0500000000000001e61 < a

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, a + \color{blue}{z}\right) + t\right) \]
                  2. Step-by-step derivation
                    1. lift--.f64N/A

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

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

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

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

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

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

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

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

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

                  Alternative 10: 52.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\\ t_2 := \mathsf{fma}\left(i, y, \log c \cdot b\right) + \left(t + z\right)\\ \mathbf{if}\;t\_1 \leq 5 \cdot 10^{+80}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 10^{+289}:\\ \;\;\;\;-\left(-a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \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)))
                          (t_2 (+ (fma i y (* (log c) b)) (+ t z))))
                     (if (<= t_1 5e+80) t_2 (if (<= t_1 1e+289) (- (- a)) t_2))))
                  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 t_2 = fma(i, y, (log(c) * b)) + (t + z);
                  	double tmp;
                  	if (t_1 <= 5e+80) {
                  		tmp = t_2;
                  	} else if (t_1 <= 1e+289) {
                  		tmp = -(-a);
                  	} else {
                  		tmp = t_2;
                  	}
                  	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))
                  	t_2 = Float64(fma(i, y, Float64(log(c) * b)) + Float64(t + z))
                  	tmp = 0.0
                  	if (t_1 <= 5e+80)
                  		tmp = t_2;
                  	elseif (t_1 <= 1e+289)
                  		tmp = Float64(-Float64(-a));
                  	else
                  		tmp = t_2;
                  	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]}, Block[{t$95$2 = N[(N[(i * y + N[(N[Log[c], $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision] + N[(t + z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+80], t$95$2, If[LessEqual[t$95$1, 1e+289], (-(-a)), t$95$2]]]]
                  
                  \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\\
                  t_2 := \mathsf{fma}\left(i, y, \log c \cdot b\right) + \left(t + z\right)\\
                  \mathbf{if}\;t\_1 \leq 5 \cdot 10^{+80}:\\
                  \;\;\;\;t\_2\\
                  
                  \mathbf{elif}\;t\_1 \leq 10^{+289}:\\
                  \;\;\;\;-\left(-a\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_2\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 4.99999999999999961e80 or 1.0000000000000001e289 < (+.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. Taylor expanded in a around 0

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

                        \[\leadsto t + \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)} \]
                      2. lower-+.f64N/A

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

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

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

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

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

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

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

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

                      \[\leadsto t + \left(z + \mathsf{fma}\left(i, y, b \cdot \left(\log c + \left(\frac{-1}{2} \cdot \frac{\log c}{b} + \frac{x \cdot \log y}{b}\right)\right)\right)\right) \]
                    6. Step-by-step derivation
                      1. lower-*.f64N/A

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

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

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

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

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

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

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

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

                        \[\leadsto t + \left(z + \mathsf{fma}\left(i, y, b \cdot \left(\log c + \mathsf{fma}\left(-0.5, \frac{\log c}{b}, \frac{x \cdot \log y}{b}\right)\right)\right)\right) \]
                    7. Applied rewrites76.0%

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

                      \[\leadsto t + \left(z + \mathsf{fma}\left(i, y, b \cdot \log c\right)\right) \]
                    9. Step-by-step derivation
                      1. lower-log.f6467.9

                        \[\leadsto t + \left(z + \mathsf{fma}\left(i, y, b \cdot \log c\right)\right) \]
                    10. Applied rewrites67.9%

                      \[\leadsto t + \left(z + \mathsf{fma}\left(i, y, b \cdot \log c\right)\right) \]
                    11. Step-by-step derivation
                      1. lift-+.f64N/A

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(i, y, b \cdot \log c\right) + \color{blue}{\left(t + z\right)} \]
                    12. Applied rewrites67.9%

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

                    if 4.99999999999999961e80 < (+.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.0000000000000001e289

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

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

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

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

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

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

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

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

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

                      \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                    6. Step-by-step derivation
                      1. lower-*.f6415.3

                        \[\leadsto -1 \cdot \left(-1 \cdot a\right) \]
                    7. Applied rewrites15.3%

                      \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                    8. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot a\right)} \]
                      2. mul-1-negN/A

                        \[\leadsto \mathsf{neg}\left(-1 \cdot a\right) \]
                      3. lower-neg.f6415.3

                        \[\leadsto --1 \cdot a \]
                      4. lift-*.f64N/A

                        \[\leadsto --1 \cdot a \]
                      5. mul-1-negN/A

                        \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                      6. lower-neg.f6415.3

                        \[\leadsto -\left(-a\right) \]
                    9. Applied rewrites15.3%

                      \[\leadsto -\left(-a\right) \]
                  3. Recombined 2 regimes into one program.
                  4. Add Preprocessing

                  Alternative 11: 28.3% 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 -100:\\ \;\;\;\;-1 \cdot \left(-1 \cdot z\right)\\ \mathbf{elif}\;t\_1 \leq 6 \cdot 10^{+307}:\\ \;\;\;\;-\left(-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 -100.0)
                         (* -1.0 (* -1.0 z))
                         (if (<= t_1 6e+307) (- (- 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 <= -100.0) {
                  		tmp = -1.0 * (-1.0 * z);
                  	} else if (t_1 <= 6e+307) {
                  		tmp = -(-a);
                  	} else {
                  		tmp = i * y;
                  	}
                  	return tmp;
                  }
                  
                  public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	double t_1 = (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
                  	double tmp;
                  	if (t_1 <= -Double.POSITIVE_INFINITY) {
                  		tmp = i * y;
                  	} else if (t_1 <= -100.0) {
                  		tmp = -1.0 * (-1.0 * z);
                  	} else if (t_1 <= 6e+307) {
                  		tmp = -(-a);
                  	} else {
                  		tmp = i * y;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a, b, c, i):
                  	t_1 = (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
                  	tmp = 0
                  	if t_1 <= -math.inf:
                  		tmp = i * y
                  	elif t_1 <= -100.0:
                  		tmp = -1.0 * (-1.0 * z)
                  	elif t_1 <= 6e+307:
                  		tmp = -(-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 <= -100.0)
                  		tmp = Float64(-1.0 * Float64(-1.0 * z));
                  	elseif (t_1 <= 6e+307)
                  		tmp = Float64(-Float64(-a));
                  	else
                  		tmp = Float64(i * y);
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t, a, b, c, i)
                  	t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                  	tmp = 0.0;
                  	if (t_1 <= -Inf)
                  		tmp = i * y;
                  	elseif (t_1 <= -100.0)
                  		tmp = -1.0 * (-1.0 * z);
                  	elseif (t_1 <= 6e+307)
                  		tmp = -(-a);
                  	else
                  		tmp = i * y;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(i * y), $MachinePrecision], If[LessEqual[t$95$1, -100.0], N[(-1.0 * N[(-1.0 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 6e+307], (-(-a)), 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 -100:\\
                  \;\;\;\;-1 \cdot \left(-1 \cdot z\right)\\
                  
                  \mathbf{elif}\;t\_1 \leq 6 \cdot 10^{+307}:\\
                  \;\;\;\;-\left(-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 5.9999999999999997e307 < (+.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. 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 \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 \]
                      3. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto i \cdot \color{blue}{y} \]
                    6. Applied rewrites24.1%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{z}\right) \]
                    6. Step-by-step derivation
                      1. lower-*.f6416.6

                        \[\leadsto -1 \cdot \left(-1 \cdot z\right) \]
                    7. Applied rewrites16.6%

                      \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{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)) < 5.9999999999999997e307

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

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

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

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

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

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

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

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

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

                      \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                    6. Step-by-step derivation
                      1. lower-*.f6415.3

                        \[\leadsto -1 \cdot \left(-1 \cdot a\right) \]
                    7. Applied rewrites15.3%

                      \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                    8. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot a\right)} \]
                      2. mul-1-negN/A

                        \[\leadsto \mathsf{neg}\left(-1 \cdot a\right) \]
                      3. lower-neg.f6415.3

                        \[\leadsto --1 \cdot a \]
                      4. lift-*.f64N/A

                        \[\leadsto --1 \cdot a \]
                      5. mul-1-negN/A

                        \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                      6. lower-neg.f6415.3

                        \[\leadsto -\left(-a\right) \]
                    9. Applied rewrites15.3%

                      \[\leadsto -\left(-a\right) \]
                  3. Recombined 3 regimes into one program.
                  4. Add Preprocessing

                  Alternative 12: 26.3% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto i \cdot \color{blue}{y} \]
                    6. Applied rewrites24.1%

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

                    if 1.9999999999999999e33 < (+.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.9999999999999997e307

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

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

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

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

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

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

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

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

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

                      \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                    6. Step-by-step derivation
                      1. lower-*.f6415.3

                        \[\leadsto -1 \cdot \left(-1 \cdot a\right) \]
                    7. Applied rewrites15.3%

                      \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                    8. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot a\right)} \]
                      2. mul-1-negN/A

                        \[\leadsto \mathsf{neg}\left(-1 \cdot a\right) \]
                      3. lower-neg.f6415.3

                        \[\leadsto --1 \cdot a \]
                      4. lift-*.f64N/A

                        \[\leadsto --1 \cdot a \]
                      5. mul-1-negN/A

                        \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                      6. lower-neg.f6415.3

                        \[\leadsto -\left(-a\right) \]
                    9. Applied rewrites15.3%

                      \[\leadsto -\left(-a\right) \]
                  3. Recombined 2 regimes into one program.
                  4. Add Preprocessing

                  Alternative 13: 15.3% accurate, 12.8× speedup?

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                  6. Step-by-step derivation
                    1. lower-*.f6415.3

                      \[\leadsto -1 \cdot \left(-1 \cdot a\right) \]
                  7. Applied rewrites15.3%

                    \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                  8. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot a\right)} \]
                    2. mul-1-negN/A

                      \[\leadsto \mathsf{neg}\left(-1 \cdot a\right) \]
                    3. lower-neg.f6415.3

                      \[\leadsto --1 \cdot a \]
                    4. lift-*.f64N/A

                      \[\leadsto --1 \cdot a \]
                    5. mul-1-negN/A

                      \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                    6. lower-neg.f6415.3

                      \[\leadsto -\left(-a\right) \]
                  9. Applied rewrites15.3%

                    \[\leadsto -\left(-a\right) \]
                  10. Add Preprocessing

                  Reproduce

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