Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B

Percentage Accurate: 94.1% → 98.8%
Time: 7.3s
Alternatives: 16
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+
  (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
  (/
   (+
    (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
    0.083333333333333)
   x)))
double code(double x, double y, double z) {
	return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
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)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
	return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z):
	return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z)
	return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x))
end
function tmp = code(x, y, z)
	tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\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 16 alternatives:

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

Initial Program: 94.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+
  (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
  (/
   (+
    (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
    0.083333333333333)
   x)))
double code(double x, double y, double z) {
	return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
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)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
	return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z):
	return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z)
	return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x))
end
function tmp = code(x, y, z)
	tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\end{array}

Alternative 1: 98.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{x} - \mathsf{fma}\left(0.5 - x, \log x, x - 0.91893853320467\right)\right) \end{array} \]
(FPCore (x y z)
 :precision binary64
 (fma
  (fma z (- y -0.0007936500793651) -0.0027777777777778)
  (/ z x)
  (- (/ 0.083333333333333 x) (fma (- 0.5 x) (log x) (- x 0.91893853320467)))))
double code(double x, double y, double z) {
	return fma(fma(z, (y - -0.0007936500793651), -0.0027777777777778), (z / x), ((0.083333333333333 / x) - fma((0.5 - x), log(x), (x - 0.91893853320467))));
}
function code(x, y, z)
	return fma(fma(z, Float64(y - -0.0007936500793651), -0.0027777777777778), Float64(z / x), Float64(Float64(0.083333333333333 / x) - fma(Float64(0.5 - x), log(x), Float64(x - 0.91893853320467))))
end
code[x_, y_, z_] := N[(N[(z * N[(y - -0.0007936500793651), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] * N[(z / x), $MachinePrecision] + N[(N[(0.083333333333333 / x), $MachinePrecision] - N[(N[(0.5 - x), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(x - 0.91893853320467), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{x} - \mathsf{fma}\left(0.5 - x, \log x, x - 0.91893853320467\right)\right)
\end{array}
Derivation
  1. Initial program 94.1%

    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  2. Applied rewrites98.8%

    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{x} - \mathsf{fma}\left(0.5 - x, \log x, x - 0.91893853320467\right)\right)} \]
  3. Add Preprocessing

Alternative 2: 98.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(\frac{\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right)}{x}, z, \frac{0.083333333333333}{x} - \mathsf{fma}\left(0.5 - x, \log x, x - 0.91893853320467\right)\right) \end{array} \]
(FPCore (x y z)
 :precision binary64
 (fma
  (/ (fma z (- y -0.0007936500793651) -0.0027777777777778) x)
  z
  (- (/ 0.083333333333333 x) (fma (- 0.5 x) (log x) (- x 0.91893853320467)))))
double code(double x, double y, double z) {
	return fma((fma(z, (y - -0.0007936500793651), -0.0027777777777778) / x), z, ((0.083333333333333 / x) - fma((0.5 - x), log(x), (x - 0.91893853320467))));
}
function code(x, y, z)
	return fma(Float64(fma(z, Float64(y - -0.0007936500793651), -0.0027777777777778) / x), z, Float64(Float64(0.083333333333333 / x) - fma(Float64(0.5 - x), log(x), Float64(x - 0.91893853320467))))
end
code[x_, y_, z_] := N[(N[(N[(z * N[(y - -0.0007936500793651), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] / x), $MachinePrecision] * z + N[(N[(0.083333333333333 / x), $MachinePrecision] - N[(N[(0.5 - x), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(x - 0.91893853320467), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(\frac{\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right)}{x}, z, \frac{0.083333333333333}{x} - \mathsf{fma}\left(0.5 - x, \log x, x - 0.91893853320467\right)\right)
\end{array}
Derivation
  1. Initial program 94.1%

    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  2. Applied rewrites98.0%

    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right)}{x}, z, \frac{0.083333333333333}{x} - \mathsf{fma}\left(0.5 - x, \log x, x - 0.91893853320467\right)\right)} \]
  3. Add Preprocessing

Alternative 3: 95.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333 \leq 10^{+299}:\\ \;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, \left(0.91893853320467 - x\right) - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.0007936500793651 - y, z, 0.0027777777777778\right), z, -0.083333333333333\right)}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z, \frac{\mathsf{fma}\left(z, y, 0.0007936500793651 \cdot z\right)}{x}, \frac{0.083333333333333}{x}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<=
      (+
       (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
       0.083333333333333)
      1e+299)
   (fma
    (- x 0.5)
    (log x)
    (-
     (- 0.91893853320467 x)
     (/
      (fma
       (fma (- -0.0007936500793651 y) z 0.0027777777777778)
       z
       -0.083333333333333)
      x)))
   (fma z (/ (fma z y (* 0.0007936500793651 z)) x) (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
	double tmp;
	if ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) <= 1e+299) {
		tmp = fma((x - 0.5), log(x), ((0.91893853320467 - x) - (fma(fma((-0.0007936500793651 - y), z, 0.0027777777777778), z, -0.083333333333333) / x)));
	} else {
		tmp = fma(z, (fma(z, y, (0.0007936500793651 * z)) / x), (0.083333333333333 / x));
	}
	return tmp;
}
function code(x, y, z)
	tmp = 0.0
	if (Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) <= 1e+299)
		tmp = fma(Float64(x - 0.5), log(x), Float64(Float64(0.91893853320467 - x) - Float64(fma(fma(Float64(-0.0007936500793651 - y), z, 0.0027777777777778), z, -0.083333333333333) / x)));
	else
		tmp = fma(z, Float64(fma(z, y, Float64(0.0007936500793651 * z)) / x), Float64(0.083333333333333 / x));
	end
	return tmp
end
code[x_, y_, z_] := If[LessEqual[N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision], 1e+299], N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(N[(0.91893853320467 - x), $MachinePrecision] - N[(N[(N[(N[(-0.0007936500793651 - y), $MachinePrecision] * z + 0.0027777777777778), $MachinePrecision] * z + -0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(z * y + N[(0.0007936500793651 * z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333 \leq 10^{+299}:\\
\;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, \left(0.91893853320467 - x\right) - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.0007936500793651 - y, z, 0.0027777777777778\right), z, -0.083333333333333\right)}{x}\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{\mathsf{fma}\left(z, y, 0.0007936500793651 \cdot z\right)}{x}, \frac{0.083333333333333}{x}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) < 1.0000000000000001e299

    1. Initial program 94.1%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Applied rewrites94.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x - 0.5, \log x, \left(0.91893853320467 - x\right) - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.0007936500793651 - y, z, 0.0027777777777778\right), z, -0.083333333333333\right)}{x}\right)} \]

    if 1.0000000000000001e299 < (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64))

    1. Initial program 94.1%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{\color{blue}{x}} \]
      2. lower-+.f64N/A

        \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
      4. lower--.f64N/A

        \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
      5. lower-*.f64N/A

        \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
      6. lower-+.f6463.3

        \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
    4. Applied rewrites63.3%

      \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
    5. Applied rewrites64.5%

      \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{\mathsf{fma}\left(y - -0.0007936500793651, z, -0.0027777777777778\right)}{x}}, \frac{0.083333333333333}{x}\right) \]
    6. Taylor expanded in z around inf

      \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
      2. lower-+.f6464.1

        \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(0.0007936500793651 + y\right)}{x}, \frac{0.083333333333333}{x}\right) \]
    8. Applied rewrites64.1%

      \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(0.0007936500793651 + y\right)}{x}, \frac{0.083333333333333}{x}\right) \]
    9. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
      2. lift-+.f64N/A

        \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(y + \frac{7936500793651}{10000000000000000}\right)}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
      4. distribute-lft-inN/A

        \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot y + z \cdot \frac{7936500793651}{10000000000000000}}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(z, \frac{\mathsf{fma}\left(z, y, z \cdot \frac{7936500793651}{10000000000000000}\right)}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z, \frac{\mathsf{fma}\left(z, y, \frac{7936500793651}{10000000000000000} \cdot z\right)}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
      7. lower-*.f6464.1

        \[\leadsto \mathsf{fma}\left(z, \frac{\mathsf{fma}\left(z, y, 0.0007936500793651 \cdot z\right)}{x}, \frac{0.083333333333333}{x}\right) \]
    10. Applied rewrites64.1%

      \[\leadsto \mathsf{fma}\left(z, \frac{\mathsf{fma}\left(z, y, 0.0007936500793651 \cdot z\right)}{x}, \frac{0.083333333333333}{x}\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 4: 95.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(x - 0.5, \log x, 0.91893853320467\right) - \left(x - \frac{\mathsf{fma}\left(y \cdot z, z, 0.083333333333333\right)}{x}\right)\\ \mathbf{if}\;y \leq -0.00078:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-92}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{x} - x \cdot \left(1 + \log \left(\frac{1}{x}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0
         (-
          (fma (- x 0.5) (log x) 0.91893853320467)
          (- x (/ (fma (* y z) z 0.083333333333333) x)))))
   (if (<= y -0.00078)
     t_0
     (if (<= y 1.2e-92)
       (fma
        (fma z 0.0007936500793651 -0.0027777777777778)
        (/ z x)
        (- (/ 0.083333333333333 x) (* x (+ 1.0 (log (/ 1.0 x))))))
       t_0))))
double code(double x, double y, double z) {
	double t_0 = fma((x - 0.5), log(x), 0.91893853320467) - (x - (fma((y * z), z, 0.083333333333333) / x));
	double tmp;
	if (y <= -0.00078) {
		tmp = t_0;
	} else if (y <= 1.2e-92) {
		tmp = fma(fma(z, 0.0007936500793651, -0.0027777777777778), (z / x), ((0.083333333333333 / x) - (x * (1.0 + log((1.0 / x))))));
	} else {
		tmp = t_0;
	}
	return tmp;
}
function code(x, y, z)
	t_0 = Float64(fma(Float64(x - 0.5), log(x), 0.91893853320467) - Float64(x - Float64(fma(Float64(y * z), z, 0.083333333333333) / x)))
	tmp = 0.0
	if (y <= -0.00078)
		tmp = t_0;
	elseif (y <= 1.2e-92)
		tmp = fma(fma(z, 0.0007936500793651, -0.0027777777777778), Float64(z / x), Float64(Float64(0.083333333333333 / x) - Float64(x * Float64(1.0 + log(Float64(1.0 / x))))));
	else
		tmp = t_0;
	end
	return tmp
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + 0.91893853320467), $MachinePrecision] - N[(x - N[(N[(N[(y * z), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -0.00078], t$95$0, If[LessEqual[y, 1.2e-92], N[(N[(z * 0.0007936500793651 + -0.0027777777777778), $MachinePrecision] * N[(z / x), $MachinePrecision] + N[(N[(0.083333333333333 / x), $MachinePrecision] - N[(x * N[(1.0 + N[Log[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(x - 0.5, \log x, 0.91893853320467\right) - \left(x - \frac{\mathsf{fma}\left(y \cdot z, z, 0.083333333333333\right)}{x}\right)\\
\mathbf{if}\;y \leq -0.00078:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;y \leq 1.2 \cdot 10^{-92}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{x} - x \cdot \left(1 + \log \left(\frac{1}{x}\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.79999999999999986e-4 or 1.2000000000000001e-92 < y

    1. Initial program 94.1%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in y around inf

      \[\leadsto \left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right) + \frac{\color{blue}{\left(y \cdot z\right)} \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
    3. Step-by-step derivation
      1. lower-*.f6482.4

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(y \cdot \color{blue}{z}\right) \cdot z + 0.083333333333333}{x} \]
    4. Applied rewrites82.4%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\color{blue}{\left(y \cdot z\right)} \cdot z + 0.083333333333333}{x} \]
    5. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right) + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x}} \]
      2. lift-+.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right)} + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
      3. lift--.f64N/A

        \[\leadsto \left(\color{blue}{\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right)} + \frac{91893853320467}{100000000000000}\right) + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
      4. associate-+l-N/A

        \[\leadsto \color{blue}{\left(\left(x - \frac{1}{2}\right) \cdot \log x - \left(x - \frac{91893853320467}{100000000000000}\right)\right)} + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
      5. lift-*.f64N/A

        \[\leadsto \left(\color{blue}{\left(x - \frac{1}{2}\right) \cdot \log x} - \left(x - \frac{91893853320467}{100000000000000}\right)\right) + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
      6. *-commutativeN/A

        \[\leadsto \left(\color{blue}{\log x \cdot \left(x - \frac{1}{2}\right)} - \left(x - \frac{91893853320467}{100000000000000}\right)\right) + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
      7. sub-negate-revN/A

        \[\leadsto \left(\log x \cdot \left(x - \frac{1}{2}\right) - \color{blue}{\left(\mathsf{neg}\left(\left(\frac{91893853320467}{100000000000000} - x\right)\right)\right)}\right) + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
      8. lift--.f64N/A

        \[\leadsto \left(\log x \cdot \left(x - \frac{1}{2}\right) - \left(\mathsf{neg}\left(\color{blue}{\left(\frac{91893853320467}{100000000000000} - x\right)}\right)\right)\right) + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
      9. add-flipN/A

        \[\leadsto \color{blue}{\left(\log x \cdot \left(x - \frac{1}{2}\right) + \left(\frac{91893853320467}{100000000000000} - x\right)\right)} + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
      10. lift--.f64N/A

        \[\leadsto \left(\log x \cdot \left(x - \frac{1}{2}\right) + \color{blue}{\left(\frac{91893853320467}{100000000000000} - x\right)}\right) + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
      11. associate-+r-N/A

        \[\leadsto \color{blue}{\left(\left(\log x \cdot \left(x - \frac{1}{2}\right) + \frac{91893853320467}{100000000000000}\right) - x\right)} + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
      12. associate-+l-N/A

        \[\leadsto \color{blue}{\left(\log x \cdot \left(x - \frac{1}{2}\right) + \frac{91893853320467}{100000000000000}\right) - \left(x - \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x}\right)} \]
      13. lower--.f64N/A

        \[\leadsto \color{blue}{\left(\log x \cdot \left(x - \frac{1}{2}\right) + \frac{91893853320467}{100000000000000}\right) - \left(x - \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x}\right)} \]
    6. Applied rewrites82.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x - 0.5, \log x, 0.91893853320467\right) - \left(x - \frac{\mathsf{fma}\left(y \cdot z, z, 0.083333333333333\right)}{x}\right)} \]

    if -7.79999999999999986e-4 < y < 1.2000000000000001e-92

    1. Initial program 94.1%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Applied rewrites98.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{x} - \mathsf{fma}\left(0.5 - x, \log x, x - 0.91893853320467\right)\right)} \]
    3. Taylor expanded in y around 0

      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(z, \color{blue}{\frac{7936500793651}{10000000000000000}}, \frac{-13888888888889}{5000000000000000}\right), \frac{z}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x} - \mathsf{fma}\left(\frac{1}{2} - x, \log x, x - \frac{91893853320467}{100000000000000}\right)\right) \]
    4. Step-by-step derivation
      1. Applied rewrites80.9%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(z, \color{blue}{0.0007936500793651}, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{x} - \mathsf{fma}\left(0.5 - x, \log x, x - 0.91893853320467\right)\right) \]
      2. Taylor expanded in x around inf

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000}, \frac{-13888888888889}{5000000000000000}\right), \frac{z}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x} - \color{blue}{x \cdot \left(1 + \log \left(\frac{1}{x}\right)\right)}\right) \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000}, \frac{-13888888888889}{5000000000000000}\right), \frac{z}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x} - x \cdot \color{blue}{\left(1 + \log \left(\frac{1}{x}\right)\right)}\right) \]
        2. lower-+.f64N/A

          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000}, \frac{-13888888888889}{5000000000000000}\right), \frac{z}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x} - x \cdot \left(1 + \color{blue}{\log \left(\frac{1}{x}\right)}\right)\right) \]
        3. lower-log.f64N/A

          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000}, \frac{-13888888888889}{5000000000000000}\right), \frac{z}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x} - x \cdot \left(1 + \log \left(\frac{1}{x}\right)\right)\right) \]
        4. lower-/.f6479.7

          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(z, 0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{x} - x \cdot \left(1 + \log \left(\frac{1}{x}\right)\right)\right) \]
      4. Applied rewrites79.7%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(z, 0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{x} - \color{blue}{x \cdot \left(1 + \log \left(\frac{1}{x}\right)\right)}\right) \]
    5. Recombined 2 regimes into one program.
    6. Add Preprocessing

    Alternative 5: 90.5% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+69}:\\ \;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, 0.91893853320467\right) - \left(x - \frac{\mathsf{fma}\left(y \cdot z, z, 0.083333333333333\right)}{x}\right)\\ \mathbf{elif}\;t\_0 \leq 10^{+180}:\\ \;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, \left(0.91893853320467 - x\right) - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.0007936500793651, z, 0.0027777777777778\right), z, -0.083333333333333\right)}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\left(y - -0.0007936500793651\right) \cdot z, \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (let* ((t_0
             (+
              (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
              0.083333333333333)))
       (if (<= t_0 -1e+69)
         (-
          (fma (- x 0.5) (log x) 0.91893853320467)
          (- x (/ (fma (* y z) z 0.083333333333333) x)))
         (if (<= t_0 1e+180)
           (fma
            (- x 0.5)
            (log x)
            (-
             (- 0.91893853320467 x)
             (/
              (fma
               (fma -0.0007936500793651 z 0.0027777777777778)
               z
               -0.083333333333333)
              x)))
           (fma
            (* (- y -0.0007936500793651) z)
            (/ z x)
            (/ 0.083333333333333 x))))))
    double code(double x, double y, double z) {
    	double t_0 = ((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333;
    	double tmp;
    	if (t_0 <= -1e+69) {
    		tmp = fma((x - 0.5), log(x), 0.91893853320467) - (x - (fma((y * z), z, 0.083333333333333) / x));
    	} else if (t_0 <= 1e+180) {
    		tmp = fma((x - 0.5), log(x), ((0.91893853320467 - x) - (fma(fma(-0.0007936500793651, z, 0.0027777777777778), z, -0.083333333333333) / x)));
    	} else {
    		tmp = fma(((y - -0.0007936500793651) * z), (z / x), (0.083333333333333 / x));
    	}
    	return tmp;
    }
    
    function code(x, y, z)
    	t_0 = Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333)
    	tmp = 0.0
    	if (t_0 <= -1e+69)
    		tmp = Float64(fma(Float64(x - 0.5), log(x), 0.91893853320467) - Float64(x - Float64(fma(Float64(y * z), z, 0.083333333333333) / x)));
    	elseif (t_0 <= 1e+180)
    		tmp = fma(Float64(x - 0.5), log(x), Float64(Float64(0.91893853320467 - x) - Float64(fma(fma(-0.0007936500793651, z, 0.0027777777777778), z, -0.083333333333333) / x)));
    	else
    		tmp = fma(Float64(Float64(y - -0.0007936500793651) * z), Float64(z / x), Float64(0.083333333333333 / x));
    	end
    	return tmp
    end
    
    code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+69], N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + 0.91893853320467), $MachinePrecision] - N[(x - N[(N[(N[(y * z), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+180], N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(N[(0.91893853320467 - x), $MachinePrecision] - N[(N[(N[(-0.0007936500793651 * z + 0.0027777777777778), $MachinePrecision] * z + -0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y - -0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] * N[(z / x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333\\
    \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+69}:\\
    \;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, 0.91893853320467\right) - \left(x - \frac{\mathsf{fma}\left(y \cdot z, z, 0.083333333333333\right)}{x}\right)\\
    
    \mathbf{elif}\;t\_0 \leq 10^{+180}:\\
    \;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, \left(0.91893853320467 - x\right) - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.0007936500793651, z, 0.0027777777777778\right), z, -0.083333333333333\right)}{x}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(\left(y - -0.0007936500793651\right) \cdot z, \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) < -1.0000000000000001e69

      1. Initial program 94.1%

        \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. Taylor expanded in y around inf

        \[\leadsto \left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right) + \frac{\color{blue}{\left(y \cdot z\right)} \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
      3. Step-by-step derivation
        1. lower-*.f6482.4

          \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(y \cdot \color{blue}{z}\right) \cdot z + 0.083333333333333}{x} \]
      4. Applied rewrites82.4%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\color{blue}{\left(y \cdot z\right)} \cdot z + 0.083333333333333}{x} \]
      5. Step-by-step derivation
        1. lift-+.f64N/A

          \[\leadsto \color{blue}{\left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right) + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x}} \]
        2. lift-+.f64N/A

          \[\leadsto \color{blue}{\left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right)} + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
        3. lift--.f64N/A

          \[\leadsto \left(\color{blue}{\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right)} + \frac{91893853320467}{100000000000000}\right) + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
        4. associate-+l-N/A

          \[\leadsto \color{blue}{\left(\left(x - \frac{1}{2}\right) \cdot \log x - \left(x - \frac{91893853320467}{100000000000000}\right)\right)} + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
        5. lift-*.f64N/A

          \[\leadsto \left(\color{blue}{\left(x - \frac{1}{2}\right) \cdot \log x} - \left(x - \frac{91893853320467}{100000000000000}\right)\right) + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
        6. *-commutativeN/A

          \[\leadsto \left(\color{blue}{\log x \cdot \left(x - \frac{1}{2}\right)} - \left(x - \frac{91893853320467}{100000000000000}\right)\right) + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
        7. sub-negate-revN/A

          \[\leadsto \left(\log x \cdot \left(x - \frac{1}{2}\right) - \color{blue}{\left(\mathsf{neg}\left(\left(\frac{91893853320467}{100000000000000} - x\right)\right)\right)}\right) + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
        8. lift--.f64N/A

          \[\leadsto \left(\log x \cdot \left(x - \frac{1}{2}\right) - \left(\mathsf{neg}\left(\color{blue}{\left(\frac{91893853320467}{100000000000000} - x\right)}\right)\right)\right) + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
        9. add-flipN/A

          \[\leadsto \color{blue}{\left(\log x \cdot \left(x - \frac{1}{2}\right) + \left(\frac{91893853320467}{100000000000000} - x\right)\right)} + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
        10. lift--.f64N/A

          \[\leadsto \left(\log x \cdot \left(x - \frac{1}{2}\right) + \color{blue}{\left(\frac{91893853320467}{100000000000000} - x\right)}\right) + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
        11. associate-+r-N/A

          \[\leadsto \color{blue}{\left(\left(\log x \cdot \left(x - \frac{1}{2}\right) + \frac{91893853320467}{100000000000000}\right) - x\right)} + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
        12. associate-+l-N/A

          \[\leadsto \color{blue}{\left(\log x \cdot \left(x - \frac{1}{2}\right) + \frac{91893853320467}{100000000000000}\right) - \left(x - \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x}\right)} \]
        13. lower--.f64N/A

          \[\leadsto \color{blue}{\left(\log x \cdot \left(x - \frac{1}{2}\right) + \frac{91893853320467}{100000000000000}\right) - \left(x - \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x}\right)} \]
      6. Applied rewrites82.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - 0.5, \log x, 0.91893853320467\right) - \left(x - \frac{\mathsf{fma}\left(y \cdot z, z, 0.083333333333333\right)}{x}\right)} \]

      if -1.0000000000000001e69 < (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) < 1e180

      1. Initial program 94.1%

        \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. Applied rewrites94.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - 0.5, \log x, \left(0.91893853320467 - x\right) - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.0007936500793651 - y, z, 0.0027777777777778\right), z, -0.083333333333333\right)}{x}\right)} \]
      3. Taylor expanded in y around 0

        \[\leadsto \mathsf{fma}\left(x - \frac{1}{2}, \log x, \left(\frac{91893853320467}{100000000000000} - x\right) - \frac{\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\frac{-7936500793651}{10000000000000000}}, z, \frac{13888888888889}{5000000000000000}\right), z, \frac{-83333333333333}{1000000000000000}\right)}{x}\right) \]
      4. Step-by-step derivation
        1. Applied rewrites78.6%

          \[\leadsto \mathsf{fma}\left(x - 0.5, \log x, \left(0.91893853320467 - x\right) - \frac{\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{-0.0007936500793651}, z, 0.0027777777777778\right), z, -0.083333333333333\right)}{x}\right) \]

        if 1e180 < (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64))

        1. Initial program 94.1%

          \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
        2. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{\color{blue}{x}} \]
          2. lower-+.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          3. lower-*.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          4. lower--.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          5. lower-*.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          6. lower-+.f6463.3

            \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
        4. Applied rewrites63.3%

          \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
        5. Applied rewrites64.5%

          \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{\mathsf{fma}\left(y - -0.0007936500793651, z, -0.0027777777777778\right)}{x}}, \frac{0.083333333333333}{x}\right) \]
        6. Taylor expanded in z around inf

          \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
        7. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
          2. lower-+.f6464.1

            \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(0.0007936500793651 + y\right)}{x}, \frac{0.083333333333333}{x}\right) \]
        8. Applied rewrites64.1%

          \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(0.0007936500793651 + y\right)}{x}, \frac{0.083333333333333}{x}\right) \]
        9. Step-by-step derivation
          1. lift-fma.f64N/A

            \[\leadsto z \cdot \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x} + \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} \]
          2. *-commutativeN/A

            \[\leadsto \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x} \cdot z + \frac{\color{blue}{\frac{83333333333333}{1000000000000000}}}{x} \]
          3. lift-/.f64N/A

            \[\leadsto \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x} \cdot z + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
          4. mult-flipN/A

            \[\leadsto \left(\left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \frac{1}{x}\right) \cdot z + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
          5. lift-/.f64N/A

            \[\leadsto \left(\left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \frac{1}{x}\right) \cdot z + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
          6. associate-*l*N/A

            \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \left(\frac{1}{x} \cdot z\right) + \frac{\color{blue}{\frac{83333333333333}{1000000000000000}}}{x} \]
          7. *-commutativeN/A

            \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \left(z \cdot \frac{1}{x}\right) + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
          8. lift-/.f64N/A

            \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \left(z \cdot \frac{1}{x}\right) + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
          9. mult-flipN/A

            \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \frac{z}{x} + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
          10. lift-/.f64N/A

            \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \frac{z}{x} + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
          11. lower-fma.f6464.9

            \[\leadsto \mathsf{fma}\left(z \cdot \left(0.0007936500793651 + y\right), \color{blue}{\frac{z}{x}}, \frac{0.083333333333333}{x}\right) \]
        10. Applied rewrites64.9%

          \[\leadsto \mathsf{fma}\left(\left(y - -0.0007936500793651\right) \cdot z, \color{blue}{\frac{z}{x}}, \frac{0.083333333333333}{x}\right) \]
      5. Recombined 3 regimes into one program.
      6. Add Preprocessing

      Alternative 6: 88.9% accurate, 0.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333 \leq 10^{+31}:\\ \;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, 0.91893853320467\right) - \left(x - \frac{\mathsf{fma}\left(y \cdot z, z, 0.083333333333333\right)}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\left(y - -0.0007936500793651\right) \cdot z, \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\ \end{array} \end{array} \]
      (FPCore (x y z)
       :precision binary64
       (if (<=
            (+
             (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
             0.083333333333333)
            1e+31)
         (-
          (fma (- x 0.5) (log x) 0.91893853320467)
          (- x (/ (fma (* y z) z 0.083333333333333) x)))
         (fma (* (- y -0.0007936500793651) z) (/ z x) (/ 0.083333333333333 x))))
      double code(double x, double y, double z) {
      	double tmp;
      	if ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) <= 1e+31) {
      		tmp = fma((x - 0.5), log(x), 0.91893853320467) - (x - (fma((y * z), z, 0.083333333333333) / x));
      	} else {
      		tmp = fma(((y - -0.0007936500793651) * z), (z / x), (0.083333333333333 / x));
      	}
      	return tmp;
      }
      
      function code(x, y, z)
      	tmp = 0.0
      	if (Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) <= 1e+31)
      		tmp = Float64(fma(Float64(x - 0.5), log(x), 0.91893853320467) - Float64(x - Float64(fma(Float64(y * z), z, 0.083333333333333) / x)));
      	else
      		tmp = fma(Float64(Float64(y - -0.0007936500793651) * z), Float64(z / x), Float64(0.083333333333333 / x));
      	end
      	return tmp
      end
      
      code[x_, y_, z_] := If[LessEqual[N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision], 1e+31], N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + 0.91893853320467), $MachinePrecision] - N[(x - N[(N[(N[(y * z), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y - -0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] * N[(z / x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333 \leq 10^{+31}:\\
      \;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, 0.91893853320467\right) - \left(x - \frac{\mathsf{fma}\left(y \cdot z, z, 0.083333333333333\right)}{x}\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(\left(y - -0.0007936500793651\right) \cdot z, \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) < 9.9999999999999996e30

        1. Initial program 94.1%

          \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
        2. Taylor expanded in y around inf

          \[\leadsto \left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right) + \frac{\color{blue}{\left(y \cdot z\right)} \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
        3. Step-by-step derivation
          1. lower-*.f6482.4

            \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(y \cdot \color{blue}{z}\right) \cdot z + 0.083333333333333}{x} \]
        4. Applied rewrites82.4%

          \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\color{blue}{\left(y \cdot z\right)} \cdot z + 0.083333333333333}{x} \]
        5. Step-by-step derivation
          1. lift-+.f64N/A

            \[\leadsto \color{blue}{\left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right) + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x}} \]
          2. lift-+.f64N/A

            \[\leadsto \color{blue}{\left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right)} + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
          3. lift--.f64N/A

            \[\leadsto \left(\color{blue}{\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right)} + \frac{91893853320467}{100000000000000}\right) + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
          4. associate-+l-N/A

            \[\leadsto \color{blue}{\left(\left(x - \frac{1}{2}\right) \cdot \log x - \left(x - \frac{91893853320467}{100000000000000}\right)\right)} + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
          5. lift-*.f64N/A

            \[\leadsto \left(\color{blue}{\left(x - \frac{1}{2}\right) \cdot \log x} - \left(x - \frac{91893853320467}{100000000000000}\right)\right) + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
          6. *-commutativeN/A

            \[\leadsto \left(\color{blue}{\log x \cdot \left(x - \frac{1}{2}\right)} - \left(x - \frac{91893853320467}{100000000000000}\right)\right) + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
          7. sub-negate-revN/A

            \[\leadsto \left(\log x \cdot \left(x - \frac{1}{2}\right) - \color{blue}{\left(\mathsf{neg}\left(\left(\frac{91893853320467}{100000000000000} - x\right)\right)\right)}\right) + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
          8. lift--.f64N/A

            \[\leadsto \left(\log x \cdot \left(x - \frac{1}{2}\right) - \left(\mathsf{neg}\left(\color{blue}{\left(\frac{91893853320467}{100000000000000} - x\right)}\right)\right)\right) + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
          9. add-flipN/A

            \[\leadsto \color{blue}{\left(\log x \cdot \left(x - \frac{1}{2}\right) + \left(\frac{91893853320467}{100000000000000} - x\right)\right)} + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
          10. lift--.f64N/A

            \[\leadsto \left(\log x \cdot \left(x - \frac{1}{2}\right) + \color{blue}{\left(\frac{91893853320467}{100000000000000} - x\right)}\right) + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
          11. associate-+r-N/A

            \[\leadsto \color{blue}{\left(\left(\log x \cdot \left(x - \frac{1}{2}\right) + \frac{91893853320467}{100000000000000}\right) - x\right)} + \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
          12. associate-+l-N/A

            \[\leadsto \color{blue}{\left(\log x \cdot \left(x - \frac{1}{2}\right) + \frac{91893853320467}{100000000000000}\right) - \left(x - \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x}\right)} \]
          13. lower--.f64N/A

            \[\leadsto \color{blue}{\left(\log x \cdot \left(x - \frac{1}{2}\right) + \frac{91893853320467}{100000000000000}\right) - \left(x - \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x}\right)} \]
        6. Applied rewrites82.4%

          \[\leadsto \color{blue}{\mathsf{fma}\left(x - 0.5, \log x, 0.91893853320467\right) - \left(x - \frac{\mathsf{fma}\left(y \cdot z, z, 0.083333333333333\right)}{x}\right)} \]

        if 9.9999999999999996e30 < (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64))

        1. Initial program 94.1%

          \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
        2. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{\color{blue}{x}} \]
          2. lower-+.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          3. lower-*.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          4. lower--.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          5. lower-*.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          6. lower-+.f6463.3

            \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
        4. Applied rewrites63.3%

          \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
        5. Applied rewrites64.5%

          \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{\mathsf{fma}\left(y - -0.0007936500793651, z, -0.0027777777777778\right)}{x}}, \frac{0.083333333333333}{x}\right) \]
        6. Taylor expanded in z around inf

          \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
        7. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
          2. lower-+.f6464.1

            \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(0.0007936500793651 + y\right)}{x}, \frac{0.083333333333333}{x}\right) \]
        8. Applied rewrites64.1%

          \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(0.0007936500793651 + y\right)}{x}, \frac{0.083333333333333}{x}\right) \]
        9. Step-by-step derivation
          1. lift-fma.f64N/A

            \[\leadsto z \cdot \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x} + \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} \]
          2. *-commutativeN/A

            \[\leadsto \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x} \cdot z + \frac{\color{blue}{\frac{83333333333333}{1000000000000000}}}{x} \]
          3. lift-/.f64N/A

            \[\leadsto \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x} \cdot z + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
          4. mult-flipN/A

            \[\leadsto \left(\left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \frac{1}{x}\right) \cdot z + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
          5. lift-/.f64N/A

            \[\leadsto \left(\left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \frac{1}{x}\right) \cdot z + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
          6. associate-*l*N/A

            \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \left(\frac{1}{x} \cdot z\right) + \frac{\color{blue}{\frac{83333333333333}{1000000000000000}}}{x} \]
          7. *-commutativeN/A

            \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \left(z \cdot \frac{1}{x}\right) + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
          8. lift-/.f64N/A

            \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \left(z \cdot \frac{1}{x}\right) + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
          9. mult-flipN/A

            \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \frac{z}{x} + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
          10. lift-/.f64N/A

            \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \frac{z}{x} + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
          11. lower-fma.f6464.9

            \[\leadsto \mathsf{fma}\left(z \cdot \left(0.0007936500793651 + y\right), \color{blue}{\frac{z}{x}}, \frac{0.083333333333333}{x}\right) \]
        10. Applied rewrites64.9%

          \[\leadsto \mathsf{fma}\left(\left(y - -0.0007936500793651\right) \cdot z, \color{blue}{\frac{z}{x}}, \frac{0.083333333333333}{x}\right) \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 7: 86.7% accurate, 0.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+69}:\\ \;\;\;\;\mathsf{fma}\left(z, \frac{y \cdot z}{x}, \frac{0.083333333333333}{x}\right)\\ \mathbf{elif}\;t\_0 \leq 10^{+31}:\\ \;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, \left(0.91893853320467 - x\right) - \frac{-0.083333333333333}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\left(y - -0.0007936500793651\right) \cdot z, \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\ \end{array} \end{array} \]
      (FPCore (x y z)
       :precision binary64
       (let* ((t_0
               (+
                (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
                0.083333333333333)))
         (if (<= t_0 -1e+69)
           (fma z (/ (* y z) x) (/ 0.083333333333333 x))
           (if (<= t_0 1e+31)
             (fma
              (- x 0.5)
              (log x)
              (- (- 0.91893853320467 x) (/ -0.083333333333333 x)))
             (fma
              (* (- y -0.0007936500793651) z)
              (/ z x)
              (/ 0.083333333333333 x))))))
      double code(double x, double y, double z) {
      	double t_0 = ((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333;
      	double tmp;
      	if (t_0 <= -1e+69) {
      		tmp = fma(z, ((y * z) / x), (0.083333333333333 / x));
      	} else if (t_0 <= 1e+31) {
      		tmp = fma((x - 0.5), log(x), ((0.91893853320467 - x) - (-0.083333333333333 / x)));
      	} else {
      		tmp = fma(((y - -0.0007936500793651) * z), (z / x), (0.083333333333333 / x));
      	}
      	return tmp;
      }
      
      function code(x, y, z)
      	t_0 = Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333)
      	tmp = 0.0
      	if (t_0 <= -1e+69)
      		tmp = fma(z, Float64(Float64(y * z) / x), Float64(0.083333333333333 / x));
      	elseif (t_0 <= 1e+31)
      		tmp = fma(Float64(x - 0.5), log(x), Float64(Float64(0.91893853320467 - x) - Float64(-0.083333333333333 / x)));
      	else
      		tmp = fma(Float64(Float64(y - -0.0007936500793651) * z), Float64(z / x), Float64(0.083333333333333 / x));
      	end
      	return tmp
      end
      
      code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+69], N[(z * N[(N[(y * z), $MachinePrecision] / x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+31], N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(N[(0.91893853320467 - x), $MachinePrecision] - N[(-0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y - -0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] * N[(z / x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333\\
      \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+69}:\\
      \;\;\;\;\mathsf{fma}\left(z, \frac{y \cdot z}{x}, \frac{0.083333333333333}{x}\right)\\
      
      \mathbf{elif}\;t\_0 \leq 10^{+31}:\\
      \;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, \left(0.91893853320467 - x\right) - \frac{-0.083333333333333}{x}\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(\left(y - -0.0007936500793651\right) \cdot z, \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) < -1.0000000000000001e69

        1. Initial program 94.1%

          \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
        2. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{\color{blue}{x}} \]
          2. lower-+.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          3. lower-*.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          4. lower--.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          5. lower-*.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          6. lower-+.f6463.3

            \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
        4. Applied rewrites63.3%

          \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
        5. Applied rewrites64.5%

          \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{\mathsf{fma}\left(y - -0.0007936500793651, z, -0.0027777777777778\right)}{x}}, \frac{0.083333333333333}{x}\right) \]
        6. Taylor expanded in y around inf

          \[\leadsto \mathsf{fma}\left(z, \frac{y \cdot z}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
        7. Step-by-step derivation
          1. lower-*.f6450.0

            \[\leadsto \mathsf{fma}\left(z, \frac{y \cdot z}{x}, \frac{0.083333333333333}{x}\right) \]
        8. Applied rewrites50.0%

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

        if -1.0000000000000001e69 < (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) < 9.9999999999999996e30

        1. Initial program 94.1%

          \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
        2. Applied rewrites94.1%

          \[\leadsto \color{blue}{\mathsf{fma}\left(x - 0.5, \log x, \left(0.91893853320467 - x\right) - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.0007936500793651 - y, z, 0.0027777777777778\right), z, -0.083333333333333\right)}{x}\right)} \]
        3. Taylor expanded in z around 0

          \[\leadsto \mathsf{fma}\left(x - \frac{1}{2}, \log x, \left(\frac{91893853320467}{100000000000000} - x\right) - \frac{\color{blue}{\frac{-83333333333333}{1000000000000000}}}{x}\right) \]
        4. Step-by-step derivation
          1. Applied rewrites57.6%

            \[\leadsto \mathsf{fma}\left(x - 0.5, \log x, \left(0.91893853320467 - x\right) - \frac{\color{blue}{-0.083333333333333}}{x}\right) \]

          if 9.9999999999999996e30 < (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64))

          1. Initial program 94.1%

            \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
          2. Taylor expanded in x around 0

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{\color{blue}{x}} \]
            2. lower-+.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            3. lower-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            4. lower--.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            5. lower-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            6. lower-+.f6463.3

              \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
          4. Applied rewrites63.3%

            \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
          5. Applied rewrites64.5%

            \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{\mathsf{fma}\left(y - -0.0007936500793651, z, -0.0027777777777778\right)}{x}}, \frac{0.083333333333333}{x}\right) \]
          6. Taylor expanded in z around inf

            \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
          7. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
            2. lower-+.f6464.1

              \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(0.0007936500793651 + y\right)}{x}, \frac{0.083333333333333}{x}\right) \]
          8. Applied rewrites64.1%

            \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(0.0007936500793651 + y\right)}{x}, \frac{0.083333333333333}{x}\right) \]
          9. Step-by-step derivation
            1. lift-fma.f64N/A

              \[\leadsto z \cdot \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x} + \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} \]
            2. *-commutativeN/A

              \[\leadsto \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x} \cdot z + \frac{\color{blue}{\frac{83333333333333}{1000000000000000}}}{x} \]
            3. lift-/.f64N/A

              \[\leadsto \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x} \cdot z + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
            4. mult-flipN/A

              \[\leadsto \left(\left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \frac{1}{x}\right) \cdot z + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
            5. lift-/.f64N/A

              \[\leadsto \left(\left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \frac{1}{x}\right) \cdot z + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
            6. associate-*l*N/A

              \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \left(\frac{1}{x} \cdot z\right) + \frac{\color{blue}{\frac{83333333333333}{1000000000000000}}}{x} \]
            7. *-commutativeN/A

              \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \left(z \cdot \frac{1}{x}\right) + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
            8. lift-/.f64N/A

              \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \left(z \cdot \frac{1}{x}\right) + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
            9. mult-flipN/A

              \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \frac{z}{x} + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
            10. lift-/.f64N/A

              \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \frac{z}{x} + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
            11. lower-fma.f6464.9

              \[\leadsto \mathsf{fma}\left(z \cdot \left(0.0007936500793651 + y\right), \color{blue}{\frac{z}{x}}, \frac{0.083333333333333}{x}\right) \]
          10. Applied rewrites64.9%

            \[\leadsto \mathsf{fma}\left(\left(y - -0.0007936500793651\right) \cdot z, \color{blue}{\frac{z}{x}}, \frac{0.083333333333333}{x}\right) \]
        5. Recombined 3 regimes into one program.
        6. Add Preprocessing

        Alternative 8: 83.5% accurate, 1.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.9 \cdot 10^{+99}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, -1 \cdot x\right)\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= x 1.9e+99)
           (fma
            (fma z (- y -0.0007936500793651) -0.0027777777777778)
            (/ z x)
            (/ 0.083333333333333 x))
           (fma (- x 0.5) (log x) (* -1.0 x))))
        double code(double x, double y, double z) {
        	double tmp;
        	if (x <= 1.9e+99) {
        		tmp = fma(fma(z, (y - -0.0007936500793651), -0.0027777777777778), (z / x), (0.083333333333333 / x));
        	} else {
        		tmp = fma((x - 0.5), log(x), (-1.0 * x));
        	}
        	return tmp;
        }
        
        function code(x, y, z)
        	tmp = 0.0
        	if (x <= 1.9e+99)
        		tmp = fma(fma(z, Float64(y - -0.0007936500793651), -0.0027777777777778), Float64(z / x), Float64(0.083333333333333 / x));
        	else
        		tmp = fma(Float64(x - 0.5), log(x), Float64(-1.0 * x));
        	end
        	return tmp
        end
        
        code[x_, y_, z_] := If[LessEqual[x, 1.9e+99], N[(N[(z * N[(y - -0.0007936500793651), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] * N[(z / x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(-1.0 * x), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq 1.9 \cdot 10^{+99}:\\
        \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, -1 \cdot x\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < 1.9e99

          1. Initial program 94.1%

            \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
          2. Applied rewrites98.8%

            \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{x} - \mathsf{fma}\left(0.5 - x, \log x, x - 0.91893853320467\right)\right)} \]
          3. Taylor expanded in x around 0

            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(z, y - \frac{-7936500793651}{10000000000000000}, \frac{-13888888888889}{5000000000000000}\right), \frac{z}{x}, \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}}\right) \]
          4. Step-by-step derivation
            1. lower-/.f6465.3

              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{\color{blue}{x}}\right) \]
          5. Applied rewrites65.3%

            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \color{blue}{\frac{0.083333333333333}{x}}\right) \]

          if 1.9e99 < x

          1. Initial program 94.1%

            \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
          2. Applied rewrites94.1%

            \[\leadsto \color{blue}{\mathsf{fma}\left(x - 0.5, \log x, \left(0.91893853320467 - x\right) - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.0007936500793651 - y, z, 0.0027777777777778\right), z, -0.083333333333333\right)}{x}\right)} \]
          3. Taylor expanded in x around inf

            \[\leadsto \mathsf{fma}\left(x - \frac{1}{2}, \log x, \color{blue}{-1 \cdot x}\right) \]
          4. Step-by-step derivation
            1. lower-*.f6436.3

              \[\leadsto \mathsf{fma}\left(x - 0.5, \log x, -1 \cdot \color{blue}{x}\right) \]
          5. Applied rewrites36.3%

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

        Alternative 9: 83.1% accurate, 1.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.9 \cdot 10^{+99}:\\ \;\;\;\;\mathsf{fma}\left(z, \frac{\mathsf{fma}\left(y - -0.0007936500793651, z, -0.0027777777777778\right)}{x}, \frac{0.083333333333333}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, -1 \cdot x\right)\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= x 1.9e+99)
           (fma
            z
            (/ (fma (- y -0.0007936500793651) z -0.0027777777777778) x)
            (/ 0.083333333333333 x))
           (fma (- x 0.5) (log x) (* -1.0 x))))
        double code(double x, double y, double z) {
        	double tmp;
        	if (x <= 1.9e+99) {
        		tmp = fma(z, (fma((y - -0.0007936500793651), z, -0.0027777777777778) / x), (0.083333333333333 / x));
        	} else {
        		tmp = fma((x - 0.5), log(x), (-1.0 * x));
        	}
        	return tmp;
        }
        
        function code(x, y, z)
        	tmp = 0.0
        	if (x <= 1.9e+99)
        		tmp = fma(z, Float64(fma(Float64(y - -0.0007936500793651), z, -0.0027777777777778) / x), Float64(0.083333333333333 / x));
        	else
        		tmp = fma(Float64(x - 0.5), log(x), Float64(-1.0 * x));
        	end
        	return tmp
        end
        
        code[x_, y_, z_] := If[LessEqual[x, 1.9e+99], N[(z * N[(N[(N[(y - -0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] / x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(-1.0 * x), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq 1.9 \cdot 10^{+99}:\\
        \;\;\;\;\mathsf{fma}\left(z, \frac{\mathsf{fma}\left(y - -0.0007936500793651, z, -0.0027777777777778\right)}{x}, \frac{0.083333333333333}{x}\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, -1 \cdot x\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < 1.9e99

          1. Initial program 94.1%

            \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
          2. Taylor expanded in x around 0

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{\color{blue}{x}} \]
            2. lower-+.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            3. lower-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            4. lower--.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            5. lower-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            6. lower-+.f6463.3

              \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
          4. Applied rewrites63.3%

            \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
          5. Applied rewrites64.5%

            \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{\mathsf{fma}\left(y - -0.0007936500793651, z, -0.0027777777777778\right)}{x}}, \frac{0.083333333333333}{x}\right) \]

          if 1.9e99 < x

          1. Initial program 94.1%

            \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
          2. Applied rewrites94.1%

            \[\leadsto \color{blue}{\mathsf{fma}\left(x - 0.5, \log x, \left(0.91893853320467 - x\right) - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.0007936500793651 - y, z, 0.0027777777777778\right), z, -0.083333333333333\right)}{x}\right)} \]
          3. Taylor expanded in x around inf

            \[\leadsto \mathsf{fma}\left(x - \frac{1}{2}, \log x, \color{blue}{-1 \cdot x}\right) \]
          4. Step-by-step derivation
            1. lower-*.f6436.3

              \[\leadsto \mathsf{fma}\left(x - 0.5, \log x, -1 \cdot \color{blue}{x}\right) \]
          5. Applied rewrites36.3%

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

        Alternative 10: 83.0% accurate, 1.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.9 \cdot 10^{+99}:\\ \;\;\;\;\mathsf{fma}\left(\left(y - -0.0007936500793651\right) \cdot z, \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, -1 \cdot x\right)\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= x 1.9e+99)
           (fma (* (- y -0.0007936500793651) z) (/ z x) (/ 0.083333333333333 x))
           (fma (- x 0.5) (log x) (* -1.0 x))))
        double code(double x, double y, double z) {
        	double tmp;
        	if (x <= 1.9e+99) {
        		tmp = fma(((y - -0.0007936500793651) * z), (z / x), (0.083333333333333 / x));
        	} else {
        		tmp = fma((x - 0.5), log(x), (-1.0 * x));
        	}
        	return tmp;
        }
        
        function code(x, y, z)
        	tmp = 0.0
        	if (x <= 1.9e+99)
        		tmp = fma(Float64(Float64(y - -0.0007936500793651) * z), Float64(z / x), Float64(0.083333333333333 / x));
        	else
        		tmp = fma(Float64(x - 0.5), log(x), Float64(-1.0 * x));
        	end
        	return tmp
        end
        
        code[x_, y_, z_] := If[LessEqual[x, 1.9e+99], N[(N[(N[(y - -0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] * N[(z / x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(-1.0 * x), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq 1.9 \cdot 10^{+99}:\\
        \;\;\;\;\mathsf{fma}\left(\left(y - -0.0007936500793651\right) \cdot z, \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, -1 \cdot x\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < 1.9e99

          1. Initial program 94.1%

            \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
          2. Taylor expanded in x around 0

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{\color{blue}{x}} \]
            2. lower-+.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            3. lower-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            4. lower--.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            5. lower-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            6. lower-+.f6463.3

              \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
          4. Applied rewrites63.3%

            \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
          5. Applied rewrites64.5%

            \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{\mathsf{fma}\left(y - -0.0007936500793651, z, -0.0027777777777778\right)}{x}}, \frac{0.083333333333333}{x}\right) \]
          6. Taylor expanded in z around inf

            \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
          7. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
            2. lower-+.f6464.1

              \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(0.0007936500793651 + y\right)}{x}, \frac{0.083333333333333}{x}\right) \]
          8. Applied rewrites64.1%

            \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(0.0007936500793651 + y\right)}{x}, \frac{0.083333333333333}{x}\right) \]
          9. Step-by-step derivation
            1. lift-fma.f64N/A

              \[\leadsto z \cdot \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x} + \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} \]
            2. *-commutativeN/A

              \[\leadsto \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x} \cdot z + \frac{\color{blue}{\frac{83333333333333}{1000000000000000}}}{x} \]
            3. lift-/.f64N/A

              \[\leadsto \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x} \cdot z + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
            4. mult-flipN/A

              \[\leadsto \left(\left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \frac{1}{x}\right) \cdot z + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
            5. lift-/.f64N/A

              \[\leadsto \left(\left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \frac{1}{x}\right) \cdot z + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
            6. associate-*l*N/A

              \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \left(\frac{1}{x} \cdot z\right) + \frac{\color{blue}{\frac{83333333333333}{1000000000000000}}}{x} \]
            7. *-commutativeN/A

              \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \left(z \cdot \frac{1}{x}\right) + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
            8. lift-/.f64N/A

              \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \left(z \cdot \frac{1}{x}\right) + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
            9. mult-flipN/A

              \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \frac{z}{x} + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
            10. lift-/.f64N/A

              \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot \frac{z}{x} + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
            11. lower-fma.f6464.9

              \[\leadsto \mathsf{fma}\left(z \cdot \left(0.0007936500793651 + y\right), \color{blue}{\frac{z}{x}}, \frac{0.083333333333333}{x}\right) \]
          10. Applied rewrites64.9%

            \[\leadsto \mathsf{fma}\left(\left(y - -0.0007936500793651\right) \cdot z, \color{blue}{\frac{z}{x}}, \frac{0.083333333333333}{x}\right) \]

          if 1.9e99 < x

          1. Initial program 94.1%

            \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
          2. Applied rewrites94.1%

            \[\leadsto \color{blue}{\mathsf{fma}\left(x - 0.5, \log x, \left(0.91893853320467 - x\right) - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.0007936500793651 - y, z, 0.0027777777777778\right), z, -0.083333333333333\right)}{x}\right)} \]
          3. Taylor expanded in x around inf

            \[\leadsto \mathsf{fma}\left(x - \frac{1}{2}, \log x, \color{blue}{-1 \cdot x}\right) \]
          4. Step-by-step derivation
            1. lower-*.f6436.3

              \[\leadsto \mathsf{fma}\left(x - 0.5, \log x, -1 \cdot \color{blue}{x}\right) \]
          5. Applied rewrites36.3%

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

        Alternative 11: 82.7% accurate, 1.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.7 \cdot 10^{+99}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(y - -0.0007936500793651, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, -1 \cdot x\right)\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= x 1.7e+99)
           (/
            (fma
             (fma (- y -0.0007936500793651) z -0.0027777777777778)
             z
             0.083333333333333)
            x)
           (fma (- x 0.5) (log x) (* -1.0 x))))
        double code(double x, double y, double z) {
        	double tmp;
        	if (x <= 1.7e+99) {
        		tmp = fma(fma((y - -0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333) / x;
        	} else {
        		tmp = fma((x - 0.5), log(x), (-1.0 * x));
        	}
        	return tmp;
        }
        
        function code(x, y, z)
        	tmp = 0.0
        	if (x <= 1.7e+99)
        		tmp = Float64(fma(fma(Float64(y - -0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333) / x);
        	else
        		tmp = fma(Float64(x - 0.5), log(x), Float64(-1.0 * x));
        	end
        	return tmp
        end
        
        code[x_, y_, z_] := If[LessEqual[x, 1.7e+99], N[(N[(N[(N[(y - -0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision], N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(-1.0 * x), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq 1.7 \cdot 10^{+99}:\\
        \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(y - -0.0007936500793651, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, -1 \cdot x\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < 1.69999999999999992e99

          1. Initial program 94.1%

            \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
          2. Taylor expanded in x around 0

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{\color{blue}{x}} \]
            2. lower-+.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            3. lower-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            4. lower--.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            5. lower-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            6. lower-+.f6463.3

              \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
          4. Applied rewrites63.3%

            \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
          5. Step-by-step derivation
            1. lift-+.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            2. +-commutativeN/A

              \[\leadsto \frac{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}{x} \]
            3. lift-*.f64N/A

              \[\leadsto \frac{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}{x} \]
            4. *-commutativeN/A

              \[\leadsto \frac{\left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
            5. lift--.f64N/A

              \[\leadsto \frac{\left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
            6. lift-+.f64N/A

              \[\leadsto \frac{\left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
            7. +-commutativeN/A

              \[\leadsto \frac{\left(z \cdot \left(y + \frac{7936500793651}{10000000000000000}\right) - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
            8. add-flipN/A

              \[\leadsto \frac{\left(z \cdot \left(y - \left(\mathsf{neg}\left(\frac{7936500793651}{10000000000000000}\right)\right)\right) - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
            9. metadata-evalN/A

              \[\leadsto \frac{\left(z \cdot \left(y - \frac{-7936500793651}{10000000000000000}\right) - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
            10. lift--.f64N/A

              \[\leadsto \frac{\left(z \cdot \left(y - \frac{-7936500793651}{10000000000000000}\right) - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
            11. lower-*.f64N/A

              \[\leadsto \frac{\left(z \cdot \left(y - \frac{-7936500793651}{10000000000000000}\right) - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
            12. metadata-evalN/A

              \[\leadsto \frac{\left(z \cdot \left(y - \frac{-7936500793651}{10000000000000000}\right) - \left(\mathsf{neg}\left(\frac{-13888888888889}{5000000000000000}\right)\right)\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
            13. add-flipN/A

              \[\leadsto \frac{\left(z \cdot \left(y - \frac{-7936500793651}{10000000000000000}\right) + \frac{-13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
            14. lift-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z, y - \frac{-7936500793651}{10000000000000000}, \frac{-13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
            15. lift-fma.f6463.3

              \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), z, 0.083333333333333\right)}{x} \]
          6. Applied rewrites63.3%

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(y - -0.0007936500793651, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x} \]

          if 1.69999999999999992e99 < x

          1. Initial program 94.1%

            \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
          2. Applied rewrites94.1%

            \[\leadsto \color{blue}{\mathsf{fma}\left(x - 0.5, \log x, \left(0.91893853320467 - x\right) - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.0007936500793651 - y, z, 0.0027777777777778\right), z, -0.083333333333333\right)}{x}\right)} \]
          3. Taylor expanded in x around inf

            \[\leadsto \mathsf{fma}\left(x - \frac{1}{2}, \log x, \color{blue}{-1 \cdot x}\right) \]
          4. Step-by-step derivation
            1. lower-*.f6436.3

              \[\leadsto \mathsf{fma}\left(x - 0.5, \log x, -1 \cdot \color{blue}{x}\right) \]
          5. Applied rewrites36.3%

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

        Alternative 12: 63.3% accurate, 2.2× speedup?

        \[\begin{array}{l} \\ \frac{\mathsf{fma}\left(\mathsf{fma}\left(y - -0.0007936500793651, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (/
          (fma
           (fma (- y -0.0007936500793651) z -0.0027777777777778)
           z
           0.083333333333333)
          x))
        double code(double x, double y, double z) {
        	return fma(fma((y - -0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333) / x;
        }
        
        function code(x, y, z)
        	return Float64(fma(fma(Float64(y - -0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333) / x)
        end
        
        code[x_, y_, z_] := N[(N[(N[(N[(y - -0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]
        
        \begin{array}{l}
        
        \\
        \frac{\mathsf{fma}\left(\mathsf{fma}\left(y - -0.0007936500793651, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}
        \end{array}
        
        Derivation
        1. Initial program 94.1%

          \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
        2. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{\color{blue}{x}} \]
          2. lower-+.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          3. lower-*.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          4. lower--.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          5. lower-*.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          6. lower-+.f6463.3

            \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
        4. Applied rewrites63.3%

          \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
        5. Step-by-step derivation
          1. lift-+.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          2. +-commutativeN/A

            \[\leadsto \frac{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}{x} \]
          3. lift-*.f64N/A

            \[\leadsto \frac{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}{x} \]
          4. *-commutativeN/A

            \[\leadsto \frac{\left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
          5. lift--.f64N/A

            \[\leadsto \frac{\left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
          6. lift-+.f64N/A

            \[\leadsto \frac{\left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
          7. +-commutativeN/A

            \[\leadsto \frac{\left(z \cdot \left(y + \frac{7936500793651}{10000000000000000}\right) - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
          8. add-flipN/A

            \[\leadsto \frac{\left(z \cdot \left(y - \left(\mathsf{neg}\left(\frac{7936500793651}{10000000000000000}\right)\right)\right) - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
          9. metadata-evalN/A

            \[\leadsto \frac{\left(z \cdot \left(y - \frac{-7936500793651}{10000000000000000}\right) - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
          10. lift--.f64N/A

            \[\leadsto \frac{\left(z \cdot \left(y - \frac{-7936500793651}{10000000000000000}\right) - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
          11. lower-*.f64N/A

            \[\leadsto \frac{\left(z \cdot \left(y - \frac{-7936500793651}{10000000000000000}\right) - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
          12. metadata-evalN/A

            \[\leadsto \frac{\left(z \cdot \left(y - \frac{-7936500793651}{10000000000000000}\right) - \left(\mathsf{neg}\left(\frac{-13888888888889}{5000000000000000}\right)\right)\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
          13. add-flipN/A

            \[\leadsto \frac{\left(z \cdot \left(y - \frac{-7936500793651}{10000000000000000}\right) + \frac{-13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
          14. lift-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(z, y - \frac{-7936500793651}{10000000000000000}, \frac{-13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
          15. lift-fma.f6463.3

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), z, 0.083333333333333\right)}{x} \]
        6. Applied rewrites63.3%

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(y - -0.0007936500793651, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x} \]
        7. Add Preprocessing

        Alternative 13: 62.8% accurate, 2.5× speedup?

        \[\begin{array}{l} \\ \frac{\mathsf{fma}\left(\left(y - -0.0007936500793651\right) \cdot z, z, 0.083333333333333\right)}{x} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (/ (fma (* (- y -0.0007936500793651) z) z 0.083333333333333) x))
        double code(double x, double y, double z) {
        	return fma(((y - -0.0007936500793651) * z), z, 0.083333333333333) / x;
        }
        
        function code(x, y, z)
        	return Float64(fma(Float64(Float64(y - -0.0007936500793651) * z), z, 0.083333333333333) / x)
        end
        
        code[x_, y_, z_] := N[(N[(N[(N[(y - -0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]
        
        \begin{array}{l}
        
        \\
        \frac{\mathsf{fma}\left(\left(y - -0.0007936500793651\right) \cdot z, z, 0.083333333333333\right)}{x}
        \end{array}
        
        Derivation
        1. Initial program 94.1%

          \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
        2. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{\color{blue}{x}} \]
          2. lower-+.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          3. lower-*.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          4. lower--.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          5. lower-*.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          6. lower-+.f6463.3

            \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
        4. Applied rewrites63.3%

          \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
        5. Applied rewrites64.5%

          \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{\mathsf{fma}\left(y - -0.0007936500793651, z, -0.0027777777777778\right)}{x}}, \frac{0.083333333333333}{x}\right) \]
        6. Taylor expanded in z around inf

          \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
        7. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
          2. lower-+.f6464.1

            \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(0.0007936500793651 + y\right)}{x}, \frac{0.083333333333333}{x}\right) \]
        8. Applied rewrites64.1%

          \[\leadsto \mathsf{fma}\left(z, \frac{z \cdot \left(0.0007936500793651 + y\right)}{x}, \frac{0.083333333333333}{x}\right) \]
        9. Step-by-step derivation
          1. lift-fma.f64N/A

            \[\leadsto z \cdot \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x} + \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} \]
          2. lift-/.f64N/A

            \[\leadsto z \cdot \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x} + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
          3. associate-*r/N/A

            \[\leadsto \frac{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)}{x} + \frac{\color{blue}{\frac{83333333333333}{1000000000000000}}}{x} \]
          4. lift-/.f64N/A

            \[\leadsto \frac{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)}{x} + \frac{\frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
          5. div-add-revN/A

            \[\leadsto \frac{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) + \frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
          6. lower-/.f64N/A

            \[\leadsto \frac{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) + \frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
        10. Applied rewrites62.8%

          \[\leadsto \frac{\mathsf{fma}\left(\left(y - -0.0007936500793651\right) \cdot z, z, 0.083333333333333\right)}{\color{blue}{x}} \]
        11. Add Preprocessing

        Alternative 14: 33.3% accurate, 1.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333 \leq 500000000000:\\ \;\;\;\;\frac{0.083333333333333 + -0.0027777777777778 \cdot z}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot 0.083333333333333}{x \cdot x}\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<=
              (+
               (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
               0.083333333333333)
              500000000000.0)
           (/ (+ 0.083333333333333 (* -0.0027777777777778 z)) x)
           (/ (* x 0.083333333333333) (* x x))))
        double code(double x, double y, double z) {
        	double tmp;
        	if ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) <= 500000000000.0) {
        		tmp = (0.083333333333333 + (-0.0027777777777778 * z)) / x;
        	} else {
        		tmp = (x * 0.083333333333333) / (x * x);
        	}
        	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)
        use fmin_fmax_functions
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8) :: tmp
            if ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) <= 500000000000.0d0) then
                tmp = (0.083333333333333d0 + ((-0.0027777777777778d0) * z)) / x
            else
                tmp = (x * 0.083333333333333d0) / (x * x)
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z) {
        	double tmp;
        	if ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) <= 500000000000.0) {
        		tmp = (0.083333333333333 + (-0.0027777777777778 * z)) / x;
        	} else {
        		tmp = (x * 0.083333333333333) / (x * x);
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	tmp = 0
        	if (((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) <= 500000000000.0:
        		tmp = (0.083333333333333 + (-0.0027777777777778 * z)) / x
        	else:
        		tmp = (x * 0.083333333333333) / (x * x)
        	return tmp
        
        function code(x, y, z)
        	tmp = 0.0
        	if (Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) <= 500000000000.0)
        		tmp = Float64(Float64(0.083333333333333 + Float64(-0.0027777777777778 * z)) / x);
        	else
        		tmp = Float64(Float64(x * 0.083333333333333) / Float64(x * x));
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z)
        	tmp = 0.0;
        	if ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) <= 500000000000.0)
        		tmp = (0.083333333333333 + (-0.0027777777777778 * z)) / x;
        	else
        		tmp = (x * 0.083333333333333) / (x * x);
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_] := If[LessEqual[N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision], 500000000000.0], N[(N[(0.083333333333333 + N[(-0.0027777777777778 * z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(x * 0.083333333333333), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333 \leq 500000000000:\\
        \;\;\;\;\frac{0.083333333333333 + -0.0027777777777778 \cdot z}{x}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{x \cdot 0.083333333333333}{x \cdot x}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) < 5e11

          1. Initial program 94.1%

            \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
          2. Taylor expanded in x around 0

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{\color{blue}{x}} \]
            2. lower-+.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            3. lower-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            4. lower--.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            5. lower-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            6. lower-+.f6463.3

              \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
          4. Applied rewrites63.3%

            \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
          5. Taylor expanded in z around 0

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + \frac{-13888888888889}{5000000000000000} \cdot z}{x} \]
          6. Step-by-step derivation
            1. lower-*.f6429.3

              \[\leadsto \frac{0.083333333333333 + -0.0027777777777778 \cdot z}{x} \]
          7. Applied rewrites29.3%

            \[\leadsto \frac{0.083333333333333 + -0.0027777777777778 \cdot z}{x} \]

          if 5e11 < (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64))

          1. Initial program 94.1%

            \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
          2. Taylor expanded in x around 0

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{\color{blue}{x}} \]
            2. lower-+.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            3. lower-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            4. lower--.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            5. lower-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            6. lower-+.f6463.3

              \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
          4. Applied rewrites63.3%

            \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
          5. Taylor expanded in z around 0

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} \]
          6. Step-by-step derivation
            1. Applied rewrites23.7%

              \[\leadsto \frac{0.083333333333333}{x} \]
            2. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
              2. mult-flipN/A

                \[\leadsto \frac{83333333333333}{1000000000000000} \cdot \color{blue}{\frac{1}{x}} \]
              3. lift-/.f64N/A

                \[\leadsto \frac{83333333333333}{1000000000000000} \cdot \frac{1}{\color{blue}{x}} \]
              4. *-commutativeN/A

                \[\leadsto \frac{1}{x} \cdot \color{blue}{\frac{83333333333333}{1000000000000000}} \]
              5. lower-*.f6423.6

                \[\leadsto \frac{1}{x} \cdot \color{blue}{0.083333333333333} \]
            3. Applied rewrites23.6%

              \[\leadsto \frac{1}{x} \cdot \color{blue}{0.083333333333333} \]
            4. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \frac{1}{x} \cdot \color{blue}{\frac{83333333333333}{1000000000000000}} \]
              2. lift-/.f64N/A

                \[\leadsto \frac{1}{x} \cdot \frac{83333333333333}{1000000000000000} \]
              3. associate-*l/N/A

                \[\leadsto \frac{1 \cdot \frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
              4. associate-/l*N/A

                \[\leadsto 1 \cdot \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} \]
              5. *-inversesN/A

                \[\leadsto \frac{x}{x} \cdot \frac{\color{blue}{\frac{83333333333333}{1000000000000000}}}{x} \]
              6. frac-timesN/A

                \[\leadsto \frac{x \cdot \frac{83333333333333}{1000000000000000}}{\color{blue}{x \cdot x}} \]
              7. lift-*.f64N/A

                \[\leadsto \frac{x \cdot \frac{83333333333333}{1000000000000000}}{x \cdot \color{blue}{x}} \]
              8. lower-/.f64N/A

                \[\leadsto \frac{x \cdot \frac{83333333333333}{1000000000000000}}{\color{blue}{x \cdot x}} \]
              9. lower-*.f6421.9

                \[\leadsto \frac{x \cdot 0.083333333333333}{\color{blue}{x} \cdot x} \]
            5. Applied rewrites21.9%

              \[\leadsto \frac{x \cdot 0.083333333333333}{\color{blue}{x \cdot x}} \]
          7. Recombined 2 regimes into one program.
          8. Add Preprocessing

          Alternative 15: 29.3% accurate, 3.8× speedup?

          \[\begin{array}{l} \\ \frac{0.083333333333333 + -0.0027777777777778 \cdot z}{x} \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (/ (+ 0.083333333333333 (* -0.0027777777777778 z)) x))
          double code(double x, double y, double z) {
          	return (0.083333333333333 + (-0.0027777777777778 * z)) / x;
          }
          
          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)
          use fmin_fmax_functions
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              code = (0.083333333333333d0 + ((-0.0027777777777778d0) * z)) / x
          end function
          
          public static double code(double x, double y, double z) {
          	return (0.083333333333333 + (-0.0027777777777778 * z)) / x;
          }
          
          def code(x, y, z):
          	return (0.083333333333333 + (-0.0027777777777778 * z)) / x
          
          function code(x, y, z)
          	return Float64(Float64(0.083333333333333 + Float64(-0.0027777777777778 * z)) / x)
          end
          
          function tmp = code(x, y, z)
          	tmp = (0.083333333333333 + (-0.0027777777777778 * z)) / x;
          end
          
          code[x_, y_, z_] := N[(N[(0.083333333333333 + N[(-0.0027777777777778 * z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          \frac{0.083333333333333 + -0.0027777777777778 \cdot z}{x}
          \end{array}
          
          Derivation
          1. Initial program 94.1%

            \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
          2. Taylor expanded in x around 0

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{\color{blue}{x}} \]
            2. lower-+.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            3. lower-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            4. lower--.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            5. lower-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            6. lower-+.f6463.3

              \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
          4. Applied rewrites63.3%

            \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
          5. Taylor expanded in z around 0

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + \frac{-13888888888889}{5000000000000000} \cdot z}{x} \]
          6. Step-by-step derivation
            1. lower-*.f6429.3

              \[\leadsto \frac{0.083333333333333 + -0.0027777777777778 \cdot z}{x} \]
          7. Applied rewrites29.3%

            \[\leadsto \frac{0.083333333333333 + -0.0027777777777778 \cdot z}{x} \]
          8. Add Preprocessing

          Alternative 16: 23.7% accurate, 8.7× speedup?

          \[\begin{array}{l} \\ \frac{0.083333333333333}{x} \end{array} \]
          (FPCore (x y z) :precision binary64 (/ 0.083333333333333 x))
          double code(double x, double y, double z) {
          	return 0.083333333333333 / x;
          }
          
          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)
          use fmin_fmax_functions
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              code = 0.083333333333333d0 / x
          end function
          
          public static double code(double x, double y, double z) {
          	return 0.083333333333333 / x;
          }
          
          def code(x, y, z):
          	return 0.083333333333333 / x
          
          function code(x, y, z)
          	return Float64(0.083333333333333 / x)
          end
          
          function tmp = code(x, y, z)
          	tmp = 0.083333333333333 / x;
          end
          
          code[x_, y_, z_] := N[(0.083333333333333 / x), $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          \frac{0.083333333333333}{x}
          \end{array}
          
          Derivation
          1. Initial program 94.1%

            \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
          2. Taylor expanded in x around 0

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{\color{blue}{x}} \]
            2. lower-+.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            3. lower-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            4. lower--.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            5. lower-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            6. lower-+.f6463.3

              \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
          4. Applied rewrites63.3%

            \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
          5. Taylor expanded in z around 0

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} \]
          6. Step-by-step derivation
            1. Applied rewrites23.7%

              \[\leadsto \frac{0.083333333333333}{x} \]
            2. Add Preprocessing

            Reproduce

            ?
            herbie shell --seed 2025149 
            (FPCore (x y z)
              :name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
              :precision binary64
              (+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ (+ (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z) 0.083333333333333) x)))