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

Percentage Accurate: 94.0% → 98.6%
Time: 5.8s
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.0% 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.6% 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.0%

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

    \[\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: 95.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 8 \cdot 10^{+189}:\\
\;\;\;\;\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(y \cdot z, \frac{z}{x}, \frac{0.083333333333333}{x} - x \cdot \left(1 + \log \left(\frac{1}{x}\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 8.0000000000000002e189

    1. Initial program 94.0%

      \[\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 8.0000000000000002e189 < x

    1. Initial program 94.0%

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

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

      \[\leadsto \mathsf{fma}\left(\color{blue}{y \cdot z}, \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. lower-*.f6483.9

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

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

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

        \[\leadsto \mathsf{fma}\left(y \cdot z, \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(y \cdot z, \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(y \cdot z, \frac{z}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x} - x \cdot \left(1 + \log \left(\frac{1}{x}\right)\right)\right) \]
      4. lower-/.f6483.0

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

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

Alternative 3: 94.0% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq 5 \cdot 10^{-93}:\\
\;\;\;\;\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}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.64999999999999984e26 or 4.99999999999999994e-93 < y

    1. Initial program 94.0%

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

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

      \[\leadsto \mathsf{fma}\left(\color{blue}{y \cdot z}, \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. lower-*.f6483.9

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

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

    if -2.64999999999999984e26 < y < 4.99999999999999994e-93

    1. Initial program 94.0%

      \[\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) \]
    5. Recombined 2 regimes into one program.
    6. Add Preprocessing

    Alternative 4: 93.7% accurate, 0.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(y \cdot z, \frac{z}{x}, \frac{0.083333333333333}{x} - x \cdot \left(1 + \log \left(\frac{1}{x}\right)\right)\right)\\ \mathbf{if}\;y \leq -2.65 \cdot 10^{+26}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{-80}:\\ \;\;\;\;\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}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (let* ((t_0
             (fma
              (* y z)
              (/ z x)
              (- (/ 0.083333333333333 x) (* x (+ 1.0 (log (/ 1.0 x))))))))
       (if (<= y -2.65e+26)
         t_0
         (if (<= y 4.2e-80)
           (fma
            (- x 0.5)
            (log x)
            (-
             (- 0.91893853320467 x)
             (/
              (fma
               (fma -0.0007936500793651 z 0.0027777777777778)
               z
               -0.083333333333333)
              x)))
           t_0))))
    double code(double x, double y, double z) {
    	double t_0 = fma((y * z), (z / x), ((0.083333333333333 / x) - (x * (1.0 + log((1.0 / x))))));
    	double tmp;
    	if (y <= -2.65e+26) {
    		tmp = t_0;
    	} else if (y <= 4.2e-80) {
    		tmp = fma((x - 0.5), log(x), ((0.91893853320467 - x) - (fma(fma(-0.0007936500793651, z, 0.0027777777777778), z, -0.083333333333333) / x)));
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    function code(x, y, z)
    	t_0 = fma(Float64(y * z), Float64(z / x), Float64(Float64(0.083333333333333 / x) - Float64(x * Float64(1.0 + log(Float64(1.0 / x))))))
    	tmp = 0.0
    	if (y <= -2.65e+26)
    		tmp = t_0;
    	elseif (y <= 4.2e-80)
    		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 = t_0;
    	end
    	return tmp
    end
    
    code[x_, y_, z_] := Block[{t$95$0 = N[(N[(y * z), $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]}, If[LessEqual[y, -2.65e+26], t$95$0, If[LessEqual[y, 4.2e-80], 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], t$95$0]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \mathsf{fma}\left(y \cdot z, \frac{z}{x}, \frac{0.083333333333333}{x} - x \cdot \left(1 + \log \left(\frac{1}{x}\right)\right)\right)\\
    \mathbf{if}\;y \leq -2.65 \cdot 10^{+26}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;y \leq 4.2 \cdot 10^{-80}:\\
    \;\;\;\;\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}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y < -2.64999999999999984e26 or 4.20000000000000003e-80 < y

      1. Initial program 94.0%

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{y \cdot z}, \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. lower-*.f6483.9

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

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

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

          \[\leadsto \mathsf{fma}\left(y \cdot z, \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(y \cdot z, \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(y \cdot z, \frac{z}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x} - x \cdot \left(1 + \log \left(\frac{1}{x}\right)\right)\right) \]
        4. lower-/.f6483.0

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

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

      if -2.64999999999999984e26 < y < 4.20000000000000003e-80

      1. Initial program 94.0%

        \[\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) \]
      5. Recombined 2 regimes into one program.
      6. Add Preprocessing

      Alternative 5: 92.3% accurate, 0.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\mathsf{fma}\left(y \cdot z, z, 0.083333333333333\right)}{x} - \mathsf{fma}\left(\log x, 0.5 - x, x - 0.91893853320467\right)\\ \mathbf{if}\;y \leq -2.65 \cdot 10^{+26}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-94}:\\ \;\;\;\;\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}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
      (FPCore (x y z)
       :precision binary64
       (let* ((t_0
               (-
                (/ (fma (* y z) z 0.083333333333333) x)
                (fma (log x) (- 0.5 x) (- x 0.91893853320467)))))
         (if (<= y -2.65e+26)
           t_0
           (if (<= y 2e-94)
             (fma
              (- x 0.5)
              (log x)
              (-
               (- 0.91893853320467 x)
               (/
                (fma
                 (fma -0.0007936500793651 z 0.0027777777777778)
                 z
                 -0.083333333333333)
                x)))
             t_0))))
      double code(double x, double y, double z) {
      	double t_0 = (fma((y * z), z, 0.083333333333333) / x) - fma(log(x), (0.5 - x), (x - 0.91893853320467));
      	double tmp;
      	if (y <= -2.65e+26) {
      		tmp = t_0;
      	} else if (y <= 2e-94) {
      		tmp = fma((x - 0.5), log(x), ((0.91893853320467 - x) - (fma(fma(-0.0007936500793651, z, 0.0027777777777778), z, -0.083333333333333) / x)));
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      function code(x, y, z)
      	t_0 = Float64(Float64(fma(Float64(y * z), z, 0.083333333333333) / x) - fma(log(x), Float64(0.5 - x), Float64(x - 0.91893853320467)))
      	tmp = 0.0
      	if (y <= -2.65e+26)
      		tmp = t_0;
      	elseif (y <= 2e-94)
      		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 = t_0;
      	end
      	return tmp
      end
      
      code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(y * z), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] - N[(N[Log[x], $MachinePrecision] * N[(0.5 - x), $MachinePrecision] + N[(x - 0.91893853320467), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.65e+26], t$95$0, If[LessEqual[y, 2e-94], 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], t$95$0]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \frac{\mathsf{fma}\left(y \cdot z, z, 0.083333333333333\right)}{x} - \mathsf{fma}\left(\log x, 0.5 - x, x - 0.91893853320467\right)\\
      \mathbf{if}\;y \leq -2.65 \cdot 10^{+26}:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;y \leq 2 \cdot 10^{-94}:\\
      \;\;\;\;\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}:\\
      \;\;\;\;t\_0\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < -2.64999999999999984e26 or 1.9999999999999999e-94 < y

        1. Initial program 94.0%

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

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{y \cdot z}, \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. lower-*.f6483.9

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

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

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

        if -2.64999999999999984e26 < y < 1.9999999999999999e-94

        1. Initial program 94.0%

          \[\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) \]
        5. Recombined 2 regimes into one program.
        6. Add Preprocessing

        Alternative 6: 91.2% accurate, 1.0× speedup?

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

          1. Initial program 94.0%

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

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

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

            \[\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 6.8000000000000001e-15 < x < 1.7499999999999999e260

          1. Initial program 94.0%

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

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

            \[\leadsto \mathsf{fma}\left(\color{blue}{y \cdot z}, \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. lower-*.f6483.9

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

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

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

          if 1.7499999999999999e260 < x

          1. Initial program 94.0%

            \[\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-*.f6435.6

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

            \[\leadsto \mathsf{fma}\left(x - 0.5, \log x, \color{blue}{-1 \cdot x}\right) \]
          6. Step-by-step derivation
            1. lift-*.f64N/A

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

              \[\leadsto \mathsf{fma}\left(x - \frac{1}{2}, \log x, \mathsf{neg}\left(x\right)\right) \]
            3. lower-neg.f6435.6

              \[\leadsto \mathsf{fma}\left(x - 0.5, \log x, -x\right) \]
          7. Applied rewrites35.6%

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

        Alternative 7: 86.4% accurate, 0.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\ t_1 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+115}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+83}:\\ \;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, \left(0.91893853320467 - x\right) - \frac{-0.083333333333333}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (let* ((t_0
                 (fma
                  (fma z (- y -0.0007936500793651) -0.0027777777777778)
                  (/ z x)
                  (/ 0.083333333333333 x)))
                (t_1
                 (+
                  (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
                  0.083333333333333)))
           (if (<= t_1 -1e+115)
             t_0
             (if (<= t_1 5e+83)
               (fma
                (- x 0.5)
                (log x)
                (- (- 0.91893853320467 x) (/ -0.083333333333333 x)))
               t_0))))
        double code(double x, double y, double z) {
        	double t_0 = fma(fma(z, (y - -0.0007936500793651), -0.0027777777777778), (z / x), (0.083333333333333 / x));
        	double t_1 = ((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333;
        	double tmp;
        	if (t_1 <= -1e+115) {
        		tmp = t_0;
        	} else if (t_1 <= 5e+83) {
        		tmp = fma((x - 0.5), log(x), ((0.91893853320467 - x) - (-0.083333333333333 / x)));
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        function code(x, y, z)
        	t_0 = fma(fma(z, Float64(y - -0.0007936500793651), -0.0027777777777778), Float64(z / x), Float64(0.083333333333333 / x))
        	t_1 = Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333)
        	tmp = 0.0
        	if (t_1 <= -1e+115)
        		tmp = t_0;
        	elseif (t_1 <= 5e+83)
        		tmp = fma(Float64(x - 0.5), log(x), Float64(Float64(0.91893853320467 - x) - Float64(-0.083333333333333 / x)));
        	else
        		tmp = t_0;
        	end
        	return tmp
        end
        
        code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * N[(y - -0.0007936500793651), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] * N[(z / x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+115], t$95$0, If[LessEqual[t$95$1, 5e+83], N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(N[(0.91893853320467 - x), $MachinePrecision] - N[(-0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\
        t_1 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333\\
        \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+115}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+83}:\\
        \;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, \left(0.91893853320467 - x\right) - \frac{-0.083333333333333}{x}\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_0\\
        
        
        \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)) < -1e115 or 5.00000000000000029e83 < (+.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.0%

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

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

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

            \[\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 -1e115 < (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) < 5.00000000000000029e83

          1. Initial program 94.0%

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

              \[\leadsto \mathsf{fma}\left(x - 0.5, \log x, \left(0.91893853320467 - x\right) - \frac{\color{blue}{-0.083333333333333}}{x}\right) \]
          5. Recombined 2 regimes into one program.
          6. Add Preprocessing

          Alternative 8: 86.4% accurate, 0.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\ t_1 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+115}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+83}:\\ \;\;\;\;\frac{0.083333333333333}{x} - \left(x - \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (let* ((t_0
                   (fma
                    (fma z (- y -0.0007936500793651) -0.0027777777777778)
                    (/ z x)
                    (/ 0.083333333333333 x)))
                  (t_1
                   (+
                    (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
                    0.083333333333333)))
             (if (<= t_1 -1e+115)
               t_0
               (if (<= t_1 5e+83)
                 (-
                  (/ 0.083333333333333 x)
                  (- x (fma (log x) (- x 0.5) 0.91893853320467)))
                 t_0))))
          double code(double x, double y, double z) {
          	double t_0 = fma(fma(z, (y - -0.0007936500793651), -0.0027777777777778), (z / x), (0.083333333333333 / x));
          	double t_1 = ((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333;
          	double tmp;
          	if (t_1 <= -1e+115) {
          		tmp = t_0;
          	} else if (t_1 <= 5e+83) {
          		tmp = (0.083333333333333 / x) - (x - fma(log(x), (x - 0.5), 0.91893853320467));
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          function code(x, y, z)
          	t_0 = fma(fma(z, Float64(y - -0.0007936500793651), -0.0027777777777778), Float64(z / x), Float64(0.083333333333333 / x))
          	t_1 = Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333)
          	tmp = 0.0
          	if (t_1 <= -1e+115)
          		tmp = t_0;
          	elseif (t_1 <= 5e+83)
          		tmp = Float64(Float64(0.083333333333333 / x) - Float64(x - fma(log(x), Float64(x - 0.5), 0.91893853320467)));
          	else
          		tmp = t_0;
          	end
          	return tmp
          end
          
          code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * N[(y - -0.0007936500793651), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] * N[(z / x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+115], t$95$0, If[LessEqual[t$95$1, 5e+83], N[(N[(0.083333333333333 / x), $MachinePrecision] - N[(x - N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision] + 0.91893853320467), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := \mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\
          t_1 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333\\
          \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+115}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+83}:\\
          \;\;\;\;\frac{0.083333333333333}{x} - \left(x - \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_0\\
          
          
          \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)) < -1e115 or 5.00000000000000029e83 < (+.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.0%

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

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

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

              \[\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 -1e115 < (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) < 5.00000000000000029e83

            1. Initial program 94.0%

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

              \[\leadsto \left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right) + \frac{\color{blue}{\frac{83333333333333}{1000000000000000}}}{x} \]
            3. Step-by-step derivation
              1. Applied rewrites56.9%

                \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\color{blue}{0.083333333333333}}{x} \]
              2. 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{\frac{83333333333333}{1000000000000000}}{x}} \]
                2. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} - \color{blue}{\left(x - \left(\log x \cdot \left(x - \frac{1}{2}\right) + \frac{91893853320467}{100000000000000}\right)\right)} \]
              3. Applied rewrites56.9%

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

            Alternative 9: 84.5% accurate, 1.6× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 7000000:\\ \;\;\;\;\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, -x\right)\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (<= x 7000000.0)
               (fma
                (fma z (- y -0.0007936500793651) -0.0027777777777778)
                (/ z x)
                (/ 0.083333333333333 x))
               (fma (- x 0.5) (log x) (- x))))
            double code(double x, double y, double z) {
            	double tmp;
            	if (x <= 7000000.0) {
            		tmp = fma(fma(z, (y - -0.0007936500793651), -0.0027777777777778), (z / x), (0.083333333333333 / x));
            	} else {
            		tmp = fma((x - 0.5), log(x), -x);
            	}
            	return tmp;
            }
            
            function code(x, y, z)
            	tmp = 0.0
            	if (x <= 7000000.0)
            		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(-x));
            	end
            	return tmp
            end
            
            code[x_, y_, z_] := If[LessEqual[x, 7000000.0], 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] + (-x)), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;x \leq 7000000:\\
            \;\;\;\;\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, -x\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if x < 7e6

              1. Initial program 94.0%

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

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

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

                \[\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 7e6 < x

              1. Initial program 94.0%

                \[\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-*.f6435.6

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

                \[\leadsto \mathsf{fma}\left(x - 0.5, \log x, \color{blue}{-1 \cdot x}\right) \]
              6. Step-by-step derivation
                1. lift-*.f64N/A

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

                  \[\leadsto \mathsf{fma}\left(x - \frac{1}{2}, \log x, \mathsf{neg}\left(x\right)\right) \]
                3. lower-neg.f6435.6

                  \[\leadsto \mathsf{fma}\left(x - 0.5, \log x, -x\right) \]
              7. Applied rewrites35.6%

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

            Alternative 10: 84.5% accurate, 1.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 7000000:\\ \;\;\;\;\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, -x\right)\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (<= x 7000000.0)
               (/
                (fma
                 (fma (- y -0.0007936500793651) z -0.0027777777777778)
                 z
                 0.083333333333333)
                x)
               (fma (- x 0.5) (log x) (- x))))
            double code(double x, double y, double z) {
            	double tmp;
            	if (x <= 7000000.0) {
            		tmp = fma(fma((y - -0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333) / x;
            	} else {
            		tmp = fma((x - 0.5), log(x), -x);
            	}
            	return tmp;
            }
            
            function code(x, y, z)
            	tmp = 0.0
            	if (x <= 7000000.0)
            		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(-x));
            	end
            	return tmp
            end
            
            code[x_, y_, z_] := If[LessEqual[x, 7000000.0], 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] + (-x)), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;x \leq 7000000:\\
            \;\;\;\;\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, -x\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if x < 7e6

              1. Initial program 94.0%

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

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

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

                  \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), z, 0.083333333333333\right)}{x} \]
                16. lift-fma.f64N/A

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

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

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

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

              if 7e6 < x

              1. Initial program 94.0%

                \[\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-*.f6435.6

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

                \[\leadsto \mathsf{fma}\left(x - 0.5, \log x, \color{blue}{-1 \cdot x}\right) \]
              6. Step-by-step derivation
                1. lift-*.f64N/A

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

                  \[\leadsto \mathsf{fma}\left(x - \frac{1}{2}, \log x, \mathsf{neg}\left(x\right)\right) \]
                3. lower-neg.f6435.6

                  \[\leadsto \mathsf{fma}\left(x - 0.5, \log x, -x\right) \]
              7. Applied rewrites35.6%

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

            Alternative 11: 84.1% accurate, 2.0× speedup?

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

              1. Initial program 94.0%

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

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

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

                  \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), z, 0.083333333333333\right)}{x} \]
                16. lift-fma.f64N/A

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

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

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

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

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

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

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

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

              if 7e6 < x

              1. Initial program 94.0%

                \[\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-*.f6435.6

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

                \[\leadsto \mathsf{fma}\left(x - 0.5, \log x, \color{blue}{-1 \cdot x}\right) \]
              6. Step-by-step derivation
                1. lift-*.f64N/A

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

                  \[\leadsto \mathsf{fma}\left(x - \frac{1}{2}, \log x, \mathsf{neg}\left(x\right)\right) \]
                3. lower-neg.f6435.6

                  \[\leadsto \mathsf{fma}\left(x - 0.5, \log x, -x\right) \]
              7. Applied rewrites35.6%

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

            Alternative 12: 64.9% accurate, 1.2× 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 0.1:\\ \;\;\;\;\frac{\mathsf{fma}\left(y \cdot z, z, 0.083333333333333\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{y - -0.0007936500793651}{x} \cdot z\right) \cdot z\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (<=
                  (+
                   (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
                   0.083333333333333)
                  0.1)
               (/ (fma (* y z) z 0.083333333333333) x)
               (* (* (/ (- y -0.0007936500793651) x) z) z)))
            double code(double x, double y, double z) {
            	double tmp;
            	if ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) <= 0.1) {
            		tmp = fma((y * z), z, 0.083333333333333) / x;
            	} else {
            		tmp = (((y - -0.0007936500793651) / x) * z) * z;
            	}
            	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) <= 0.1)
            		tmp = Float64(fma(Float64(y * z), z, 0.083333333333333) / x);
            	else
            		tmp = Float64(Float64(Float64(Float64(y - -0.0007936500793651) / x) * z) * z);
            	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], 0.1], N[(N[(N[(y * z), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(N[(y - -0.0007936500793651), $MachinePrecision] / x), $MachinePrecision] * z), $MachinePrecision] * z), $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 0.1:\\
            \;\;\;\;\frac{\mathsf{fma}\left(y \cdot z, z, 0.083333333333333\right)}{x}\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(\frac{y - -0.0007936500793651}{x} \cdot z\right) \cdot z\\
            
            
            \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)) < 0.10000000000000001

              1. Initial program 94.0%

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

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

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

                  \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), z, 0.083333333333333\right)}{x} \]
                16. lift-fma.f64N/A

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

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

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

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

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

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

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

              if 0.10000000000000001 < (+.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.0%

                \[\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 z around inf

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

                  \[\leadsto {z}^{2} \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
                2. lower-pow.f64N/A

                  \[\leadsto {z}^{2} \cdot \left(\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}} + \frac{y}{x}\right) \]
                3. lower-fma.f64N/A

                  \[\leadsto {z}^{2} \cdot \mathsf{fma}\left(\frac{7936500793651}{10000000000000000}, \color{blue}{\frac{1}{x}}, \frac{y}{x}\right) \]
                4. lower-/.f64N/A

                  \[\leadsto {z}^{2} \cdot \mathsf{fma}\left(\frac{7936500793651}{10000000000000000}, \frac{1}{\color{blue}{x}}, \frac{y}{x}\right) \]
                5. lower-/.f6442.6

                  \[\leadsto {z}^{2} \cdot \mathsf{fma}\left(0.0007936500793651, \frac{1}{x}, \frac{y}{x}\right) \]
              4. Applied rewrites42.6%

                \[\leadsto \color{blue}{{z}^{2} \cdot \mathsf{fma}\left(0.0007936500793651, \frac{1}{x}, \frac{y}{x}\right)} \]
              5. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto {z}^{2} \cdot \color{blue}{\mathsf{fma}\left(\frac{7936500793651}{10000000000000000}, \frac{1}{x}, \frac{y}{x}\right)} \]
                2. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(\frac{7936500793651}{10000000000000000}, \frac{1}{x}, \frac{y}{x}\right) \cdot \color{blue}{{z}^{2}} \]
                3. lift-pow.f64N/A

                  \[\leadsto \mathsf{fma}\left(\frac{7936500793651}{10000000000000000}, \frac{1}{x}, \frac{y}{x}\right) \cdot {z}^{\color{blue}{2}} \]
                4. unpow2N/A

                  \[\leadsto \mathsf{fma}\left(\frac{7936500793651}{10000000000000000}, \frac{1}{x}, \frac{y}{x}\right) \cdot \left(z \cdot \color{blue}{z}\right) \]
                5. associate-*r*N/A

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

                  \[\leadsto \left(\mathsf{fma}\left(\frac{7936500793651}{10000000000000000}, \frac{1}{x}, \frac{y}{x}\right) \cdot z\right) \cdot \color{blue}{z} \]
                7. lower-*.f6444.5

                  \[\leadsto \left(\mathsf{fma}\left(0.0007936500793651, \frac{1}{x}, \frac{y}{x}\right) \cdot z\right) \cdot z \]
                8. lift-fma.f64N/A

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

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

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

                  \[\leadsto \left(\left(\frac{y}{x} + \frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot z\right) \cdot z \]
                12. mult-flip-revN/A

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

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

                  \[\leadsto \left(\frac{y - \left(\mathsf{neg}\left(\frac{7936500793651}{10000000000000000}\right)\right)}{x} \cdot z\right) \cdot z \]
                15. metadata-evalN/A

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

                  \[\leadsto \left(\frac{y - \frac{-7936500793651}{10000000000000000}}{x} \cdot z\right) \cdot z \]
                17. lower-/.f6444.5

                  \[\leadsto \left(\frac{y - -0.0007936500793651}{x} \cdot z\right) \cdot z \]
              6. Applied rewrites44.5%

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

            Alternative 13: 63.4% accurate, 2.5× speedup?

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

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

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

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

                \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), z, 0.083333333333333\right)}{x} \]
              16. lift-fma.f64N/A

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

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

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

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

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

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

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

              \[\leadsto \frac{\mathsf{fma}\left(z \cdot \left(0.0007936500793651 + y\right), z, 0.083333333333333\right)}{x} \]
            10. Add Preprocessing

            Alternative 14: 50.7% accurate, 3.1× speedup?

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

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

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

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

                \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), z, 0.083333333333333\right)}{x} \]
              16. lift-fma.f64N/A

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

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

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

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

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

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

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

            Alternative 15: 29.7% accurate, 4.0× speedup?

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

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

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

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

                \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), z, 0.083333333333333\right)}{x} \]
              16. lift-fma.f64N/A

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

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

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

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

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-13888888888889}{5000000000000000}, z, \frac{83333333333333}{1000000000000000}\right)}{x} \]
            8. Step-by-step derivation
              1. Applied rewrites29.7%

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

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

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

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

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

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

                Reproduce

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