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

Percentage Accurate: 94.0% → 98.8%
Time: 5.7s
Alternatives: 21
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+
  (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
  (/
   (+
    (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
    0.083333333333333)
   x)))
double code(double x, double y, double z) {
	return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
	return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z):
	return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z)
	return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x))
end
function tmp = code(x, y, z)
	tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 21 alternatives:

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

Initial Program: 94.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+
  (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
  (/
   (+
    (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
    0.083333333333333)
   x)))
double code(double x, double y, double z) {
	return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
	return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z):
	return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z)
	return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x))
end
function tmp = code(x, y, z)
	tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 98.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 2: 97.9% accurate, 1.0× speedup?

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

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

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

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

Alternative 3: 95.6% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 94.0%

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

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

    if 1.34999999999999997e155 < x

    1. Initial program 94.0%

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

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

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

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

    Alternative 4: 95.6% accurate, 0.7× speedup?

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

      1. Initial program 94.0%

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

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

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

      1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(z, z \cdot \mathsf{fma}\left(\frac{7936500793651}{10000000000000000}, \frac{1}{x}, \frac{y}{x}\right) - \frac{13888888888889}{5000000000000000} \cdot \frac{1}{x}, \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x}\right) \]
        10. lower-/.f6460.3

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

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

    Alternative 5: 95.6% accurate, 0.7× speedup?

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

      1. Initial program 94.0%

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

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

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

      1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 6: 95.6% accurate, 0.7× speedup?

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

      1. Initial program 94.0%

        \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. 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 \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} + \color{blue}{\left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right)} \]
        4. lift--.f64N/A

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

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

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

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

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

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

      1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 7: 93.8% accurate, 0.9× speedup?

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

      1. Initial program 94.0%

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{\left(y \cdot z\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. add-flipN/A

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

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

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

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

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

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

          \[\leadsto \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} - \left(\mathsf{neg}\left(\left(\frac{91893853320467}{100000000000000} - \left(x - \color{blue}{\left(x - \frac{1}{2}\right) \cdot \log x}\right)\right)\right)\right) \]
        10. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

      if -8.00000000000000038e-4 < y < 8.80000000000000031e-4

      1. Initial program 94.0%

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

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

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

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

      Alternative 8: 90.8% accurate, 1.1× speedup?

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

        1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{1}{\frac{x}{\mathsf{fma}\left(\mathsf{fma}\left(z, y - \frac{-7936500793651}{10000000000000000}, \frac{-13888888888889}{5000000000000000}\right), \color{blue}{z}, \frac{83333333333333}{1000000000000000}\right)}} \]
          19. lower-unsound-/.f6462.4

            \[\leadsto \frac{1}{\frac{x}{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), z, 0.083333333333333\right)}}} \]
        6. Applied rewrites62.4%

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

        if 1.8500000000000001 < x

        1. Initial program 94.0%

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{\left(y \cdot z\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. add-flipN/A

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

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

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

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

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

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

            \[\leadsto \frac{\left(y \cdot z\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} - \left(\mathsf{neg}\left(\left(\frac{91893853320467}{100000000000000} - \left(x - \color{blue}{\left(x - \frac{1}{2}\right) \cdot \log x}\right)\right)\right)\right) \]
          10. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

      Alternative 9: 84.3% accurate, 1.6× speedup?

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

        1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{1}{\frac{x}{\mathsf{fma}\left(\mathsf{fma}\left(z, y - \frac{-7936500793651}{10000000000000000}, \frac{-13888888888889}{5000000000000000}\right), \color{blue}{z}, \frac{83333333333333}{1000000000000000}\right)}} \]
          19. lower-unsound-/.f6462.4

            \[\leadsto \frac{1}{\frac{x}{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), z, 0.083333333333333\right)}}} \]
        6. Applied rewrites62.4%

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

        if 6.59999999999999953e33 < x

        1. Initial program 94.0%

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

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

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

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

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

            \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
          5. lower-/.f6435.6

            \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
        4. Applied rewrites35.6%

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

      Alternative 10: 84.3% accurate, 1.7× speedup?

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

        1. Initial program 94.0%

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
        5. Step-by-step derivation
          1. Applied rewrites62.4%

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

          if 6.59999999999999953e33 < x

          1. Initial program 94.0%

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

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

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

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

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

              \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
            5. lower-/.f6435.6

              \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
          4. Applied rewrites35.6%

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

        Alternative 11: 64.1% accurate, 1.8× speedup?

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

          1. Initial program 94.0%

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
          5. Step-by-step derivation
            1. Applied rewrites62.4%

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

            if 1.22e120 < x

            1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 12: 63.9% accurate, 0.7× speedup?

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

            1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{y + \frac{7936500793651}{10000000000000000}}{x} \cdot {\color{blue}{z}}^{2} \]
              10. add-flipN/A

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

                \[\leadsto \frac{y - \frac{-7936500793651}{10000000000000000}}{x} \cdot {z}^{2} \]
              12. lift--.f64N/A

                \[\leadsto \frac{y - \frac{-7936500793651}{10000000000000000}}{x} \cdot {z}^{2} \]
              13. lower-/.f6441.7

                \[\leadsto \frac{y - -0.0007936500793651}{x} \cdot {\color{blue}{z}}^{2} \]
              14. lift-pow.f64N/A

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

                \[\leadsto \frac{y - \frac{-7936500793651}{10000000000000000}}{x} \cdot \left(z \cdot \color{blue}{z}\right) \]
              16. lower-*.f6441.7

                \[\leadsto \frac{y - -0.0007936500793651}{x} \cdot \left(z \cdot \color{blue}{z}\right) \]
            6. Applied rewrites41.7%

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

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

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

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

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

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

                \[\leadsto \left(y - -0.0007936500793651\right) \cdot \frac{z \cdot z}{\color{blue}{x}} \]
            8. Applied rewrites42.6%

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

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

            1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            6. Step-by-step derivation
              1. lower-*.f6446.0

                \[\leadsto \frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x} \]
            7. Applied rewrites46.0%

              \[\leadsto \frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x} \]

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

            1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 13: 63.8% accurate, 0.8× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333\\ \mathbf{if}\;t\_0 \leq -50:\\ \;\;\;\;\left(y - -0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\ \mathbf{elif}\;t\_0 \leq 0.1:\\ \;\;\;\;\frac{1}{\frac{x}{0.083333333333333}}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{y - -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) z)
                    0.083333333333333)))
             (if (<= t_0 -50.0)
               (* (- y -0.0007936500793651) (/ (* z z) x))
               (if (<= t_0 0.1)
                 (/ 1.0 (/ x 0.083333333333333))
                 (* (* (/ (- y -0.0007936500793651) x) z) z)))))
          double code(double x, double y, double z) {
          	double t_0 = ((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333;
          	double tmp;
          	if (t_0 <= -50.0) {
          		tmp = (y - -0.0007936500793651) * ((z * z) / x);
          	} else if (t_0 <= 0.1) {
          		tmp = 1.0 / (x / 0.083333333333333);
          	} else {
          		tmp = (((y - -0.0007936500793651) / 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
              if (t_0 <= (-50.0d0)) then
                  tmp = (y - (-0.0007936500793651d0)) * ((z * z) / x)
              else if (t_0 <= 0.1d0) then
                  tmp = 1.0d0 / (x / 0.083333333333333d0)
              else
                  tmp = (((y - (-0.0007936500793651d0)) / 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;
          	double tmp;
          	if (t_0 <= -50.0) {
          		tmp = (y - -0.0007936500793651) * ((z * z) / x);
          	} else if (t_0 <= 0.1) {
          		tmp = 1.0 / (x / 0.083333333333333);
          	} else {
          		tmp = (((y - -0.0007936500793651) / x) * z) * z;
          	}
          	return tmp;
          }
          
          def code(x, y, z):
          	t_0 = ((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333
          	tmp = 0
          	if t_0 <= -50.0:
          		tmp = (y - -0.0007936500793651) * ((z * z) / x)
          	elif t_0 <= 0.1:
          		tmp = 1.0 / (x / 0.083333333333333)
          	else:
          		tmp = (((y - -0.0007936500793651) / x) * z) * z
          	return tmp
          
          function code(x, y, z)
          	t_0 = Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333)
          	tmp = 0.0
          	if (t_0 <= -50.0)
          		tmp = Float64(Float64(y - -0.0007936500793651) * Float64(Float64(z * z) / x));
          	elseif (t_0 <= 0.1)
          		tmp = Float64(1.0 / Float64(x / 0.083333333333333));
          	else
          		tmp = Float64(Float64(Float64(Float64(y - -0.0007936500793651) / 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;
          	tmp = 0.0;
          	if (t_0 <= -50.0)
          		tmp = (y - -0.0007936500793651) * ((z * z) / x);
          	elseif (t_0 <= 0.1)
          		tmp = 1.0 / (x / 0.083333333333333);
          	else
          		tmp = (((y - -0.0007936500793651) / x) * z) * z;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision]}, If[LessEqual[t$95$0, -50.0], N[(N[(y - -0.0007936500793651), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.1], N[(1.0 / N[(x / 0.083333333333333), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y - -0.0007936500793651), $MachinePrecision] / x), $MachinePrecision] * z), $MachinePrecision] * z), $MachinePrecision]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333\\
          \mathbf{if}\;t\_0 \leq -50:\\
          \;\;\;\;\left(y - -0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\
          
          \mathbf{elif}\;t\_0 \leq 0.1:\\
          \;\;\;\;\frac{1}{\frac{x}{0.083333333333333}}\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(\frac{y - -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)) < -50

            1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{y + \frac{7936500793651}{10000000000000000}}{x} \cdot {\color{blue}{z}}^{2} \]
              10. add-flipN/A

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

                \[\leadsto \frac{y - \frac{-7936500793651}{10000000000000000}}{x} \cdot {z}^{2} \]
              12. lift--.f64N/A

                \[\leadsto \frac{y - \frac{-7936500793651}{10000000000000000}}{x} \cdot {z}^{2} \]
              13. lower-/.f6441.7

                \[\leadsto \frac{y - -0.0007936500793651}{x} \cdot {\color{blue}{z}}^{2} \]
              14. lift-pow.f64N/A

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

                \[\leadsto \frac{y - \frac{-7936500793651}{10000000000000000}}{x} \cdot \left(z \cdot \color{blue}{z}\right) \]
              16. lower-*.f6441.7

                \[\leadsto \frac{y - -0.0007936500793651}{x} \cdot \left(z \cdot \color{blue}{z}\right) \]
            6. Applied rewrites41.7%

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

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

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

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

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

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

                \[\leadsto \left(y - -0.0007936500793651\right) \cdot \frac{z \cdot z}{\color{blue}{x}} \]
            8. Applied rewrites42.6%

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

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

            1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{1}{\color{blue}{\frac{x}{\frac{83333333333333}{1000000000000000}}}} \]
                4. lower-unsound-/.f6423.1

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

                \[\leadsto \frac{1}{\color{blue}{\frac{x}{0.083333333333333}}} \]

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

              1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 14: 63.5% accurate, 0.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(\frac{y - -0.0007936500793651}{x} \cdot z\right) \cdot z\\ t_1 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333\\ \mathbf{if}\;t\_1 \leq -50:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 0.1:\\ \;\;\;\;\frac{1}{\frac{x}{0.083333333333333}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (let* ((t_0 (* (* (/ (- y -0.0007936500793651) x) z) z))
                    (t_1
                     (+
                      (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
                      0.083333333333333)))
               (if (<= t_1 -50.0)
                 t_0
                 (if (<= t_1 0.1) (/ 1.0 (/ x 0.083333333333333)) t_0))))
            double code(double x, double y, double z) {
            	double t_0 = (((y - -0.0007936500793651) / x) * z) * z;
            	double t_1 = ((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333;
            	double tmp;
            	if (t_1 <= -50.0) {
            		tmp = t_0;
            	} else if (t_1 <= 0.1) {
            		tmp = 1.0 / (x / 0.083333333333333);
            	} else {
            		tmp = t_0;
            	}
            	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) :: t_1
                real(8) :: tmp
                t_0 = (((y - (-0.0007936500793651d0)) / x) * z) * z
                t_1 = ((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0
                if (t_1 <= (-50.0d0)) then
                    tmp = t_0
                else if (t_1 <= 0.1d0) then
                    tmp = 1.0d0 / (x / 0.083333333333333d0)
                else
                    tmp = t_0
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z) {
            	double t_0 = (((y - -0.0007936500793651) / x) * z) * z;
            	double t_1 = ((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333;
            	double tmp;
            	if (t_1 <= -50.0) {
            		tmp = t_0;
            	} else if (t_1 <= 0.1) {
            		tmp = 1.0 / (x / 0.083333333333333);
            	} else {
            		tmp = t_0;
            	}
            	return tmp;
            }
            
            def code(x, y, z):
            	t_0 = (((y - -0.0007936500793651) / x) * z) * z
            	t_1 = ((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333
            	tmp = 0
            	if t_1 <= -50.0:
            		tmp = t_0
            	elif t_1 <= 0.1:
            		tmp = 1.0 / (x / 0.083333333333333)
            	else:
            		tmp = t_0
            	return tmp
            
            function code(x, y, z)
            	t_0 = Float64(Float64(Float64(Float64(y - -0.0007936500793651) / x) * z) * z)
            	t_1 = Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333)
            	tmp = 0.0
            	if (t_1 <= -50.0)
            		tmp = t_0;
            	elseif (t_1 <= 0.1)
            		tmp = Float64(1.0 / Float64(x / 0.083333333333333));
            	else
            		tmp = t_0;
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z)
            	t_0 = (((y - -0.0007936500793651) / x) * z) * z;
            	t_1 = ((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333;
            	tmp = 0.0;
            	if (t_1 <= -50.0)
            		tmp = t_0;
            	elseif (t_1 <= 0.1)
            		tmp = 1.0 / (x / 0.083333333333333);
            	else
            		tmp = t_0;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(y - -0.0007936500793651), $MachinePrecision] / x), $MachinePrecision] * z), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision]}, If[LessEqual[t$95$1, -50.0], t$95$0, If[LessEqual[t$95$1, 0.1], N[(1.0 / N[(x / 0.083333333333333), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_0 := \left(\frac{y - -0.0007936500793651}{x} \cdot z\right) \cdot z\\
            t_1 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333\\
            \mathbf{if}\;t\_1 \leq -50:\\
            \;\;\;\;t\_0\\
            
            \mathbf{elif}\;t\_1 \leq 0.1:\\
            \;\;\;\;\frac{1}{\frac{x}{0.083333333333333}}\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_0\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) < -50 or 0.10000000000000001 < (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64))

              1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{1}{\color{blue}{\frac{x}{\frac{83333333333333}{1000000000000000}}}} \]
                  4. lower-unsound-/.f6423.1

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

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

              Alternative 15: 57.1% accurate, 0.9× 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 -50:\\ \;\;\;\;\frac{y}{x} \cdot \left(z \cdot z\right)\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-18}:\\ \;\;\;\;\frac{1}{\frac{x}{0.083333333333333}}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.0007936500793651}{x} \cdot \left(z \cdot z\right)\\ \end{array} \end{array} \]
              (FPCore (x y z)
               :precision binary64
               (let* ((t_0 (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)))
                 (if (<= t_0 -50.0)
                   (* (/ y x) (* z z))
                   (if (<= t_0 2e-18)
                     (/ 1.0 (/ x 0.083333333333333))
                     (* (/ 0.0007936500793651 x) (* z z))))))
              double code(double x, double y, double z) {
              	double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
              	double tmp;
              	if (t_0 <= -50.0) {
              		tmp = (y / x) * (z * z);
              	} else if (t_0 <= 2e-18) {
              		tmp = 1.0 / (x / 0.083333333333333);
              	} else {
              		tmp = (0.0007936500793651 / 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
                  if (t_0 <= (-50.0d0)) then
                      tmp = (y / x) * (z * z)
                  else if (t_0 <= 2d-18) then
                      tmp = 1.0d0 / (x / 0.083333333333333d0)
                  else
                      tmp = (0.0007936500793651d0 / 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;
              	double tmp;
              	if (t_0 <= -50.0) {
              		tmp = (y / x) * (z * z);
              	} else if (t_0 <= 2e-18) {
              		tmp = 1.0 / (x / 0.083333333333333);
              	} else {
              		tmp = (0.0007936500793651 / x) * (z * z);
              	}
              	return tmp;
              }
              
              def code(x, y, z):
              	t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z
              	tmp = 0
              	if t_0 <= -50.0:
              		tmp = (y / x) * (z * z)
              	elif t_0 <= 2e-18:
              		tmp = 1.0 / (x / 0.083333333333333)
              	else:
              		tmp = (0.0007936500793651 / x) * (z * z)
              	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 <= -50.0)
              		tmp = Float64(Float64(y / x) * Float64(z * z));
              	elseif (t_0 <= 2e-18)
              		tmp = Float64(1.0 / Float64(x / 0.083333333333333));
              	else
              		tmp = Float64(Float64(0.0007936500793651 / x) * Float64(z * z));
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z)
              	t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
              	tmp = 0.0;
              	if (t_0 <= -50.0)
              		tmp = (y / x) * (z * z);
              	elseif (t_0 <= 2e-18)
              		tmp = 1.0 / (x / 0.083333333333333);
              	else
              		tmp = (0.0007936500793651 / x) * (z * z);
              	end
              	tmp_2 = 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, -50.0], N[(N[(y / x), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e-18], N[(1.0 / N[(x / 0.083333333333333), $MachinePrecision]), $MachinePrecision], N[(N[(0.0007936500793651 / x), $MachinePrecision] * N[(z * z), $MachinePrecision]), $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 -50:\\
              \;\;\;\;\frac{y}{x} \cdot \left(z \cdot z\right)\\
              
              \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-18}:\\
              \;\;\;\;\frac{1}{\frac{x}{0.083333333333333}}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{0.0007936500793651}{x} \cdot \left(z \cdot z\right)\\
              
              
              \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) < -50

                1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{y + \frac{7936500793651}{10000000000000000}}{x} \cdot {\color{blue}{z}}^{2} \]
                  10. add-flipN/A

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

                    \[\leadsto \frac{y - \frac{-7936500793651}{10000000000000000}}{x} \cdot {z}^{2} \]
                  12. lift--.f64N/A

                    \[\leadsto \frac{y - \frac{-7936500793651}{10000000000000000}}{x} \cdot {z}^{2} \]
                  13. lower-/.f6441.7

                    \[\leadsto \frac{y - -0.0007936500793651}{x} \cdot {\color{blue}{z}}^{2} \]
                  14. lift-pow.f64N/A

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

                    \[\leadsto \frac{y - \frac{-7936500793651}{10000000000000000}}{x} \cdot \left(z \cdot \color{blue}{z}\right) \]
                  16. lower-*.f6441.7

                    \[\leadsto \frac{y - -0.0007936500793651}{x} \cdot \left(z \cdot \color{blue}{z}\right) \]
                6. Applied rewrites41.7%

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

                  \[\leadsto \frac{y}{x} \cdot \left(\color{blue}{z} \cdot z\right) \]
                8. Step-by-step derivation
                  1. lower-/.f6429.7

                    \[\leadsto \frac{y}{x} \cdot \left(z \cdot z\right) \]
                9. Applied rewrites29.7%

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

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

                1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{1}{\color{blue}{\frac{x}{\frac{83333333333333}{1000000000000000}}}} \]
                    4. lower-unsound-/.f6423.1

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

                    \[\leadsto \frac{1}{\color{blue}{\frac{x}{0.083333333333333}}} \]

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

                  1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{y + \frac{7936500793651}{10000000000000000}}{x} \cdot {\color{blue}{z}}^{2} \]
                    10. add-flipN/A

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

                      \[\leadsto \frac{y - \frac{-7936500793651}{10000000000000000}}{x} \cdot {z}^{2} \]
                    12. lift--.f64N/A

                      \[\leadsto \frac{y - \frac{-7936500793651}{10000000000000000}}{x} \cdot {z}^{2} \]
                    13. lower-/.f6441.7

                      \[\leadsto \frac{y - -0.0007936500793651}{x} \cdot {\color{blue}{z}}^{2} \]
                    14. lift-pow.f64N/A

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

                      \[\leadsto \frac{y - \frac{-7936500793651}{10000000000000000}}{x} \cdot \left(z \cdot \color{blue}{z}\right) \]
                    16. lower-*.f6441.7

                      \[\leadsto \frac{y - -0.0007936500793651}{x} \cdot \left(z \cdot \color{blue}{z}\right) \]
                  6. Applied rewrites41.7%

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

                    \[\leadsto \frac{\frac{7936500793651}{10000000000000000}}{x} \cdot \left(z \cdot z\right) \]
                  8. Step-by-step derivation
                    1. Applied rewrites25.5%

                      \[\leadsto \frac{0.0007936500793651}{x} \cdot \left(z \cdot z\right) \]
                  9. Recombined 3 regimes into one program.
                  10. Add Preprocessing

                  Alternative 16: 49.9% accurate, 0.9× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z\\ t_1 := \frac{y}{x} \cdot \left(z \cdot z\right)\\ \mathbf{if}\;t\_0 \leq -50:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+25}:\\ \;\;\;\;\frac{1}{\frac{x}{0.083333333333333}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                  (FPCore (x y z)
                   :precision binary64
                   (let* ((t_0 (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z))
                          (t_1 (* (/ y x) (* z z))))
                     (if (<= t_0 -50.0)
                       t_1
                       (if (<= t_0 5e+25) (/ 1.0 (/ x 0.083333333333333)) t_1))))
                  double code(double x, double y, double z) {
                  	double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
                  	double t_1 = (y / x) * (z * z);
                  	double tmp;
                  	if (t_0 <= -50.0) {
                  		tmp = t_1;
                  	} else if (t_0 <= 5e+25) {
                  		tmp = 1.0 / (x / 0.083333333333333);
                  	} else {
                  		tmp = t_1;
                  	}
                  	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) :: t_1
                      real(8) :: tmp
                      t_0 = (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z
                      t_1 = (y / x) * (z * z)
                      if (t_0 <= (-50.0d0)) then
                          tmp = t_1
                      else if (t_0 <= 5d+25) then
                          tmp = 1.0d0 / (x / 0.083333333333333d0)
                      else
                          tmp = t_1
                      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;
                  	double t_1 = (y / x) * (z * z);
                  	double tmp;
                  	if (t_0 <= -50.0) {
                  		tmp = t_1;
                  	} else if (t_0 <= 5e+25) {
                  		tmp = 1.0 / (x / 0.083333333333333);
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z):
                  	t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z
                  	t_1 = (y / x) * (z * z)
                  	tmp = 0
                  	if t_0 <= -50.0:
                  		tmp = t_1
                  	elif t_0 <= 5e+25:
                  		tmp = 1.0 / (x / 0.083333333333333)
                  	else:
                  		tmp = t_1
                  	return tmp
                  
                  function code(x, y, z)
                  	t_0 = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z)
                  	t_1 = Float64(Float64(y / x) * Float64(z * z))
                  	tmp = 0.0
                  	if (t_0 <= -50.0)
                  		tmp = t_1;
                  	elseif (t_0 <= 5e+25)
                  		tmp = Float64(1.0 / Float64(x / 0.083333333333333));
                  	else
                  		tmp = t_1;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z)
                  	t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
                  	t_1 = (y / x) * (z * z);
                  	tmp = 0.0;
                  	if (t_0 <= -50.0)
                  		tmp = t_1;
                  	elseif (t_0 <= 5e+25)
                  		tmp = 1.0 / (x / 0.083333333333333);
                  	else
                  		tmp = t_1;
                  	end
                  	tmp_2 = 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]}, Block[{t$95$1 = N[(N[(y / x), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -50.0], t$95$1, If[LessEqual[t$95$0, 5e+25], N[(1.0 / N[(x / 0.083333333333333), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z\\
                  t_1 := \frac{y}{x} \cdot \left(z \cdot z\right)\\
                  \mathbf{if}\;t\_0 \leq -50:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+25}:\\
                  \;\;\;\;\frac{1}{\frac{x}{0.083333333333333}}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \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) < -50 or 5.00000000000000024e25 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z)

                    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{y + \frac{7936500793651}{10000000000000000}}{x} \cdot {\color{blue}{z}}^{2} \]
                      10. add-flipN/A

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

                        \[\leadsto \frac{y - \frac{-7936500793651}{10000000000000000}}{x} \cdot {z}^{2} \]
                      12. lift--.f64N/A

                        \[\leadsto \frac{y - \frac{-7936500793651}{10000000000000000}}{x} \cdot {z}^{2} \]
                      13. lower-/.f6441.7

                        \[\leadsto \frac{y - -0.0007936500793651}{x} \cdot {\color{blue}{z}}^{2} \]
                      14. lift-pow.f64N/A

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

                        \[\leadsto \frac{y - \frac{-7936500793651}{10000000000000000}}{x} \cdot \left(z \cdot \color{blue}{z}\right) \]
                      16. lower-*.f6441.7

                        \[\leadsto \frac{y - -0.0007936500793651}{x} \cdot \left(z \cdot \color{blue}{z}\right) \]
                    6. Applied rewrites41.7%

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

                      \[\leadsto \frac{y}{x} \cdot \left(\color{blue}{z} \cdot z\right) \]
                    8. Step-by-step derivation
                      1. lower-/.f6429.7

                        \[\leadsto \frac{y}{x} \cdot \left(z \cdot z\right) \]
                    9. Applied rewrites29.7%

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

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

                    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{1}{\color{blue}{\frac{x}{\frac{83333333333333}{1000000000000000}}}} \]
                        4. lower-unsound-/.f6423.1

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

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

                    Alternative 17: 28.9% accurate, 0.4× 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 -2 \cdot 10^{+66}:\\ \;\;\;\;-0.0027777777777778 \cdot \frac{z}{x}\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+299}:\\ \;\;\;\;\frac{1}{\frac{x}{0.083333333333333}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.0027777777777778 \cdot z}{x}\\ \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 -2e+66)
                         (* -0.0027777777777778 (/ z x))
                         (if (<= t_0 5e+299)
                           (/ 1.0 (/ x 0.083333333333333))
                           (/ (* -0.0027777777777778 z) x)))))
                    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 <= -2e+66) {
                    		tmp = -0.0027777777777778 * (z / x);
                    	} else if (t_0 <= 5e+299) {
                    		tmp = 1.0 / (x / 0.083333333333333);
                    	} else {
                    		tmp = (-0.0027777777777778 * z) / x;
                    	}
                    	return tmp;
                    }
                    
                    module fmin_fmax_functions
                        implicit none
                        private
                        public fmax
                        public fmin
                    
                        interface fmax
                            module procedure fmax88
                            module procedure fmax44
                            module procedure fmax84
                            module procedure fmax48
                        end interface
                        interface fmin
                            module procedure fmin88
                            module procedure fmin44
                            module procedure fmin84
                            module procedure fmin48
                        end interface
                    contains
                        real(8) function fmax88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmax44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmax84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmax48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                        end function
                        real(8) function fmin88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmin44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmin84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmin48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                        end function
                    end module
                    
                    real(8) function code(x, y, z)
                    use fmin_fmax_functions
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8) :: 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 <= (-2d+66)) then
                            tmp = (-0.0027777777777778d0) * (z / x)
                        else if (t_0 <= 5d+299) then
                            tmp = 1.0d0 / (x / 0.083333333333333d0)
                        else
                            tmp = ((-0.0027777777777778d0) * z) / x
                        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 <= -2e+66) {
                    		tmp = -0.0027777777777778 * (z / x);
                    	} else if (t_0 <= 5e+299) {
                    		tmp = 1.0 / (x / 0.083333333333333);
                    	} else {
                    		tmp = (-0.0027777777777778 * z) / x;
                    	}
                    	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 <= -2e+66:
                    		tmp = -0.0027777777777778 * (z / x)
                    	elif t_0 <= 5e+299:
                    		tmp = 1.0 / (x / 0.083333333333333)
                    	else:
                    		tmp = (-0.0027777777777778 * z) / x
                    	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 <= -2e+66)
                    		tmp = Float64(-0.0027777777777778 * Float64(z / x));
                    	elseif (t_0 <= 5e+299)
                    		tmp = Float64(1.0 / Float64(x / 0.083333333333333));
                    	else
                    		tmp = Float64(Float64(-0.0027777777777778 * z) / x);
                    	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 <= -2e+66)
                    		tmp = -0.0027777777777778 * (z / x);
                    	elseif (t_0 <= 5e+299)
                    		tmp = 1.0 / (x / 0.083333333333333);
                    	else
                    		tmp = (-0.0027777777777778 * z) / x;
                    	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, -2e+66], N[(-0.0027777777777778 * N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+299], N[(1.0 / N[(x / 0.083333333333333), $MachinePrecision]), $MachinePrecision], N[(N[(-0.0027777777777778 * z), $MachinePrecision] / x), $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 -2 \cdot 10^{+66}:\\
                    \;\;\;\;-0.0027777777777778 \cdot \frac{z}{x}\\
                    
                    \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+299}:\\
                    \;\;\;\;\frac{1}{\frac{x}{0.083333333333333}}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{-0.0027777777777778 \cdot z}{x}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 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)) < -1.99999999999999989e66

                      1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{-13888888888889}{5000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x}} \]
                      6. Step-by-step derivation
                        1. lower-fma.f64N/A

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

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

                          \[\leadsto \mathsf{fma}\left(\frac{-13888888888889}{5000000000000000}, \frac{z}{x}, \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x}\right) \]
                        4. lower-/.f6429.0

                          \[\leadsto \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, 0.083333333333333 \cdot \frac{1}{x}\right) \]
                      7. Applied rewrites29.0%

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

                        \[\leadsto \frac{-13888888888889}{5000000000000000} \cdot \frac{z}{\color{blue}{x}} \]
                      9. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto \frac{-13888888888889}{5000000000000000} \cdot \frac{z}{x} \]
                        2. lower-/.f648.7

                          \[\leadsto -0.0027777777777778 \cdot \frac{z}{x} \]
                      10. Applied rewrites8.7%

                        \[\leadsto -0.0027777777777778 \cdot \frac{z}{\color{blue}{x}} \]

                      if -1.99999999999999989e66 < (+.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)) < 5.0000000000000003e299

                      1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{1}{\color{blue}{\frac{x}{\frac{83333333333333}{1000000000000000}}}} \]
                          4. lower-unsound-/.f6423.1

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

                          \[\leadsto \frac{1}{\color{blue}{\frac{x}{0.083333333333333}}} \]

                        if 5.0000000000000003e299 < (+.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 94.0%

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{-13888888888889}{5000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x}} \]
                        6. Step-by-step derivation
                          1. lower-fma.f64N/A

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

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

                            \[\leadsto \mathsf{fma}\left(\frac{-13888888888889}{5000000000000000}, \frac{z}{x}, \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x}\right) \]
                          4. lower-/.f6429.0

                            \[\leadsto \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, 0.083333333333333 \cdot \frac{1}{x}\right) \]
                        7. Applied rewrites29.0%

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

                          \[\leadsto \frac{-13888888888889}{5000000000000000} \cdot \frac{z}{\color{blue}{x}} \]
                        9. Step-by-step derivation
                          1. lower-*.f64N/A

                            \[\leadsto \frac{-13888888888889}{5000000000000000} \cdot \frac{z}{x} \]
                          2. lower-/.f648.7

                            \[\leadsto -0.0027777777777778 \cdot \frac{z}{x} \]
                        10. Applied rewrites8.7%

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

                            \[\leadsto \frac{-13888888888889}{5000000000000000} \cdot \frac{z}{x} \]
                          2. lift-/.f64N/A

                            \[\leadsto \frac{-13888888888889}{5000000000000000} \cdot \frac{z}{x} \]
                          3. associate-*r/N/A

                            \[\leadsto \frac{\frac{-13888888888889}{5000000000000000} \cdot z}{x} \]
                          4. lower-/.f64N/A

                            \[\leadsto \frac{\frac{-13888888888889}{5000000000000000} \cdot z}{x} \]
                          5. lower-*.f648.7

                            \[\leadsto \frac{-0.0027777777777778 \cdot z}{x} \]
                        12. Applied rewrites8.7%

                          \[\leadsto \frac{-0.0027777777777778 \cdot z}{x} \]
                      7. Recombined 3 regimes into one program.
                      8. Add Preprocessing

                      Alternative 18: 28.5% accurate, 0.4× 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 -2 \cdot 10^{+66}:\\ \;\;\;\;-0.0027777777777778 \cdot \frac{z}{x}\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+299}:\\ \;\;\;\;\frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.0027777777777778 \cdot z}{x}\\ \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 -2e+66)
                           (* -0.0027777777777778 (/ z x))
                           (if (<= t_0 5e+299)
                             (/ 0.083333333333333 x)
                             (/ (* -0.0027777777777778 z) x)))))
                      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 <= -2e+66) {
                      		tmp = -0.0027777777777778 * (z / x);
                      	} else if (t_0 <= 5e+299) {
                      		tmp = 0.083333333333333 / x;
                      	} else {
                      		tmp = (-0.0027777777777778 * z) / x;
                      	}
                      	return tmp;
                      }
                      
                      module fmin_fmax_functions
                          implicit none
                          private
                          public fmax
                          public fmin
                      
                          interface fmax
                              module procedure fmax88
                              module procedure fmax44
                              module procedure fmax84
                              module procedure fmax48
                          end interface
                          interface fmin
                              module procedure fmin88
                              module procedure fmin44
                              module procedure fmin84
                              module procedure fmin48
                          end interface
                      contains
                          real(8) function fmax88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmax44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmax84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmax48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                          end function
                          real(8) function fmin88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmin44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmin84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmin48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                          end function
                      end module
                      
                      real(8) function code(x, y, z)
                      use fmin_fmax_functions
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          real(8), intent (in) :: z
                          real(8) :: 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 <= (-2d+66)) then
                              tmp = (-0.0027777777777778d0) * (z / x)
                          else if (t_0 <= 5d+299) then
                              tmp = 0.083333333333333d0 / x
                          else
                              tmp = ((-0.0027777777777778d0) * z) / x
                          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 <= -2e+66) {
                      		tmp = -0.0027777777777778 * (z / x);
                      	} else if (t_0 <= 5e+299) {
                      		tmp = 0.083333333333333 / x;
                      	} else {
                      		tmp = (-0.0027777777777778 * z) / x;
                      	}
                      	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 <= -2e+66:
                      		tmp = -0.0027777777777778 * (z / x)
                      	elif t_0 <= 5e+299:
                      		tmp = 0.083333333333333 / x
                      	else:
                      		tmp = (-0.0027777777777778 * z) / x
                      	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 <= -2e+66)
                      		tmp = Float64(-0.0027777777777778 * Float64(z / x));
                      	elseif (t_0 <= 5e+299)
                      		tmp = Float64(0.083333333333333 / x);
                      	else
                      		tmp = Float64(Float64(-0.0027777777777778 * z) / x);
                      	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 <= -2e+66)
                      		tmp = -0.0027777777777778 * (z / x);
                      	elseif (t_0 <= 5e+299)
                      		tmp = 0.083333333333333 / x;
                      	else
                      		tmp = (-0.0027777777777778 * z) / x;
                      	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, -2e+66], N[(-0.0027777777777778 * N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+299], N[(0.083333333333333 / x), $MachinePrecision], N[(N[(-0.0027777777777778 * z), $MachinePrecision] / x), $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 -2 \cdot 10^{+66}:\\
                      \;\;\;\;-0.0027777777777778 \cdot \frac{z}{x}\\
                      
                      \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+299}:\\
                      \;\;\;\;\frac{0.083333333333333}{x}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{-0.0027777777777778 \cdot z}{x}\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 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)) < -1.99999999999999989e66

                        1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{-13888888888889}{5000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x}} \]
                        6. Step-by-step derivation
                          1. lower-fma.f64N/A

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

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

                            \[\leadsto \mathsf{fma}\left(\frac{-13888888888889}{5000000000000000}, \frac{z}{x}, \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x}\right) \]
                          4. lower-/.f6429.0

                            \[\leadsto \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, 0.083333333333333 \cdot \frac{1}{x}\right) \]
                        7. Applied rewrites29.0%

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

                          \[\leadsto \frac{-13888888888889}{5000000000000000} \cdot \frac{z}{\color{blue}{x}} \]
                        9. Step-by-step derivation
                          1. lower-*.f64N/A

                            \[\leadsto \frac{-13888888888889}{5000000000000000} \cdot \frac{z}{x} \]
                          2. lower-/.f648.7

                            \[\leadsto -0.0027777777777778 \cdot \frac{z}{x} \]
                        10. Applied rewrites8.7%

                          \[\leadsto -0.0027777777777778 \cdot \frac{z}{\color{blue}{x}} \]

                        if -1.99999999999999989e66 < (+.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)) < 5.0000000000000003e299

                        1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{0.083333333333333}{x} \]

                          if 5.0000000000000003e299 < (+.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 94.0%

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{-13888888888889}{5000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x}} \]
                          6. Step-by-step derivation
                            1. lower-fma.f64N/A

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

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

                              \[\leadsto \mathsf{fma}\left(\frac{-13888888888889}{5000000000000000}, \frac{z}{x}, \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x}\right) \]
                            4. lower-/.f6429.0

                              \[\leadsto \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, 0.083333333333333 \cdot \frac{1}{x}\right) \]
                          7. Applied rewrites29.0%

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

                            \[\leadsto \frac{-13888888888889}{5000000000000000} \cdot \frac{z}{\color{blue}{x}} \]
                          9. Step-by-step derivation
                            1. lower-*.f64N/A

                              \[\leadsto \frac{-13888888888889}{5000000000000000} \cdot \frac{z}{x} \]
                            2. lower-/.f648.7

                              \[\leadsto -0.0027777777777778 \cdot \frac{z}{x} \]
                          10. Applied rewrites8.7%

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

                              \[\leadsto \frac{-13888888888889}{5000000000000000} \cdot \frac{z}{x} \]
                            2. lift-/.f64N/A

                              \[\leadsto \frac{-13888888888889}{5000000000000000} \cdot \frac{z}{x} \]
                            3. associate-*r/N/A

                              \[\leadsto \frac{\frac{-13888888888889}{5000000000000000} \cdot z}{x} \]
                            4. lower-/.f64N/A

                              \[\leadsto \frac{\frac{-13888888888889}{5000000000000000} \cdot z}{x} \]
                            5. lower-*.f648.7

                              \[\leadsto \frac{-0.0027777777777778 \cdot z}{x} \]
                          12. Applied rewrites8.7%

                            \[\leadsto \frac{-0.0027777777777778 \cdot z}{x} \]
                        7. Recombined 3 regimes into one program.
                        8. Add Preprocessing

                        Alternative 19: 28.4% accurate, 0.4× 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}\\ t_1 := -0.0027777777777778 \cdot \frac{z}{x}\\ \mathbf{if}\;t\_0 \leq -2 \cdot 10^{+66}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+299}:\\ \;\;\;\;\frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \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)))
                                (t_1 (* -0.0027777777777778 (/ z x))))
                           (if (<= t_0 -2e+66) t_1 (if (<= t_0 5e+299) (/ 0.083333333333333 x) t_1))))
                        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 t_1 = -0.0027777777777778 * (z / x);
                        	double tmp;
                        	if (t_0 <= -2e+66) {
                        		tmp = t_1;
                        	} else if (t_0 <= 5e+299) {
                        		tmp = 0.083333333333333 / x;
                        	} else {
                        		tmp = t_1;
                        	}
                        	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) :: t_1
                            real(8) :: tmp
                            t_0 = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
                            t_1 = (-0.0027777777777778d0) * (z / x)
                            if (t_0 <= (-2d+66)) then
                                tmp = t_1
                            else if (t_0 <= 5d+299) then
                                tmp = 0.083333333333333d0 / x
                            else
                                tmp = t_1
                            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 t_1 = -0.0027777777777778 * (z / x);
                        	double tmp;
                        	if (t_0 <= -2e+66) {
                        		tmp = t_1;
                        	} else if (t_0 <= 5e+299) {
                        		tmp = 0.083333333333333 / x;
                        	} else {
                        		tmp = t_1;
                        	}
                        	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)
                        	t_1 = -0.0027777777777778 * (z / x)
                        	tmp = 0
                        	if t_0 <= -2e+66:
                        		tmp = t_1
                        	elif t_0 <= 5e+299:
                        		tmp = 0.083333333333333 / x
                        	else:
                        		tmp = t_1
                        	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))
                        	t_1 = Float64(-0.0027777777777778 * Float64(z / x))
                        	tmp = 0.0
                        	if (t_0 <= -2e+66)
                        		tmp = t_1;
                        	elseif (t_0 <= 5e+299)
                        		tmp = Float64(0.083333333333333 / x);
                        	else
                        		tmp = t_1;
                        	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);
                        	t_1 = -0.0027777777777778 * (z / x);
                        	tmp = 0.0;
                        	if (t_0 <= -2e+66)
                        		tmp = t_1;
                        	elseif (t_0 <= 5e+299)
                        		tmp = 0.083333333333333 / x;
                        	else
                        		tmp = t_1;
                        	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]}, Block[{t$95$1 = N[(-0.0027777777777778 * N[(z / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e+66], t$95$1, If[LessEqual[t$95$0, 5e+299], N[(0.083333333333333 / x), $MachinePrecision], t$95$1]]]]
                        
                        \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}\\
                        t_1 := -0.0027777777777778 \cdot \frac{z}{x}\\
                        \mathbf{if}\;t\_0 \leq -2 \cdot 10^{+66}:\\
                        \;\;\;\;t\_1\\
                        
                        \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+299}:\\
                        \;\;\;\;\frac{0.083333333333333}{x}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_1\\
                        
                        
                        \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)) < -1.99999999999999989e66 or 5.0000000000000003e299 < (+.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 94.0%

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{-13888888888889}{5000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x}} \]
                          6. Step-by-step derivation
                            1. lower-fma.f64N/A

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

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

                              \[\leadsto \mathsf{fma}\left(\frac{-13888888888889}{5000000000000000}, \frac{z}{x}, \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x}\right) \]
                            4. lower-/.f6429.0

                              \[\leadsto \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, 0.083333333333333 \cdot \frac{1}{x}\right) \]
                          7. Applied rewrites29.0%

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

                            \[\leadsto \frac{-13888888888889}{5000000000000000} \cdot \frac{z}{\color{blue}{x}} \]
                          9. Step-by-step derivation
                            1. lower-*.f64N/A

                              \[\leadsto \frac{-13888888888889}{5000000000000000} \cdot \frac{z}{x} \]
                            2. lower-/.f648.7

                              \[\leadsto -0.0027777777777778 \cdot \frac{z}{x} \]
                          10. Applied rewrites8.7%

                            \[\leadsto -0.0027777777777778 \cdot \frac{z}{\color{blue}{x}} \]

                          if -1.99999999999999989e66 < (+.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)) < 5.0000000000000003e299

                          1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 20: 28.4% accurate, 4.0× speedup?

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{-13888888888889}{5000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x}} \]
                          6. Step-by-step derivation
                            1. lower-fma.f64N/A

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

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

                              \[\leadsto \mathsf{fma}\left(\frac{-13888888888889}{5000000000000000}, \frac{z}{x}, \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x}\right) \]
                            4. lower-/.f6429.0

                              \[\leadsto \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, 0.083333333333333 \cdot \frac{1}{x}\right) \]
                          7. Applied rewrites29.0%

                            \[\leadsto \mathsf{fma}\left(-0.0027777777777778, \color{blue}{\frac{z}{x}}, 0.083333333333333 \cdot \frac{1}{x}\right) \]
                          8. Step-by-step derivation
                            1. lift-fma.f64N/A

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

                              \[\leadsto \frac{-13888888888889}{5000000000000000} \cdot \frac{z}{x} + \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} \]
                            3. associate-*r/N/A

                              \[\leadsto \frac{\frac{-13888888888889}{5000000000000000} \cdot z}{x} + \frac{83333333333333}{1000000000000000} \cdot \frac{\color{blue}{1}}{x} \]
                            4. lift-*.f64N/A

                              \[\leadsto \frac{\frac{-13888888888889}{5000000000000000} \cdot z}{x} + \frac{83333333333333}{1000000000000000} \cdot \frac{1}{\color{blue}{x}} \]
                            5. lift-/.f64N/A

                              \[\leadsto \frac{\frac{-13888888888889}{5000000000000000} \cdot z}{x} + \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} \]
                            6. mult-flip-revN/A

                              \[\leadsto \frac{\frac{-13888888888889}{5000000000000000} \cdot z}{x} + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
                            7. div-add-revN/A

                              \[\leadsto \frac{\frac{-13888888888889}{5000000000000000} \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
                            8. lower-/.f64N/A

                              \[\leadsto \frac{\frac{-13888888888889}{5000000000000000} \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
                            9. lower-fma.f6428.9

                              \[\leadsto \frac{\mathsf{fma}\left(-0.0027777777777778, z, 0.083333333333333\right)}{x} \]
                          9. Applied rewrites28.9%

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

                          Alternative 21: 23.1% accurate, 8.7× speedup?

                          \[\begin{array}{l} \\ \frac{0.083333333333333}{x} \end{array} \]
                          (FPCore (x y z) :precision binary64 (/ 0.083333333333333 x))
                          double code(double x, double y, double z) {
                          	return 0.083333333333333 / x;
                          }
                          
                          module fmin_fmax_functions
                              implicit none
                              private
                              public fmax
                              public fmin
                          
                              interface fmax
                                  module procedure fmax88
                                  module procedure fmax44
                                  module procedure fmax84
                                  module procedure fmax48
                              end interface
                              interface fmin
                                  module procedure fmin88
                                  module procedure fmin44
                                  module procedure fmin84
                                  module procedure fmin48
                              end interface
                          contains
                              real(8) function fmax88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmax44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmax84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmax48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                              end function
                              real(8) function fmin88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmin44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmin84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmin48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                              end function
                          end module
                          
                          real(8) function code(x, y, z)
                          use fmin_fmax_functions
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              real(8), intent (in) :: z
                              code = 0.083333333333333d0 / x
                          end function
                          
                          public static double code(double x, double y, double z) {
                          	return 0.083333333333333 / x;
                          }
                          
                          def code(x, y, z):
                          	return 0.083333333333333 / x
                          
                          function code(x, y, z)
                          	return Float64(0.083333333333333 / x)
                          end
                          
                          function tmp = code(x, y, z)
                          	tmp = 0.083333333333333 / x;
                          end
                          
                          code[x_, y_, z_] := N[(0.083333333333333 / x), $MachinePrecision]
                          
                          \begin{array}{l}
                          
                          \\
                          \frac{0.083333333333333}{x}
                          \end{array}
                          
                          Derivation
                          1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

                            Reproduce

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