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

Percentage Accurate: 99.8% → 99.8%
Time: 9.0s
Alternatives: 17
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

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

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 17 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \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}
Derivation
  1. Initial program 99.8%

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

Alternative 2: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 92.8% accurate, 1.1× speedup?

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

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

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

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

      \[\leadsto a + \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 a + \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 a + \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 a + \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 a + \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 a + \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 a + \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--.f6484.4

      \[\leadsto a + \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 rewrites84.4%

    \[\leadsto \color{blue}{a + \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. Add Preprocessing

Alternative 4: 91.8% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;x \leq 1.2 \cdot 10^{+150}:\\
\;\;\;\;\left(\mathsf{fma}\left(\log c, b - 0.5, t + z\right) + a\right) + y \cdot i\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(i, y, t\_1\right) + t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -6.1999999999999999e106

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

      \[\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-*.f6416.0

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

      \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
    8. Taylor expanded in y around 0

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

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

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

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

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

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

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

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

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

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

    if -6.1999999999999999e106 < x < 1.20000000000000001e150

    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}{\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 \]
      3. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.20000000000000001e150 < 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--.f6484.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 90.6% accurate, 1.0× speedup?

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

      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--.f6484.8

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -2.79999999999999987e151 < x < 1.20000000000000001e150

      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}{\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 \]
        3. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.20000000000000001e150 < 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--.f6484.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 6: 90.4% accurate, 1.1× speedup?

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

        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--.f6484.8

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -2.79999999999999987e151 < x < 7.4999999999999997e233

        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}{\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 \]
          3. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 7.4999999999999997e233 < 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 rewrites73.0%

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

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

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

        Alternative 7: 89.1% accurate, 1.1× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{i \cdot y}{x}\right)\right)\\ \mathbf{if}\;x \leq -8 \cdot 10^{+200}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{+233}:\\ \;\;\;\;\left(\mathsf{fma}\left(\log c, b - 0.5, t + z\right) + a\right) + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t a b c i)
         :precision binary64
         (let* ((t_1 (* -1.0 (* x (fma -1.0 (log y) (* -1.0 (/ (* i y) x)))))))
           (if (<= x -8e+200)
             t_1
             (if (<= x 7.5e+233)
               (+ (+ (fma (log c) (- b 0.5) (+ t z)) a) (* y i))
               t_1))))
        double code(double x, double y, double z, double t, double a, double b, double c, double i) {
        	double t_1 = -1.0 * (x * fma(-1.0, log(y), (-1.0 * ((i * y) / x))));
        	double tmp;
        	if (x <= -8e+200) {
        		tmp = t_1;
        	} else if (x <= 7.5e+233) {
        		tmp = (fma(log(c), (b - 0.5), (t + z)) + a) + (y * i);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b, c, i)
        	t_1 = Float64(-1.0 * Float64(x * fma(-1.0, log(y), Float64(-1.0 * Float64(Float64(i * y) / x)))))
        	tmp = 0.0
        	if (x <= -8e+200)
        		tmp = t_1;
        	elseif (x <= 7.5e+233)
        		tmp = Float64(Float64(fma(log(c), Float64(b - 0.5), Float64(t + z)) + a) + Float64(y * i));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(-1.0 * N[(x * N[(-1.0 * N[Log[y], $MachinePrecision] + N[(-1.0 * N[(N[(i * y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8e+200], t$95$1, If[LessEqual[x, 7.5e+233], N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(t + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{i \cdot y}{x}\right)\right)\\
        \mathbf{if}\;x \leq -8 \cdot 10^{+200}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;x \leq 7.5 \cdot 10^{+233}:\\
        \;\;\;\;\left(\mathsf{fma}\left(\log c, b - 0.5, t + z\right) + a\right) + y \cdot i\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < -7.9999999999999998e200 or 7.4999999999999997e233 < 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 rewrites73.0%

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

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

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

          if -7.9999999999999998e200 < x < 7.4999999999999997e233

          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}{\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 \]
            3. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 8: 88.8% accurate, 1.1× speedup?

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

            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--.f6484.8

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\mathsf{fma}\left(\log y, x, z\right) - \frac{1}{2} \cdot \log c\right) + t \]
            11. Step-by-step derivation
              1. Applied rewrites47.9%

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

              if -2.9999999999999999e151 < x < 7.4999999999999997e233

              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}{\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 \]
                3. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 7.4999999999999997e233 < 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--.f6484.8

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto t + \left(z + \mathsf{fma}\left(x, \log y, \log c \cdot -0.5\right)\right) \]
                10. Recombined 3 regimes into one program.
                11. Add Preprocessing

                Alternative 9: 87.7% accurate, 1.1× speedup?

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

                  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--.f6484.8

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(\mathsf{fma}\left(\log y, x, z\right) - \frac{1}{2} \cdot \log c\right) + t \]
                  11. Step-by-step derivation
                    1. Applied rewrites47.9%

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

                    if -2.9999999999999999e151 < x < 7.4999999999999997e233

                    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}{\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 \]
                      3. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if 7.4999999999999997e233 < 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 rewrites73.0%

                        \[\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(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{z}{x}\right)\right) \]
                      6. Step-by-step derivation
                        1. lower-/.f6426.6

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

                        \[\leadsto -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{z}{x}\right)\right) \]
                    6. Recombined 3 regimes into one program.
                    7. Add Preprocessing

                    Alternative 10: 84.4% accurate, 1.1× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{z}{x}\right)\right)\\ \mathbf{if}\;x \leq -3 \cdot 10^{+151}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{+233}:\\ \;\;\;\;\left(\mathsf{fma}\left(\log c, b - 0.5, t + z\right) + a\right) + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                    (FPCore (x y z t a b c i)
                     :precision binary64
                     (let* ((t_1 (* -1.0 (* x (fma -1.0 (log y) (* -1.0 (/ z x)))))))
                       (if (<= x -3e+151)
                         t_1
                         (if (<= x 7.5e+233)
                           (+ (+ (fma (log c) (- b 0.5) (+ t z)) a) (* y i))
                           t_1))))
                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double t_1 = -1.0 * (x * fma(-1.0, log(y), (-1.0 * (z / x))));
                    	double tmp;
                    	if (x <= -3e+151) {
                    		tmp = t_1;
                    	} else if (x <= 7.5e+233) {
                    		tmp = (fma(log(c), (b - 0.5), (t + z)) + a) + (y * i);
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t, a, b, c, i)
                    	t_1 = Float64(-1.0 * Float64(x * fma(-1.0, log(y), Float64(-1.0 * Float64(z / x)))))
                    	tmp = 0.0
                    	if (x <= -3e+151)
                    		tmp = t_1;
                    	elseif (x <= 7.5e+233)
                    		tmp = Float64(Float64(fma(log(c), Float64(b - 0.5), Float64(t + z)) + a) + Float64(y * i));
                    	else
                    		tmp = t_1;
                    	end
                    	return tmp
                    end
                    
                    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(-1.0 * N[(x * N[(-1.0 * N[Log[y], $MachinePrecision] + N[(-1.0 * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3e+151], t$95$1, If[LessEqual[x, 7.5e+233], N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(t + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{z}{x}\right)\right)\\
                    \mathbf{if}\;x \leq -3 \cdot 10^{+151}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;x \leq 7.5 \cdot 10^{+233}:\\
                    \;\;\;\;\left(\mathsf{fma}\left(\log c, b - 0.5, t + z\right) + a\right) + y \cdot i\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if x < -2.9999999999999999e151 or 7.4999999999999997e233 < 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 rewrites73.0%

                        \[\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(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{z}{x}\right)\right) \]
                      6. Step-by-step derivation
                        1. lower-/.f6426.6

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

                        \[\leadsto -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{z}{x}\right)\right) \]

                      if -2.9999999999999999e151 < x < 7.4999999999999997e233

                      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}{\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 \]
                        3. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 11: 75.1% accurate, 1.2× speedup?

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

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

                          \[\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(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{z}{x}\right)\right) \]
                        6. Step-by-step derivation
                          1. lower-/.f6426.6

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

                          \[\leadsto -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{z}{x}\right)\right) \]

                        if -2.7000000000000001e151 < x < 1.60000000000000001e161

                        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--.f6484.8

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

                          \[\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.3

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

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

                        if 1.60000000000000001e161 < 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 rewrites73.0%

                          \[\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(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{a}{x}\right)\right) \]
                        6. Step-by-step derivation
                          1. lower-/.f6426.2

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

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

                      Alternative 12: 74.5% accurate, 1.2× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{a}{x}\right)\right)\\ \mathbf{if}\;x \leq -1 \cdot 10^{+200}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{+161}:\\ \;\;\;\;t + \left(z + \mathsf{fma}\left(i, y, \log c \cdot \left(b - 0.5\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b c i)
                       :precision binary64
                       (let* ((t_1 (* -1.0 (* x (fma -1.0 (log y) (* -1.0 (/ a x)))))))
                         (if (<= x -1e+200)
                           t_1
                           (if (<= x 1.6e+161) (+ t (+ z (fma i y (* (log c) (- b 0.5))))) t_1))))
                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	double t_1 = -1.0 * (x * fma(-1.0, log(y), (-1.0 * (a / x))));
                      	double tmp;
                      	if (x <= -1e+200) {
                      		tmp = t_1;
                      	} else if (x <= 1.6e+161) {
                      		tmp = t + (z + fma(i, y, (log(c) * (b - 0.5))));
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t, a, b, c, i)
                      	t_1 = Float64(-1.0 * Float64(x * fma(-1.0, log(y), Float64(-1.0 * Float64(a / x)))))
                      	tmp = 0.0
                      	if (x <= -1e+200)
                      		tmp = t_1;
                      	elseif (x <= 1.6e+161)
                      		tmp = Float64(t + Float64(z + fma(i, y, Float64(log(c) * Float64(b - 0.5)))));
                      	else
                      		tmp = t_1;
                      	end
                      	return tmp
                      end
                      
                      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(-1.0 * N[(x * N[(-1.0 * N[Log[y], $MachinePrecision] + N[(-1.0 * N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1e+200], t$95$1, If[LessEqual[x, 1.6e+161], N[(t + N[(z + N[(i * y + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_1 := -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{a}{x}\right)\right)\\
                      \mathbf{if}\;x \leq -1 \cdot 10^{+200}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;x \leq 1.6 \cdot 10^{+161}:\\
                      \;\;\;\;t + \left(z + \mathsf{fma}\left(i, y, \log c \cdot \left(b - 0.5\right)\right)\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if x < -9.9999999999999997e199 or 1.60000000000000001e161 < 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 rewrites73.0%

                          \[\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(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{a}{x}\right)\right) \]
                        6. Step-by-step derivation
                          1. lower-/.f6426.2

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

                          \[\leadsto -1 \cdot \left(x \cdot \mathsf{fma}\left(-1, \log y, -1 \cdot \frac{a}{x}\right)\right) \]

                        if -9.9999999999999997e199 < x < 1.60000000000000001e161

                        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--.f6484.8

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

                          \[\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.3

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

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

                      Alternative 13: 74.3% accurate, 1.2× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -2.4 \cdot 10^{+200}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{+233}:\\ \;\;\;\;t + \left(z + \mathsf{fma}\left(i, y, \log c \cdot \left(b - 0.5\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b c i)
                       :precision binary64
                       (let* ((t_1 (* x (log y))))
                         (if (<= x -2.4e+200)
                           t_1
                           (if (<= x 7.5e+233) (+ t (+ z (fma i y (* (log c) (- b 0.5))))) t_1))))
                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	double t_1 = x * log(y);
                      	double tmp;
                      	if (x <= -2.4e+200) {
                      		tmp = t_1;
                      	} else if (x <= 7.5e+233) {
                      		tmp = t + (z + fma(i, y, (log(c) * (b - 0.5))));
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t, a, b, c, i)
                      	t_1 = Float64(x * log(y))
                      	tmp = 0.0
                      	if (x <= -2.4e+200)
                      		tmp = t_1;
                      	elseif (x <= 7.5e+233)
                      		tmp = Float64(t + Float64(z + fma(i, y, Float64(log(c) * Float64(b - 0.5)))));
                      	else
                      		tmp = t_1;
                      	end
                      	return tmp
                      end
                      
                      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.4e+200], t$95$1, If[LessEqual[x, 7.5e+233], N[(t + N[(z + N[(i * y + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_1 := x \cdot \log y\\
                      \mathbf{if}\;x \leq -2.4 \cdot 10^{+200}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;x \leq 7.5 \cdot 10^{+233}:\\
                      \;\;\;\;t + \left(z + \mathsf{fma}\left(i, y, \log c \cdot \left(b - 0.5\right)\right)\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if x < -2.4000000000000001e200 or 7.4999999999999997e233 < 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. 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}{\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 \]
                          3. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto x \cdot \color{blue}{\log y} \]
                          2. lower-log.f6417.0

                            \[\leadsto x \cdot \log y \]
                        6. Applied rewrites17.0%

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

                        if -2.4000000000000001e200 < x < 7.4999999999999997e233

                        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--.f6484.8

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

                          \[\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.3

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

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

                      Alternative 14: 42.6% 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\\ t_2 := 1 \cdot \left(i \cdot y\right)\\ \mathbf{if}\;t\_1 \leq -6 \cdot 10^{+296}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 10^{+16}:\\ \;\;\;\;\left(z - \log c \cdot \left(0.5 - b\right)\right) + t\\ \mathbf{elif}\;t\_1 \leq 10^{+307}:\\ \;\;\;\;-\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 (* 1.0 (* i y))))
                         (if (<= t_1 -6e+296)
                           t_2
                           (if (<= t_1 1e+16)
                             (+ (- z (* (log c) (- 0.5 b))) t)
                             (if (<= t_1 1e+307) (- (- 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 = 1.0 * (i * y);
                      	double tmp;
                      	if (t_1 <= -6e+296) {
                      		tmp = t_2;
                      	} else if (t_1 <= 1e+16) {
                      		tmp = (z - (log(c) * (0.5 - b))) + t;
                      	} else if (t_1 <= 1e+307) {
                      		tmp = -(-a);
                      	} else {
                      		tmp = t_2;
                      	}
                      	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) :: t_2
                          real(8) :: tmp
                          t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
                          t_2 = 1.0d0 * (i * y)
                          if (t_1 <= (-6d+296)) then
                              tmp = t_2
                          else if (t_1 <= 1d+16) then
                              tmp = (z - (log(c) * (0.5d0 - b))) + t
                          else if (t_1 <= 1d+307) then
                              tmp = -(-a)
                          else
                              tmp = t_2
                          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 t_2 = 1.0 * (i * y);
                      	double tmp;
                      	if (t_1 <= -6e+296) {
                      		tmp = t_2;
                      	} else if (t_1 <= 1e+16) {
                      		tmp = (z - (Math.log(c) * (0.5 - b))) + t;
                      	} else if (t_1 <= 1e+307) {
                      		tmp = -(-a);
                      	} else {
                      		tmp = t_2;
                      	}
                      	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)
                      	t_2 = 1.0 * (i * y)
                      	tmp = 0
                      	if t_1 <= -6e+296:
                      		tmp = t_2
                      	elif t_1 <= 1e+16:
                      		tmp = (z - (math.log(c) * (0.5 - b))) + t
                      	elif t_1 <= 1e+307:
                      		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(1.0 * Float64(i * y))
                      	tmp = 0.0
                      	if (t_1 <= -6e+296)
                      		tmp = t_2;
                      	elseif (t_1 <= 1e+16)
                      		tmp = Float64(Float64(z - Float64(log(c) * Float64(0.5 - b))) + t);
                      	elseif (t_1 <= 1e+307)
                      		tmp = Float64(-Float64(-a));
                      	else
                      		tmp = t_2;
                      	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);
                      	t_2 = 1.0 * (i * y);
                      	tmp = 0.0;
                      	if (t_1 <= -6e+296)
                      		tmp = t_2;
                      	elseif (t_1 <= 1e+16)
                      		tmp = (z - (log(c) * (0.5 - b))) + t;
                      	elseif (t_1 <= 1e+307)
                      		tmp = -(-a);
                      	else
                      		tmp = t_2;
                      	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]}, Block[{t$95$2 = N[(1.0 * N[(i * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -6e+296], t$95$2, If[LessEqual[t$95$1, 1e+16], N[(N[(z - N[(N[Log[c], $MachinePrecision] * N[(0.5 - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[t$95$1, 1e+307], (-(-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 := 1 \cdot \left(i \cdot y\right)\\
                      \mathbf{if}\;t\_1 \leq -6 \cdot 10^{+296}:\\
                      \;\;\;\;t\_2\\
                      
                      \mathbf{elif}\;t\_1 \leq 10^{+16}:\\
                      \;\;\;\;\left(z - \log c \cdot \left(0.5 - b\right)\right) + t\\
                      
                      \mathbf{elif}\;t\_1 \leq 10^{+307}:\\
                      \;\;\;\;-\left(-a\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_2\\
                      
                      
                      \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)) < -6.00000000000000025e296 or 9.99999999999999986e306 < (+.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. +-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. sum-to-multN/A

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

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

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

                          \[\leadsto \color{blue}{1} \cdot \left(i \cdot y\right) \]
                        5. Step-by-step derivation
                          1. Applied rewrites23.4%

                            \[\leadsto \color{blue}{1} \cdot \left(i \cdot y\right) \]

                          if -6.00000000000000025e296 < (+.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)) < 1e16

                          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--.f6484.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \left(z - \log c \cdot \left(\frac{1}{2} - b\right)\right) + t \]
                            4. lower--.f6447.7

                              \[\leadsto \left(z - \log c \cdot \left(0.5 - b\right)\right) + t \]
                          12. Applied rewrites47.7%

                            \[\leadsto \left(z - \log c \cdot \left(0.5 - b\right)\right) + t \]

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

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

                            \[\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-*.f6416.0

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

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

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

                              \[\leadsto -\left(-a\right) \]
                          9. Applied rewrites16.0%

                            \[\leadsto \color{blue}{-\left(-a\right)} \]
                        6. Recombined 3 regimes into one program.
                        7. Add Preprocessing

                        Alternative 15: 27.9% 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\\ t_2 := 1 \cdot \left(i \cdot y\right)\\ \mathbf{if}\;t\_1 \leq -6 \cdot 10^{+296}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{+15}:\\ \;\;\;\;--1 \cdot z\\ \mathbf{elif}\;t\_1 \leq 10^{+307}:\\ \;\;\;\;-\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 (* 1.0 (* i y))))
                           (if (<= t_1 -6e+296)
                             t_2
                             (if (<= t_1 -2e+15) (- (* -1.0 z)) (if (<= t_1 1e+307) (- (- 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 = 1.0 * (i * y);
                        	double tmp;
                        	if (t_1 <= -6e+296) {
                        		tmp = t_2;
                        	} else if (t_1 <= -2e+15) {
                        		tmp = -(-1.0 * z);
                        	} else if (t_1 <= 1e+307) {
                        		tmp = -(-a);
                        	} else {
                        		tmp = t_2;
                        	}
                        	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) :: t_2
                            real(8) :: tmp
                            t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
                            t_2 = 1.0d0 * (i * y)
                            if (t_1 <= (-6d+296)) then
                                tmp = t_2
                            else if (t_1 <= (-2d+15)) then
                                tmp = -((-1.0d0) * z)
                            else if (t_1 <= 1d+307) then
                                tmp = -(-a)
                            else
                                tmp = t_2
                            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 t_2 = 1.0 * (i * y);
                        	double tmp;
                        	if (t_1 <= -6e+296) {
                        		tmp = t_2;
                        	} else if (t_1 <= -2e+15) {
                        		tmp = -(-1.0 * z);
                        	} else if (t_1 <= 1e+307) {
                        		tmp = -(-a);
                        	} else {
                        		tmp = t_2;
                        	}
                        	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)
                        	t_2 = 1.0 * (i * y)
                        	tmp = 0
                        	if t_1 <= -6e+296:
                        		tmp = t_2
                        	elif t_1 <= -2e+15:
                        		tmp = -(-1.0 * z)
                        	elif t_1 <= 1e+307:
                        		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(1.0 * Float64(i * y))
                        	tmp = 0.0
                        	if (t_1 <= -6e+296)
                        		tmp = t_2;
                        	elseif (t_1 <= -2e+15)
                        		tmp = Float64(-Float64(-1.0 * z));
                        	elseif (t_1 <= 1e+307)
                        		tmp = Float64(-Float64(-a));
                        	else
                        		tmp = t_2;
                        	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);
                        	t_2 = 1.0 * (i * y);
                        	tmp = 0.0;
                        	if (t_1 <= -6e+296)
                        		tmp = t_2;
                        	elseif (t_1 <= -2e+15)
                        		tmp = -(-1.0 * z);
                        	elseif (t_1 <= 1e+307)
                        		tmp = -(-a);
                        	else
                        		tmp = t_2;
                        	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]}, Block[{t$95$2 = N[(1.0 * N[(i * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -6e+296], t$95$2, If[LessEqual[t$95$1, -2e+15], (-N[(-1.0 * z), $MachinePrecision]), If[LessEqual[t$95$1, 1e+307], (-(-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 := 1 \cdot \left(i \cdot y\right)\\
                        \mathbf{if}\;t\_1 \leq -6 \cdot 10^{+296}:\\
                        \;\;\;\;t\_2\\
                        
                        \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{+15}:\\
                        \;\;\;\;--1 \cdot z\\
                        
                        \mathbf{elif}\;t\_1 \leq 10^{+307}:\\
                        \;\;\;\;-\left(-a\right)\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_2\\
                        
                        
                        \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)) < -6.00000000000000025e296 or 9.99999999999999986e306 < (+.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. +-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. sum-to-multN/A

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

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

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

                            \[\leadsto \color{blue}{1} \cdot \left(i \cdot y\right) \]
                          5. Step-by-step derivation
                            1. Applied rewrites23.4%

                              \[\leadsto \color{blue}{1} \cdot \left(i \cdot y\right) \]

                            if -6.00000000000000025e296 < (+.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)) < -2e15

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

                              \[\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-*.f6416.0

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

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

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

                                \[\leadsto -\left(-a\right) \]
                            9. Applied rewrites16.0%

                              \[\leadsto \color{blue}{-\left(-a\right)} \]
                            10. Taylor expanded in z around inf

                              \[\leadsto --1 \cdot z \]
                            11. Step-by-step derivation
                              1. lower-*.f6416.6

                                \[\leadsto --1 \cdot z \]
                            12. Applied rewrites16.6%

                              \[\leadsto --1 \cdot z \]

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

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

                              \[\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-*.f6416.0

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

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

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

                                \[\leadsto -\left(-a\right) \]
                            9. Applied rewrites16.0%

                              \[\leadsto \color{blue}{-\left(-a\right)} \]
                          6. Recombined 3 regimes into one program.
                          7. Add Preprocessing

                          Alternative 16: 16.2% accurate, 0.8× speedup?

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

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

                              \[\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-*.f6416.0

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

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

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

                                \[\leadsto -\left(-a\right) \]
                            9. Applied rewrites16.0%

                              \[\leadsto \color{blue}{-\left(-a\right)} \]
                            10. Taylor expanded in z around inf

                              \[\leadsto --1 \cdot z \]
                            11. Step-by-step derivation
                              1. lower-*.f6416.6

                                \[\leadsto --1 \cdot z \]
                            12. Applied rewrites16.6%

                              \[\leadsto --1 \cdot z \]

                            if -2e15 < (+.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 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 rewrites73.0%

                              \[\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-*.f6416.0

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

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

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

                                \[\leadsto -\left(-a\right) \]
                            9. Applied rewrites16.0%

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

                          Alternative 17: 16.0% 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 rewrites73.0%

                            \[\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-*.f6416.0

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

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

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

                              \[\leadsto -\left(-a\right) \]
                          9. Applied rewrites16.0%

                            \[\leadsto \color{blue}{-\left(-a\right)} \]
                          10. Add Preprocessing

                          Reproduce

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