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

Percentage Accurate: 93.8% → 98.2%
Time: 13.3s
Alternatives: 17
Speedup: 0.9×

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}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 93.8% 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.2% accurate, 0.9× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778}{x}, \frac{0.083333333333333}{x} + \left(\log x \cdot \left(x - 0.5\right) - \left(x - 0.91893853320467\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 9.9999999999999997e-61

    1. Initial program 99.7%

      \[\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. Add Preprocessing
    3. 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}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\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{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}}{x} \]
      3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

      if 9.9999999999999997e-61 < x

      1. Initial program 90.4%

        \[\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. Add Preprocessing
      3. Step-by-step derivation
        1. lift-+.f64N/A

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

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

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

          \[\leadsto \frac{\color{blue}{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}}{x} + \left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right) \]
        5. div-addN/A

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

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

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

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

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right)\right)} \]
      4. Applied rewrites97.8%

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

    Alternative 2: 95.3% accurate, 0.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_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}\\ \mathbf{if}\;t\_0 \leq 4 \cdot 10^{+307}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{0.0007936500793651 + y}{x} \cdot z\right) \cdot z\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (let* ((t_0
             (+
              (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
              (/
               (+
                (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
                0.083333333333333)
               x))))
       (if (<= t_0 4e+307) t_0 (* (* (/ (+ 0.0007936500793651 y) x) z) z))))
    double code(double x, double y, double z) {
    	double t_0 = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
    	double tmp;
    	if (t_0 <= 4e+307) {
    		tmp = t_0;
    	} else {
    		tmp = (((0.0007936500793651 + y) / x) * z) * z;
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8) :: t_0
        real(8) :: tmp
        t_0 = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
        if (t_0 <= 4d+307) then
            tmp = t_0
        else
            tmp = (((0.0007936500793651d0 + y) / x) * z) * z
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z) {
    	double t_0 = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
    	double tmp;
    	if (t_0 <= 4e+307) {
    		tmp = t_0;
    	} else {
    		tmp = (((0.0007936500793651 + y) / x) * z) * z;
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	t_0 = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
    	tmp = 0
    	if t_0 <= 4e+307:
    		tmp = t_0
    	else:
    		tmp = (((0.0007936500793651 + y) / x) * z) * z
    	return tmp
    
    function code(x, y, z)
    	t_0 = 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))
    	tmp = 0.0
    	if (t_0 <= 4e+307)
    		tmp = t_0;
    	else
    		tmp = Float64(Float64(Float64(Float64(0.0007936500793651 + y) / x) * z) * z);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	t_0 = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
    	tmp = 0.0;
    	if (t_0 <= 4e+307)
    		tmp = t_0;
    	else
    		tmp = (((0.0007936500793651 + y) / x) * z) * z;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := Block[{t$95$0 = 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]}, If[LessEqual[t$95$0, 4e+307], t$95$0, N[(N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision] * z), $MachinePrecision] * z), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_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}\\
    \mathbf{if}\;t\_0 \leq 4 \cdot 10^{+307}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\frac{0.0007936500793651 + y}{x} \cdot z\right) \cdot z\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x #s(literal 1/2 binary64)) (log.f64 x)) x) #s(literal 91893853320467/100000000000000 binary64)) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) x)) < 3.99999999999999994e307

      1. Initial program 98.5%

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

      if 3.99999999999999994e307 < (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x #s(literal 1/2 binary64)) (log.f64 x)) x) #s(literal 91893853320467/100000000000000 binary64)) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) x))

      1. Initial program 81.9%

        \[\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. Add Preprocessing
      3. Taylor expanded in z around inf

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} + y}{x}} \cdot z\right) \cdot z \]
        12. lower-+.f6491.0

          \[\leadsto \left(\frac{\color{blue}{0.0007936500793651 + y}}{x} \cdot z\right) \cdot z \]
      5. Applied rewrites91.0%

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

    Alternative 3: 94.1% accurate, 0.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\ \mathbf{if}\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + t\_0 \leq 4 \cdot 10^{+307}:\\ \;\;\;\;\left(\log x - 1\right) \cdot x + t\_0\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{0.0007936500793651 + y}{x} \cdot z\right) \cdot z\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (let* ((t_0
             (/
              (+
               (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
               0.083333333333333)
              x)))
       (if (<= (+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) t_0) 4e+307)
         (+ (* (- (log x) 1.0) x) t_0)
         (* (* (/ (+ 0.0007936500793651 y) x) z) z))))
    double code(double x, double y, double z) {
    	double t_0 = (((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x;
    	double tmp;
    	if ((((((x - 0.5) * log(x)) - x) + 0.91893853320467) + t_0) <= 4e+307) {
    		tmp = ((log(x) - 1.0) * x) + t_0;
    	} else {
    		tmp = (((0.0007936500793651 + y) / x) * z) * z;
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8) :: t_0
        real(8) :: tmp
        t_0 = (((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x
        if ((((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + t_0) <= 4d+307) then
            tmp = ((log(x) - 1.0d0) * x) + t_0
        else
            tmp = (((0.0007936500793651d0 + y) / x) * z) * z
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z) {
    	double t_0 = (((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x;
    	double tmp;
    	if ((((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + t_0) <= 4e+307) {
    		tmp = ((Math.log(x) - 1.0) * x) + t_0;
    	} else {
    		tmp = (((0.0007936500793651 + y) / x) * z) * z;
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	t_0 = (((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x
    	tmp = 0
    	if (((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + t_0) <= 4e+307:
    		tmp = ((math.log(x) - 1.0) * x) + t_0
    	else:
    		tmp = (((0.0007936500793651 + y) / x) * z) * z
    	return tmp
    
    function code(x, y, z)
    	t_0 = Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
    	tmp = 0.0
    	if (Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + t_0) <= 4e+307)
    		tmp = Float64(Float64(Float64(log(x) - 1.0) * x) + t_0);
    	else
    		tmp = Float64(Float64(Float64(Float64(0.0007936500793651 + y) / x) * z) * z);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	t_0 = (((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x;
    	tmp = 0.0;
    	if ((((((x - 0.5) * log(x)) - x) + 0.91893853320467) + t_0) <= 4e+307)
    		tmp = ((log(x) - 1.0) * x) + t_0;
    	else
    		tmp = (((0.0007936500793651 + y) / x) * z) * z;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + t$95$0), $MachinePrecision], 4e+307], N[(N[(N[(N[Log[x], $MachinePrecision] - 1.0), $MachinePrecision] * x), $MachinePrecision] + t$95$0), $MachinePrecision], N[(N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision] * z), $MachinePrecision] * z), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\
    \mathbf{if}\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + t\_0 \leq 4 \cdot 10^{+307}:\\
    \;\;\;\;\left(\log x - 1\right) \cdot x + t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\frac{0.0007936500793651 + y}{x} \cdot z\right) \cdot z\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x #s(literal 1/2 binary64)) (log.f64 x)) x) #s(literal 91893853320467/100000000000000 binary64)) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) x)) < 3.99999999999999994e307

      1. Initial program 98.5%

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

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

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

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

          \[\leadsto \left(\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log x\right)\right)}\right)\right) - 1\right) \cdot x + \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
        4. remove-double-negN/A

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

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

          \[\leadsto \color{blue}{\left(\log x - 1\right)} \cdot x + \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
        7. lower-log.f6497.0

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

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

      if 3.99999999999999994e307 < (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x #s(literal 1/2 binary64)) (log.f64 x)) x) #s(literal 91893853320467/100000000000000 binary64)) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) x))

      1. Initial program 81.9%

        \[\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. Add Preprocessing
      3. Taylor expanded in z around inf

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} + y}{x}} \cdot z\right) \cdot z \]
        12. lower-+.f6491.0

          \[\leadsto \left(\frac{\color{blue}{0.0007936500793651 + y}}{x} \cdot z\right) \cdot z \]
      5. Applied rewrites91.0%

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

    Alternative 4: 86.0% accurate, 0.8× speedup?

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

      1. Initial program 94.2%

        \[\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. Add Preprocessing
      3. 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}} \]
      4. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \color{blue}{\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{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}}{x} \]
        3. *-commutativeN/A

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\left(0.0007936500793651 + y\right) \cdot z - 0.0027777777777778, z, 0.083333333333333\right)}{x}} \]
      6. Step-by-step derivation
        1. Applied rewrites88.3%

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

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

        1. Initial program 99.5%

          \[\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. Add Preprocessing
        3. 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} \]
        4. Step-by-step derivation
          1. Applied rewrites95.6%

            \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\color{blue}{0.083333333333333}}{x} \]

          if 5.00000000000000003e40 < (+.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 87.4%

            \[\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. Add Preprocessing
          3. Taylor expanded in z around -inf

            \[\leadsto \color{blue}{{z}^{2} \cdot \left(-1 \cdot \frac{-1 \cdot \frac{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \log x \cdot \left(x - \frac{1}{2}\right)\right)\right) - x}{z} + \frac{13888888888889}{5000000000000000} \cdot \frac{1}{x}}{z} + \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} \]
          4. Applied rewrites90.0%

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

            \[\leadsto \frac{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} + \left(y + -1 \cdot \frac{\frac{13888888888889}{5000000000000000} - \frac{83333333333333}{1000000000000000} \cdot \frac{1}{z}}{z}\right)\right)}{\color{blue}{x}} \]
          6. Applied rewrites80.0%

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

        Alternative 5: 86.0% accurate, 0.8× speedup?

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

          1. Initial program 94.2%

            \[\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. Add Preprocessing
          3. 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}} \]
          4. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \color{blue}{\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{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}}{x} \]
            3. *-commutativeN/A

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\left(0.0007936500793651 + y\right) \cdot z - 0.0027777777777778, z, 0.083333333333333\right)}{x}} \]
          6. Step-by-step derivation
            1. Applied rewrites88.3%

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

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

            1. Initial program 99.5%

              \[\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. Add Preprocessing
            3. Taylor expanded in z around 0

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(x - \frac{1}{2}, \log x, \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}}\right) + \left(\frac{91893853320467}{100000000000000} - x\right) \]
              12. lower--.f6495.6

                \[\leadsto \mathsf{fma}\left(x - 0.5, \log x, \frac{0.083333333333333}{x}\right) + \color{blue}{\left(0.91893853320467 - x\right)} \]
            5. Applied rewrites95.6%

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

            if 5.00000000000000003e40 < (+.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 87.4%

              \[\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. Add Preprocessing
            3. Taylor expanded in z around -inf

              \[\leadsto \color{blue}{{z}^{2} \cdot \left(-1 \cdot \frac{-1 \cdot \frac{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \log x \cdot \left(x - \frac{1}{2}\right)\right)\right) - x}{z} + \frac{13888888888889}{5000000000000000} \cdot \frac{1}{x}}{z} + \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} \]
            4. Applied rewrites90.0%

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

              \[\leadsto \frac{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} + \left(y + -1 \cdot \frac{\frac{13888888888889}{5000000000000000} - \frac{83333333333333}{1000000000000000} \cdot \frac{1}{z}}{z}\right)\right)}{\color{blue}{x}} \]
            6. Applied rewrites80.0%

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

          Alternative 6: 84.8% accurate, 0.8× speedup?

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

            1. Initial program 94.2%

              \[\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. Add Preprocessing
            3. 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}} \]
            4. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \color{blue}{\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{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}}{x} \]
              3. *-commutativeN/A

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\left(0.0007936500793651 + y\right) \cdot z - 0.0027777777777778, z, 0.083333333333333\right)}{x}} \]
            6. Step-by-step derivation
              1. Applied rewrites88.3%

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

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

              1. Initial program 99.5%

                \[\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. Add Preprocessing
              3. 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} \]
              4. Step-by-step derivation
                1. Applied rewrites95.6%

                  \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\color{blue}{0.083333333333333}}{x} \]
                2. Taylor expanded in x around inf

                  \[\leadsto \left(\left(\color{blue}{-1 \cdot \left(x \cdot \log \left(\frac{1}{x}\right)\right)} - x\right) + \frac{91893853320467}{100000000000000}\right) + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
                3. Step-by-step derivation
                  1. mul-1-negN/A

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

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

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

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

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

                    \[\leadsto \left(\left(\color{blue}{\log x \cdot x} - x\right) + \frac{91893853320467}{100000000000000}\right) + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
                  7. lower-log.f6493.2

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

                  \[\leadsto \left(\left(\color{blue}{\log x \cdot x} - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]

                if 5.00000000000000003e40 < (+.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 87.4%

                  \[\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. Add Preprocessing
                3. Taylor expanded in z around -inf

                  \[\leadsto \color{blue}{{z}^{2} \cdot \left(-1 \cdot \frac{-1 \cdot \frac{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \log x \cdot \left(x - \frac{1}{2}\right)\right)\right) - x}{z} + \frac{13888888888889}{5000000000000000} \cdot \frac{1}{x}}{z} + \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} \]
                4. Applied rewrites90.0%

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

                  \[\leadsto \frac{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} + \left(y + -1 \cdot \frac{\frac{13888888888889}{5000000000000000} - \frac{83333333333333}{1000000000000000} \cdot \frac{1}{z}}{z}\right)\right)}{\color{blue}{x}} \]
                6. Applied rewrites80.0%

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

              Alternative 7: 98.6% accurate, 0.9× speedup?

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

                \[\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. Add Preprocessing
              3. Step-by-step derivation
                1. lift-+.f64N/A

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

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

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

                  \[\leadsto \frac{\color{blue}{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}}{x} + \left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right) \]
                5. div-addN/A

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

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

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

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

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}, \frac{z}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right)\right)} \]
              4. Applied rewrites98.5%

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

              Alternative 8: 83.8% accurate, 1.3× speedup?

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

                1. Initial program 99.2%

                  \[\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. Add Preprocessing
                3. 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}} \]
                4. Step-by-step derivation
                  1. lower-/.f64N/A

                    \[\leadsto \color{blue}{\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{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}}{x} \]
                  3. *-commutativeN/A

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\left(0.0007936500793651 + y\right) \cdot z - 0.0027777777777778, z, 0.083333333333333\right)}{x}} \]
                6. Step-by-step derivation
                  1. Applied rewrites86.8%

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

                  if 4.39999999999999999e91 < x

                  1. Initial program 83.5%

                    \[\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. Add Preprocessing
                  3. Step-by-step derivation
                    1. lift-+.f64N/A

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

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

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

                      \[\leadsto \frac{\color{blue}{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}}{x} + \left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right) \]
                    5. div-addN/A

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

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

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

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}, \frac{z}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right)\right)} \]
                  4. Applied rewrites96.3%

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

                    \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} \]
                  6. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \cdot x} \]
                    2. lower-*.f64N/A

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

                      \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(\log \left(\frac{1}{x}\right)\right)\right)} - 1\right) \cdot x \]
                    4. log-recN/A

                      \[\leadsto \left(\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log x\right)\right)}\right)\right) - 1\right) \cdot x \]
                    5. remove-double-negN/A

                      \[\leadsto \left(\color{blue}{\log x} - 1\right) \cdot x \]
                    6. lower--.f64N/A

                      \[\leadsto \color{blue}{\left(\log x - 1\right)} \cdot x \]
                    7. lower-log.f6477.9

                      \[\leadsto \left(\color{blue}{\log x} - 1\right) \cdot x \]
                  7. Applied rewrites77.9%

                    \[\leadsto \color{blue}{\left(\log x - 1\right) \cdot x} \]
                7. Recombined 2 regimes into one program.
                8. Final simplification83.8%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 4.4 \cdot 10^{+91}:\\ \;\;\;\;\mathsf{fma}\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778, \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\log x - 1\right) \cdot x\\ \end{array} \]
                9. Add Preprocessing

                Alternative 9: 50.5% accurate, 2.2× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z\\ \mathbf{if}\;t\_0 \leq -40000000000 \lor \neg \left(t\_0 \leq 3 \cdot 10^{+14}\right):\\ \;\;\;\;\left(y \cdot \frac{z}{x}\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.0027777777777778, z, 0.083333333333333\right)}{x}\\ \end{array} \end{array} \]
                (FPCore (x y z)
                 :precision binary64
                 (let* ((t_0 (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)))
                   (if (or (<= t_0 -40000000000.0) (not (<= t_0 3e+14)))
                     (* (* y (/ z x)) z)
                     (/ (fma -0.0027777777777778 z 0.083333333333333) x))))
                double code(double x, double y, double z) {
                	double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
                	double tmp;
                	if ((t_0 <= -40000000000.0) || !(t_0 <= 3e+14)) {
                		tmp = (y * (z / x)) * z;
                	} else {
                		tmp = fma(-0.0027777777777778, z, 0.083333333333333) / x;
                	}
                	return tmp;
                }
                
                function code(x, y, z)
                	t_0 = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z)
                	tmp = 0.0
                	if ((t_0 <= -40000000000.0) || !(t_0 <= 3e+14))
                		tmp = Float64(Float64(y * Float64(z / x)) * z);
                	else
                		tmp = Float64(fma(-0.0027777777777778, z, 0.083333333333333) / x);
                	end
                	return tmp
                end
                
                code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -40000000000.0], N[Not[LessEqual[t$95$0, 3e+14]], $MachinePrecision]], N[(N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], N[(N[(-0.0027777777777778 * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z\\
                \mathbf{if}\;t\_0 \leq -40000000000 \lor \neg \left(t\_0 \leq 3 \cdot 10^{+14}\right):\\
                \;\;\;\;\left(y \cdot \frac{z}{x}\right) \cdot z\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{\mathsf{fma}\left(-0.0027777777777778, z, 0.083333333333333\right)}{x}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < -4e10 or 3e14 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z)

                  1. Initial program 89.4%

                    \[\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. Add Preprocessing
                  3. Taylor expanded in y around inf

                    \[\leadsto \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
                  4. Step-by-step derivation
                    1. associate-*l/N/A

                      \[\leadsto \color{blue}{\frac{y}{x} \cdot {z}^{2}} \]
                    2. unpow2N/A

                      \[\leadsto \frac{y}{x} \cdot \color{blue}{\left(z \cdot z\right)} \]
                    3. associate-*r*N/A

                      \[\leadsto \color{blue}{\left(\frac{y}{x} \cdot z\right) \cdot z} \]
                    4. lower-*.f64N/A

                      \[\leadsto \color{blue}{\left(\frac{y}{x} \cdot z\right) \cdot z} \]
                    5. lower-*.f64N/A

                      \[\leadsto \color{blue}{\left(\frac{y}{x} \cdot z\right)} \cdot z \]
                    6. lower-/.f6454.1

                      \[\leadsto \left(\color{blue}{\frac{y}{x}} \cdot z\right) \cdot z \]
                  5. Applied rewrites54.1%

                    \[\leadsto \color{blue}{\left(\frac{y}{x} \cdot z\right) \cdot z} \]
                  6. Step-by-step derivation
                    1. Applied rewrites55.5%

                      \[\leadsto \left(y \cdot \frac{z}{x}\right) \cdot z \]

                    if -4e10 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 3e14

                    1. Initial program 99.5%

                      \[\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. Add Preprocessing
                    3. 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}} \]
                    4. Step-by-step derivation
                      1. lower-/.f64N/A

                        \[\leadsto \color{blue}{\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{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}}{x} \]
                      3. *-commutativeN/A

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{\mathsf{fma}\left(-0.0027777777777778, z, 0.083333333333333\right)}{x} \]
                    8. Recombined 2 regimes into one program.
                    9. Final simplification50.5%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z \leq -40000000000 \lor \neg \left(\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z \leq 3 \cdot 10^{+14}\right):\\ \;\;\;\;\left(y \cdot \frac{z}{x}\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.0027777777777778, z, 0.083333333333333\right)}{x}\\ \end{array} \]
                    10. Add Preprocessing

                    Alternative 10: 52.7% accurate, 2.2× speedup?

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

                      1. Initial program 93.9%

                        \[\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. Add Preprocessing
                      3. Taylor expanded in y around inf

                        \[\leadsto \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
                      4. Step-by-step derivation
                        1. associate-*l/N/A

                          \[\leadsto \color{blue}{\frac{y}{x} \cdot {z}^{2}} \]
                        2. unpow2N/A

                          \[\leadsto \frac{y}{x} \cdot \color{blue}{\left(z \cdot z\right)} \]
                        3. associate-*r*N/A

                          \[\leadsto \color{blue}{\left(\frac{y}{x} \cdot z\right) \cdot z} \]
                        4. lower-*.f64N/A

                          \[\leadsto \color{blue}{\left(\frac{y}{x} \cdot z\right) \cdot z} \]
                        5. lower-*.f64N/A

                          \[\leadsto \color{blue}{\left(\frac{y}{x} \cdot z\right)} \cdot z \]
                        6. lower-/.f6486.7

                          \[\leadsto \left(\color{blue}{\frac{y}{x}} \cdot z\right) \cdot z \]
                      5. Applied rewrites86.7%

                        \[\leadsto \color{blue}{\left(\frac{y}{x} \cdot z\right) \cdot z} \]
                      6. Step-by-step derivation
                        1. Applied rewrites86.9%

                          \[\leadsto \left(y \cdot \frac{z}{x}\right) \cdot z \]

                        if -4e10 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 1e-3

                        1. Initial program 99.4%

                          \[\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. Add Preprocessing
                        3. 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}} \]
                        4. Step-by-step derivation
                          1. lower-/.f64N/A

                            \[\leadsto \color{blue}{\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{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}}{x} \]
                          3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                          1. Initial program 88.5%

                            \[\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. Add Preprocessing
                          3. Taylor expanded in y around inf

                            \[\leadsto \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
                          4. Step-by-step derivation
                            1. associate-*l/N/A

                              \[\leadsto \color{blue}{\frac{y}{x} \cdot {z}^{2}} \]
                            2. unpow2N/A

                              \[\leadsto \frac{y}{x} \cdot \color{blue}{\left(z \cdot z\right)} \]
                            3. associate-*r*N/A

                              \[\leadsto \color{blue}{\left(\frac{y}{x} \cdot z\right) \cdot z} \]
                            4. lower-*.f64N/A

                              \[\leadsto \color{blue}{\left(\frac{y}{x} \cdot z\right) \cdot z} \]
                            5. lower-*.f64N/A

                              \[\leadsto \color{blue}{\left(\frac{y}{x} \cdot z\right)} \cdot z \]
                            6. lower-/.f6442.9

                              \[\leadsto \left(\color{blue}{\frac{y}{x}} \cdot z\right) \cdot z \]
                          5. Applied rewrites42.9%

                            \[\leadsto \color{blue}{\left(\frac{y}{x} \cdot z\right) \cdot z} \]
                          6. Step-by-step derivation
                            1. Applied rewrites44.6%

                              \[\leadsto \left(y \cdot \frac{z}{x}\right) \cdot z \]
                            2. Step-by-step derivation
                              1. Applied rewrites50.0%

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

                            Alternative 11: 63.5% accurate, 3.1× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z \leq 4000000000000:\\ \;\;\;\;\frac{\mathsf{fma}\left(y \cdot z, z, 0.083333333333333\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{0.0007936500793651 + y}{x} \cdot z\right) \cdot z\\ \end{array} \end{array} \]
                            (FPCore (x y z)
                             :precision binary64
                             (if (<=
                                  (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
                                  4000000000000.0)
                               (/ (fma (* y z) z 0.083333333333333) x)
                               (* (* (/ (+ 0.0007936500793651 y) x) z) z)))
                            double code(double x, double y, double z) {
                            	double tmp;
                            	if (((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) <= 4000000000000.0) {
                            		tmp = fma((y * z), z, 0.083333333333333) / x;
                            	} else {
                            		tmp = (((0.0007936500793651 + y) / x) * z) * z;
                            	}
                            	return tmp;
                            }
                            
                            function code(x, y, z)
                            	tmp = 0.0
                            	if (Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) <= 4000000000000.0)
                            		tmp = Float64(fma(Float64(y * z), z, 0.083333333333333) / x);
                            	else
                            		tmp = Float64(Float64(Float64(Float64(0.0007936500793651 + y) / x) * z) * z);
                            	end
                            	return tmp
                            end
                            
                            code[x_, y_, z_] := If[LessEqual[N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision], 4000000000000.0], N[(N[(N[(y * z), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(N[(0.0007936500793651 + y), $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 \leq 4000000000000:\\
                            \;\;\;\;\frac{\mathsf{fma}\left(y \cdot z, z, 0.083333333333333\right)}{x}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\left(\frac{0.0007936500793651 + y}{x} \cdot z\right) \cdot z\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 4e12

                              1. Initial program 98.2%

                                \[\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. Add Preprocessing
                              3. 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}} \]
                              4. Step-by-step derivation
                                1. lower-/.f64N/A

                                  \[\leadsto \color{blue}{\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{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}}{x} \]
                                3. *-commutativeN/A

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

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

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

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

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

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

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

                                \[\leadsto \frac{\mathsf{fma}\left(y \cdot z, z, \frac{83333333333333}{1000000000000000}\right)}{x} \]
                              7. Step-by-step derivation
                                1. Applied rewrites55.2%

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

                                if 4e12 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z)

                                1. Initial program 88.2%

                                  \[\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. Add Preprocessing
                                3. Taylor expanded in z around inf

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} + y}{x}} \cdot z\right) \cdot z \]
                                  12. lower-+.f6477.5

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

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

                              Alternative 12: 62.0% accurate, 3.1× speedup?

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

                                1. Initial program 98.2%

                                  \[\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. Add Preprocessing
                                3. 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}} \]
                                4. Step-by-step derivation
                                  1. lower-/.f64N/A

                                    \[\leadsto \color{blue}{\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{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}}{x} \]
                                  3. *-commutativeN/A

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

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

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

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

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

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

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

                                  \[\leadsto \frac{\mathsf{fma}\left(y \cdot z, z, \frac{83333333333333}{1000000000000000}\right)}{x} \]
                                7. Step-by-step derivation
                                  1. Applied rewrites55.2%

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

                                  if 4e12 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z)

                                  1. Initial program 88.2%

                                    \[\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. Add Preprocessing
                                  3. Taylor expanded in z around -inf

                                    \[\leadsto \color{blue}{{z}^{2} \cdot \left(-1 \cdot \frac{-1 \cdot \frac{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \log x \cdot \left(x - \frac{1}{2}\right)\right)\right) - x}{z} + \frac{13888888888889}{5000000000000000} \cdot \frac{1}{x}}{z} + \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} \]
                                  4. Applied rewrites89.8%

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

                                    \[\leadsto \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) \cdot \left(\color{blue}{z} \cdot z\right) \]
                                  6. Step-by-step derivation
                                    1. Applied rewrites74.1%

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

                                  Alternative 13: 64.6% accurate, 3.7× speedup?

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

                                    \[\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. Add Preprocessing
                                  3. 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}} \]
                                  4. Step-by-step derivation
                                    1. lower-/.f64N/A

                                      \[\leadsto \color{blue}{\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{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}}{x} \]
                                    3. *-commutativeN/A

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

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

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

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

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

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

                                    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\left(0.0007936500793651 + y\right) \cdot z - 0.0027777777777778, z, 0.083333333333333\right)}{x}} \]
                                  6. Step-by-step derivation
                                    1. Applied rewrites65.3%

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

                                    Alternative 14: 64.0% accurate, 4.2× speedup?

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

                                      1. Initial program 98.1%

                                        \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                                      2. Add Preprocessing
                                      3. 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}} \]
                                      4. Step-by-step derivation
                                        1. lower-/.f64N/A

                                          \[\leadsto \color{blue}{\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{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}}{x} \]
                                        3. *-commutativeN/A

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

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

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

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

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

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

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

                                      if 2.2000000000000001e25 < z

                                      1. Initial program 81.5%

                                        \[\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. Add Preprocessing
                                      3. Taylor expanded in z around inf

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} + y}{x}} \cdot z\right) \cdot z \]
                                        12. lower-+.f6484.2

                                          \[\leadsto \left(\frac{\color{blue}{0.0007936500793651 + y}}{x} \cdot z\right) \cdot z \]
                                      5. Applied rewrites84.2%

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

                                    Alternative 15: 51.6% accurate, 5.1× speedup?

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

                                      1. Initial program 98.1%

                                        \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                                      2. Add Preprocessing
                                      3. 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}} \]
                                      4. Step-by-step derivation
                                        1. lower-/.f64N/A

                                          \[\leadsto \color{blue}{\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{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}}{x} \]
                                        3. *-commutativeN/A

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

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

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

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

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

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

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

                                        \[\leadsto \frac{\mathsf{fma}\left(y \cdot z, z, \frac{83333333333333}{1000000000000000}\right)}{x} \]
                                      7. Step-by-step derivation
                                        1. Applied rewrites51.6%

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

                                        if 1.12e27 < z

                                        1. Initial program 81.5%

                                          \[\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. Add Preprocessing
                                        3. Taylor expanded in y around inf

                                          \[\leadsto \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
                                        4. Step-by-step derivation
                                          1. associate-*l/N/A

                                            \[\leadsto \color{blue}{\frac{y}{x} \cdot {z}^{2}} \]
                                          2. unpow2N/A

                                            \[\leadsto \frac{y}{x} \cdot \color{blue}{\left(z \cdot z\right)} \]
                                          3. associate-*r*N/A

                                            \[\leadsto \color{blue}{\left(\frac{y}{x} \cdot z\right) \cdot z} \]
                                          4. lower-*.f64N/A

                                            \[\leadsto \color{blue}{\left(\frac{y}{x} \cdot z\right) \cdot z} \]
                                          5. lower-*.f64N/A

                                            \[\leadsto \color{blue}{\left(\frac{y}{x} \cdot z\right)} \cdot z \]
                                          6. lower-/.f6449.7

                                            \[\leadsto \left(\color{blue}{\frac{y}{x}} \cdot z\right) \cdot z \]
                                        5. Applied rewrites49.7%

                                          \[\leadsto \color{blue}{\left(\frac{y}{x} \cdot z\right) \cdot z} \]
                                        6. Step-by-step derivation
                                          1. Applied rewrites51.3%

                                            \[\leadsto \left(y \cdot \frac{z}{x}\right) \cdot z \]
                                          2. Step-by-step derivation
                                            1. Applied rewrites58.5%

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

                                          Alternative 16: 29.4% accurate, 8.2× 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 93.8%

                                            \[\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. Add Preprocessing
                                          3. 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}} \]
                                          4. Step-by-step derivation
                                            1. lower-/.f64N/A

                                              \[\leadsto \color{blue}{\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{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}}{x} \]
                                            3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                                            Alternative 17: 23.8% accurate, 12.3× 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 93.8%

                                              \[\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. Add Preprocessing
                                            3. 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}} \]
                                            4. Step-by-step derivation
                                              1. lower-/.f64N/A

                                                \[\leadsto \color{blue}{\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{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}}{x} \]
                                              3. *-commutativeN/A

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

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

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

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

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

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

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

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

                                                \[\leadsto \frac{0.083333333333333}{x} \]
                                              2. Final simplification21.3%

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

                                              Developer Target 1: 98.6% accurate, 0.9× speedup?

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

                                              Reproduce

                                              ?
                                              herbie shell --seed 2024364 
                                              (FPCore (x y z)
                                                :name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
                                                :precision binary64
                                              
                                                :alt
                                                (! :herbie-platform default (+ (+ (+ (* (- x 1/2) (log x)) (- 91893853320467/100000000000000 x)) (/ 83333333333333/1000000000000000 x)) (* (/ z x) (- (* z (+ y 7936500793651/10000000000000000)) 13888888888889/5000000000000000))))
                                              
                                                (+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ (+ (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z) 0.083333333333333) x)))