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

Percentage Accurate: 93.7% → 98.6%
Time: 6.1s
Alternatives: 22
Speedup: 1.0×

Specification

?
\[\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} \]
(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]
\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}

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

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

Initial Program: 93.7% accurate, 1.0× speedup?

\[\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} \]
(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]
\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}

Alternative 1: 98.6% accurate, 1.0× speedup?

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

    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  2. 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. lift-/.f64N/A

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

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

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

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

      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
    7. lower--.f64N/A

      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
  3. Applied rewrites98.6%

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

Alternative 2: 95.7% accurate, 0.9× speedup?

\[\begin{array}{l} \mathbf{if}\;x \leq 1.2 \cdot 10^{+200}:\\ \;\;\;\;\mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - x\right) - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.0007936500793651 - y, z, 0.0027777777777778\right), z, -0.083333333333333\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z, \frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x}, \frac{0.083333333333333}{x}\right) - \mathsf{fma}\left(0.5 - x, \log x, x - 0.91893853320467\right)\\ \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 1.2e+200)
   (-
    (fma (log x) (- x 0.5) (- 0.91893853320467 x))
    (/
     (fma
      (fma (- -0.0007936500793651 y) z 0.0027777777777778)
      z
      -0.083333333333333)
     x))
   (-
    (fma
     z
     (/ (fma 0.0007936500793651 z -0.0027777777777778) x)
     (/ 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.2e+200) {
		tmp = fma(log(x), (x - 0.5), (0.91893853320467 - x)) - (fma(fma((-0.0007936500793651 - y), z, 0.0027777777777778), z, -0.083333333333333) / x);
	} else {
		tmp = fma(z, (fma(0.0007936500793651, z, -0.0027777777777778) / x), (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.2e+200)
		tmp = Float64(fma(log(x), Float64(x - 0.5), Float64(0.91893853320467 - x)) - Float64(fma(fma(Float64(-0.0007936500793651 - y), z, 0.0027777777777778), z, -0.083333333333333) / x));
	else
		tmp = Float64(fma(z, Float64(fma(0.0007936500793651, z, -0.0027777777777778) / x), 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.2e+200], N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(-0.0007936500793651 - y), $MachinePrecision] * z + 0.0027777777777778), $MachinePrecision] * z + -0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(N[(0.0007936500793651 * z + -0.0027777777777778), $MachinePrecision] / x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision] - N[(N[(0.5 - x), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(x - 0.91893853320467), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;x \leq 1.2 \cdot 10^{+200}:\\
\;\;\;\;\mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - x\right) - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.0007936500793651 - y, z, 0.0027777777777778\right), z, -0.083333333333333\right)}{x}\\

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


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

    1. Initial program 93.7%

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

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

    if 1.2e200 < x

    1. Initial program 93.7%

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\color{blue}{\frac{7936500793651}{10000000000000000}} \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    3. Step-by-step derivation
      1. Applied rewrites78.3%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\color{blue}{0.0007936500793651} \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. Applied rewrites78.3%

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{\mathsf{fma}\left(\frac{7936500793651}{10000000000000000}, z, \frac{-13888888888889}{5000000000000000}\right)}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right)} - \mathsf{fma}\left(\frac{1}{2} - x, \log x, x - \frac{91893853320467}{100000000000000}\right) \]
        8. lower-/.f6480.9%

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

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

    Alternative 3: 94.7% accurate, 1.0× speedup?

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

      1. Initial program 93.7%

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

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

      if 1.1500000000000001e206 < x

      1. Initial program 93.7%

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\color{blue}{\frac{-13888888888889}{5000000000000000}} \cdot z + 0.083333333333333}{x} \]
      3. Step-by-step derivation
        1. Applied rewrites63.6%

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

      Alternative 4: 93.8% accurate, 0.9× speedup?

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

        1. Initial program 93.7%

          \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
        2. 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. lift-/.f64N/A

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

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

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

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

            \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
          7. lower--.f64N/A

            \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
        3. Applied rewrites98.6%

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

          \[\leadsto \mathsf{fma}\left(\frac{z}{x}, \color{blue}{y \cdot z}, \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - x\right)\right) - \frac{-0.083333333333333}{x} \]
        5. Step-by-step derivation
          1. lower-*.f6484.6%

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

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

        if -9.4999999999999994e22 < y < 4.8000000000000002e-91

        1. Initial program 93.7%

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

          \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\color{blue}{\frac{7936500793651}{10000000000000000}} \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
        3. Step-by-step derivation
          1. Applied rewrites78.3%

            \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\color{blue}{0.0007936500793651} \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
          2. Applied rewrites78.3%

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

        Alternative 5: 91.8% accurate, 0.9× speedup?

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

          1. Initial program 93.7%

            \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
          2. 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. lift-/.f64N/A

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

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

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

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

              \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
            7. lower--.f64N/A

              \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
          3. Applied rewrites98.6%

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

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

            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{y \cdot z}, z, 0.083333333333333\right), \frac{1}{x}, \mathsf{fma}\left(x - 0.5, \log x, 0.91893853320467 - x\right)\right) \]
          6. Step-by-step derivation
            1. lower-*.f6482.2%

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

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

          if -2.4e25 < y < 9.9999999999999998e-114

          1. Initial program 93.7%

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

            \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\color{blue}{\frac{7936500793651}{10000000000000000}} \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
          3. Step-by-step derivation
            1. Applied rewrites78.3%

              \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\color{blue}{0.0007936500793651} \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
            2. Applied rewrites78.3%

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

          Alternative 6: 89.7% accurate, 0.5× speedup?

          \[\begin{array}{l} \mathbf{if}\;\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} \leq 100:\\ \;\;\;\;\left(\frac{y - -0.0007936500793651}{x} \cdot z\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x} - \mathsf{fma}\left(0.5 - x, \log x, x - 0.91893853320467\right)\\ \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (if (<=
                (+
                 (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
                 (/
                  (+
                   (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
                   0.083333333333333)
                  x))
                100.0)
             (* (* (/ (- y -0.0007936500793651) x) z) z)
             (-
              (/
               (fma (fma 0.0007936500793651 z -0.0027777777777778) 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 - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) <= 100.0) {
          		tmp = (((y - -0.0007936500793651) / x) * z) * z;
          	} else {
          		tmp = (fma(fma(0.0007936500793651, z, -0.0027777777777778), z, 0.083333333333333) / x) - fma((0.5 - x), log(x), (x - 0.91893853320467));
          	}
          	return tmp;
          }
          
          function code(x, y, z)
          	tmp = 0.0
          	if (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)) <= 100.0)
          		tmp = Float64(Float64(Float64(Float64(y - -0.0007936500793651) / x) * z) * z);
          	else
          		tmp = Float64(Float64(fma(fma(0.0007936500793651, z, -0.0027777777777778), 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[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], 100.0], N[(N[(N[(N[(y - -0.0007936500793651), $MachinePrecision] / x), $MachinePrecision] * z), $MachinePrecision] * z), $MachinePrecision], N[(N[(N[(N[(0.0007936500793651 * z + -0.0027777777777778), $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}
          \mathbf{if}\;\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} \leq 100:\\
          \;\;\;\;\left(\frac{y - -0.0007936500793651}{x} \cdot z\right) \cdot z\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x} - \mathsf{fma}\left(0.5 - x, \log x, x - 0.91893853320467\right)\\
          
          
          \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)) < 100

            1. Initial program 93.7%

              \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
            2. 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.4%

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

              \[\leadsto \color{blue}{{z}^{2} \cdot \mathsf{fma}\left(0.0007936500793651, \frac{1}{x}, \frac{y}{x}\right)} \]
            5. Applied rewrites43.3%

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

            if 100 < (+.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 93.7%

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

              \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\color{blue}{\frac{7936500793651}{10000000000000000}} \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
            3. Step-by-step derivation
              1. Applied rewrites78.3%

                \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\color{blue}{0.0007936500793651} \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
              2. Applied rewrites78.3%

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

            Alternative 7: 87.9% accurate, 0.4× speedup?

            \[\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 100:\\ \;\;\;\;\left(\frac{y - -0.0007936500793651}{x} \cdot z\right) \cdot z\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+306}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{x}, 0.083333333333333, \mathsf{fma}\left(x - 0.5, \log x, 0.91893853320467 - x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z \cdot \left(0.0007936500793651 + y\right), \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\ \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 100.0)
                 (* (* (/ (- y -0.0007936500793651) x) z) z)
                 (if (<= t_0 5e+306)
                   (fma
                    (/ 1.0 x)
                    0.083333333333333
                    (fma (- x 0.5) (log x) (- 0.91893853320467 x)))
                   (fma (* z (+ 0.0007936500793651 y)) (/ z x) (/ 0.083333333333333 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 <= 100.0) {
            		tmp = (((y - -0.0007936500793651) / x) * z) * z;
            	} else if (t_0 <= 5e+306) {
            		tmp = fma((1.0 / x), 0.083333333333333, fma((x - 0.5), log(x), (0.91893853320467 - x)));
            	} else {
            		tmp = fma((z * (0.0007936500793651 + y)), (z / x), (0.083333333333333 / 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 <= 100.0)
            		tmp = Float64(Float64(Float64(Float64(y - -0.0007936500793651) / x) * z) * z);
            	elseif (t_0 <= 5e+306)
            		tmp = fma(Float64(1.0 / x), 0.083333333333333, fma(Float64(x - 0.5), log(x), Float64(0.91893853320467 - x)));
            	else
            		tmp = fma(Float64(z * Float64(0.0007936500793651 + y)), Float64(z / x), Float64(0.083333333333333 / x));
            	end
            	return 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, 100.0], N[(N[(N[(N[(y - -0.0007936500793651), $MachinePrecision] / x), $MachinePrecision] * z), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t$95$0, 5e+306], N[(N[(1.0 / x), $MachinePrecision] * 0.083333333333333 + N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] * N[(z / x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]]]
            
            \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 100:\\
            \;\;\;\;\left(\frac{y - -0.0007936500793651}{x} \cdot z\right) \cdot z\\
            
            \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+306}:\\
            \;\;\;\;\mathsf{fma}\left(\frac{1}{x}, 0.083333333333333, \mathsf{fma}\left(x - 0.5, \log x, 0.91893853320467 - x\right)\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(z \cdot \left(0.0007936500793651 + y\right), \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\
            
            
            \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)) < 100

              1. Initial program 93.7%

                \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
              2. 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.4%

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

                \[\leadsto \color{blue}{{z}^{2} \cdot \mathsf{fma}\left(0.0007936500793651, \frac{1}{x}, \frac{y}{x}\right)} \]
              5. Applied rewrites43.3%

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

              if 100 < (+.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)) < 4.9999999999999999e306

              1. Initial program 93.7%

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

                \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\color{blue}{\frac{83333333333333}{1000000000000000}}}{x} \]
              3. Step-by-step derivation
                1. Applied rewrites57.8%

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{x}}, 0.083333333333333, \left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) \]
                  8. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

                if 4.9999999999999999e306 < (+.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 93.7%

                  \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                2. 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. lift-/.f64N/A

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

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

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

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

                    \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                  7. lower--.f64N/A

                    \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                3. Applied rewrites98.6%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{x}, \mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - x\right)\right) - \frac{-0.083333333333333}{x}} \]
                4. 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}} \]
                5. 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.0%

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

                  \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
                7. 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. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 8: 87.9% accurate, 0.4× speedup?

              \[\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 100:\\ \;\;\;\;\left(\frac{y - -0.0007936500793651}{x} \cdot z\right) \cdot z\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+306}:\\ \;\;\;\;\frac{0.083333333333333}{x} - \mathsf{fma}\left(0.5 - x, \log x, x - 0.91893853320467\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z \cdot \left(0.0007936500793651 + y\right), \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\ \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 100.0)
                   (* (* (/ (- y -0.0007936500793651) x) z) z)
                   (if (<= t_0 5e+306)
                     (-
                      (/ 0.083333333333333 x)
                      (fma (- 0.5 x) (log x) (- x 0.91893853320467)))
                     (fma (* z (+ 0.0007936500793651 y)) (/ z x) (/ 0.083333333333333 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 <= 100.0) {
              		tmp = (((y - -0.0007936500793651) / x) * z) * z;
              	} else if (t_0 <= 5e+306) {
              		tmp = (0.083333333333333 / x) - fma((0.5 - x), log(x), (x - 0.91893853320467));
              	} else {
              		tmp = fma((z * (0.0007936500793651 + y)), (z / x), (0.083333333333333 / 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 <= 100.0)
              		tmp = Float64(Float64(Float64(Float64(y - -0.0007936500793651) / x) * z) * z);
              	elseif (t_0 <= 5e+306)
              		tmp = Float64(Float64(0.083333333333333 / x) - fma(Float64(0.5 - x), log(x), Float64(x - 0.91893853320467)));
              	else
              		tmp = fma(Float64(z * Float64(0.0007936500793651 + y)), Float64(z / x), Float64(0.083333333333333 / x));
              	end
              	return 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, 100.0], N[(N[(N[(N[(y - -0.0007936500793651), $MachinePrecision] / x), $MachinePrecision] * z), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t$95$0, 5e+306], N[(N[(0.083333333333333 / x), $MachinePrecision] - N[(N[(0.5 - x), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(x - 0.91893853320467), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] * N[(z / x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]]]
              
              \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 100:\\
              \;\;\;\;\left(\frac{y - -0.0007936500793651}{x} \cdot z\right) \cdot z\\
              
              \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+306}:\\
              \;\;\;\;\frac{0.083333333333333}{x} - \mathsf{fma}\left(0.5 - x, \log x, x - 0.91893853320467\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;\mathsf{fma}\left(z \cdot \left(0.0007936500793651 + y\right), \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\
              
              
              \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)) < 100

                1. Initial program 93.7%

                  \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                2. 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.4%

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

                  \[\leadsto \color{blue}{{z}^{2} \cdot \mathsf{fma}\left(0.0007936500793651, \frac{1}{x}, \frac{y}{x}\right)} \]
                5. Applied rewrites43.3%

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

                if 100 < (+.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)) < 4.9999999999999999e306

                1. Initial program 93.7%

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

                  \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\color{blue}{\frac{83333333333333}{1000000000000000}}}{x} \]
                3. Step-by-step derivation
                  1. Applied rewrites57.8%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(\left(1 - \frac{x}{\color{blue}{\log x \cdot \left(x - \frac{1}{2}\right)}}\right) \cdot \left(\log x \cdot \left(x - \frac{1}{2}\right)\right) + \frac{91893853320467}{100000000000000}\right) + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
                    11. lower-unsound-/.f6457.8%

                      \[\leadsto \left(\left(1 - \color{blue}{\frac{x}{\log x \cdot \left(x - 0.5\right)}}\right) \cdot \left(\log x \cdot \left(x - 0.5\right)\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
                    12. lift-*.f64N/A

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

                      \[\leadsto \left(\left(1 - \frac{x}{\color{blue}{\left(x - \frac{1}{2}\right) \cdot \log x}}\right) \cdot \left(\log x \cdot \left(x - \frac{1}{2}\right)\right) + \frac{91893853320467}{100000000000000}\right) + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
                    14. lift-*.f6457.8%

                      \[\leadsto \left(\left(1 - \frac{x}{\color{blue}{\left(x - 0.5\right) \cdot \log x}}\right) \cdot \left(\log x \cdot \left(x - 0.5\right)\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
                    15. lift-*.f64N/A

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

                      \[\leadsto \left(\left(1 - \frac{x}{\left(x - \frac{1}{2}\right) \cdot \log x}\right) \cdot \color{blue}{\left(\left(x - \frac{1}{2}\right) \cdot \log x\right)} + \frac{91893853320467}{100000000000000}\right) + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
                    17. lift-*.f6457.8%

                      \[\leadsto \left(\left(1 - \frac{x}{\left(x - 0.5\right) \cdot \log x}\right) \cdot \color{blue}{\left(\left(x - 0.5\right) \cdot \log x\right)} + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
                  3. Applied rewrites57.8%

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

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

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

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

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

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

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

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

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

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

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

                  if 4.9999999999999999e306 < (+.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 93.7%

                    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                  2. 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. lift-/.f64N/A

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

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

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

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

                      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                    7. lower--.f64N/A

                      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                  3. Applied rewrites98.6%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{x}, \mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - x\right)\right) - \frac{-0.083333333333333}{x}} \]
                  4. 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}} \]
                  5. 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.0%

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

                    \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
                  7. 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. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 9: 84.3% accurate, 1.0× speedup?

                \[\begin{array}{l} \mathbf{if}\;x \leq 9.6 \cdot 10^{+39}:\\ \;\;\;\;\left(0.91893853320467 + -0.5 \cdot \log x\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\\ \end{array} \]
                (FPCore (x y z)
                 :precision binary64
                 (if (<= x 9.6e+39)
                   (+
                    (+ 0.91893853320467 (* -0.5 (log x)))
                    (/
                     (+
                      (* (- (* (+ 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 <= 9.6e+39) {
                		tmp = (0.91893853320467 + (-0.5 * log(x))) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
                	} else {
                		tmp = x * ((-1.0 * log((1.0 / x))) - 1.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) :: tmp
                    if (x <= 9.6d+39) then
                        tmp = (0.91893853320467d0 + ((-0.5d0) * log(x))) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
                    else
                        tmp = x * (((-1.0d0) * log((1.0d0 / x))) - 1.0d0)
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z) {
                	double tmp;
                	if (x <= 9.6e+39) {
                		tmp = (0.91893853320467 + (-0.5 * Math.log(x))) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
                	} else {
                		tmp = x * ((-1.0 * Math.log((1.0 / x))) - 1.0);
                	}
                	return tmp;
                }
                
                def code(x, y, z):
                	tmp = 0
                	if x <= 9.6e+39:
                		tmp = (0.91893853320467 + (-0.5 * math.log(x))) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
                	else:
                		tmp = x * ((-1.0 * math.log((1.0 / x))) - 1.0)
                	return tmp
                
                function code(x, y, z)
                	tmp = 0.0
                	if (x <= 9.6e+39)
                		tmp = Float64(Float64(0.91893853320467 + Float64(-0.5 * log(x))) + Float64(Float64(Float64(Float64(Float64(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
                
                function tmp_2 = code(x, y, z)
                	tmp = 0.0;
                	if (x <= 9.6e+39)
                		tmp = (0.91893853320467 + (-0.5 * log(x))) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
                	else
                		tmp = x * ((-1.0 * log((1.0 / x))) - 1.0);
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_] := If[LessEqual[x, 9.6e+39], N[(N[(0.91893853320467 + N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(-1.0 * N[Log[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                \mathbf{if}\;x \leq 9.6 \cdot 10^{+39}:\\
                \;\;\;\;\left(0.91893853320467 + -0.5 \cdot \log x\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\
                
                \mathbf{else}:\\
                \;\;\;\;x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\\
                
                
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if x < 9.6000000000000004e39

                  1. Initial program 93.7%

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

                    \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                  3. Step-by-step derivation
                    1. lower-+.f64N/A

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

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

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

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

                  if 9.6000000000000004e39 < x

                  1. Initial program 93.7%

                    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                  2. 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. lift-/.f64N/A

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

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

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

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

                      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                    7. lower--.f64N/A

                      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                  3. Applied rewrites98.6%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{x}, \mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - x\right)\right) - \frac{-0.083333333333333}{x}} \]
                  4. 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}} \]
                  5. 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.0%

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

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

                    \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
                  8. Step-by-step derivation
                    1. lower-/.f6422.9%

                      \[\leadsto \frac{0.083333333333333}{x} \]
                  9. Applied rewrites22.9%

                    \[\leadsto \frac{0.083333333333333}{\color{blue}{x}} \]
                  10. Taylor expanded in x around inf

                    \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} \]
                  11. 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-/.f6436.2%

                      \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
                  12. Applied rewrites36.2%

                    \[\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.1% accurate, 1.6× speedup?

                \[\begin{array}{l} \mathbf{if}\;x \leq 9.6 \cdot 10^{+39}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), z, 0.083333333333333\right) \cdot \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\\ \end{array} \]
                (FPCore (x y z)
                 :precision binary64
                 (if (<= x 9.6e+39)
                   (*
                    (fma
                     (fma z (- y -0.0007936500793651) -0.0027777777777778)
                     z
                     0.083333333333333)
                    (/ 1.0 x))
                   (* x (- (* -1.0 (log (/ 1.0 x))) 1.0))))
                double code(double x, double y, double z) {
                	double tmp;
                	if (x <= 9.6e+39) {
                		tmp = fma(fma(z, (y - -0.0007936500793651), -0.0027777777777778), z, 0.083333333333333) * (1.0 / x);
                	} else {
                		tmp = x * ((-1.0 * log((1.0 / x))) - 1.0);
                	}
                	return tmp;
                }
                
                function code(x, y, z)
                	tmp = 0.0
                	if (x <= 9.6e+39)
                		tmp = Float64(fma(fma(z, Float64(y - -0.0007936500793651), -0.0027777777777778), z, 0.083333333333333) * Float64(1.0 / 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, 9.6e+39], N[(N[(N[(z * N[(y - -0.0007936500793651), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(-1.0 * N[Log[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                \mathbf{if}\;x \leq 9.6 \cdot 10^{+39}:\\
                \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), z, 0.083333333333333\right) \cdot \frac{1}{x}\\
                
                \mathbf{else}:\\
                \;\;\;\;x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\\
                
                
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if x < 9.6000000000000004e39

                  1. Initial program 93.7%

                    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                  2. 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. lift-/.f64N/A

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

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

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

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

                      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                    7. lower--.f64N/A

                      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                  3. Applied rewrites98.6%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{x}, \mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - x\right)\right) - \frac{-0.083333333333333}{x}} \]
                  4. 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}} \]
                  5. 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.0%

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

                    \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
                  7. 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. mult-flipN/A

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

                      \[\leadsto \left(\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right) \cdot \frac{1}{\color{blue}{x}} \]
                    4. lower-*.f6461.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(\mathsf{fma}\left(z, y - \frac{-7936500793651}{10000000000000000}, \frac{-13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}\right) \cdot \frac{1}{x} \]
                    19. lower-fma.f6461.9%

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

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

                  if 9.6000000000000004e39 < x

                  1. Initial program 93.7%

                    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                  2. 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. lift-/.f64N/A

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

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

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

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

                      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                    7. lower--.f64N/A

                      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                  3. Applied rewrites98.6%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{x}, \mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - x\right)\right) - \frac{-0.083333333333333}{x}} \]
                  4. 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}} \]
                  5. 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.0%

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

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

                    \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
                  8. Step-by-step derivation
                    1. lower-/.f6422.9%

                      \[\leadsto \frac{0.083333333333333}{x} \]
                  9. Applied rewrites22.9%

                    \[\leadsto \frac{0.083333333333333}{\color{blue}{x}} \]
                  10. Taylor expanded in x around inf

                    \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} \]
                  11. 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-/.f6436.2%

                      \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
                  12. Applied rewrites36.2%

                    \[\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 11: 84.1% accurate, 1.6× speedup?

                \[\begin{array}{l} \mathbf{if}\;x \leq 9.6 \cdot 10^{+39}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -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} \]
                (FPCore (x y z)
                 :precision binary64
                 (if (<= x 9.6e+39)
                   (/
                    (fma
                     (fma z (- y -0.0007936500793651) -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 <= 9.6e+39) {
                		tmp = fma(fma(z, (y - -0.0007936500793651), -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 <= 9.6e+39)
                		tmp = Float64(fma(fma(z, Float64(y - -0.0007936500793651), -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, 9.6e+39], N[(N[(N[(z * N[(y - -0.0007936500793651), $MachinePrecision] + -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}
                \mathbf{if}\;x \leq 9.6 \cdot 10^{+39}:\\
                \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -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}
                
                Derivation
                1. Split input into 2 regimes
                2. if x < 9.6000000000000004e39

                  1. Initial program 93.7%

                    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                  2. 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. lift-/.f64N/A

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

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

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

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

                      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                    7. lower--.f64N/A

                      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                  3. Applied rewrites98.6%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{x}, \mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - x\right)\right) - \frac{-0.083333333333333}{x}} \]
                  4. 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}} \]
                  5. 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.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 9.6000000000000004e39 < x

                  1. Initial program 93.7%

                    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                  2. 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. lift-/.f64N/A

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

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

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

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

                      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                    7. lower--.f64N/A

                      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                  3. Applied rewrites98.6%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{x}, \mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - x\right)\right) - \frac{-0.083333333333333}{x}} \]
                  4. 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}} \]
                  5. 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.0%

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

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

                    \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
                  8. Step-by-step derivation
                    1. lower-/.f6422.9%

                      \[\leadsto \frac{0.083333333333333}{x} \]
                  9. Applied rewrites22.9%

                    \[\leadsto \frac{0.083333333333333}{\color{blue}{x}} \]
                  10. Taylor expanded in x around inf

                    \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} \]
                  11. 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-/.f6436.2%

                      \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
                  12. Applied rewrites36.2%

                    \[\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 12: 63.7% accurate, 0.7× speedup?

                \[\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 -5000000000000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 0.1:\\ \;\;\;\;\mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, 0.083333333333333 \cdot \frac{1}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \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 -5000000000000.0)
                     t_0
                     (if (<= t_1 0.1)
                       (fma -0.0027777777777778 (/ z x) (* 0.083333333333333 (/ 1.0 x)))
                       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 <= -5000000000000.0) {
                		tmp = t_0;
                	} else if (t_1 <= 0.1) {
                		tmp = fma(-0.0027777777777778, (z / x), (0.083333333333333 * (1.0 / x)));
                	} 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 <= -5000000000000.0)
                		tmp = t_0;
                	elseif (t_1 <= 0.1)
                		tmp = fma(-0.0027777777777778, Float64(z / x), Float64(0.083333333333333 * Float64(1.0 / x)));
                	else
                		tmp = t_0;
                	end
                	return 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, -5000000000000.0], t$95$0, If[LessEqual[t$95$1, 0.1], N[(-0.0027777777777778 * N[(z / x), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
                
                \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 -5000000000000:\\
                \;\;\;\;t\_0\\
                
                \mathbf{elif}\;t\_1 \leq 0.1:\\
                \;\;\;\;\mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, 0.083333333333333 \cdot \frac{1}{x}\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_0\\
                
                
                \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)) < -5e12 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 93.7%

                    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                  2. 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.4%

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

                    \[\leadsto \color{blue}{{z}^{2} \cdot \mathsf{fma}\left(0.0007936500793651, \frac{1}{x}, \frac{y}{x}\right)} \]
                  5. Applied rewrites43.3%

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

                  if -5e12 < (+.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 93.7%

                    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                  2. 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. lift-/.f64N/A

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

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

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

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

                      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                    7. lower--.f64N/A

                      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                  3. Applied rewrites98.6%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{x}, \mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - x\right)\right) - \frac{-0.083333333333333}{x}} \]
                  4. 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}} \]
                  5. 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.0%

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

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

                    \[\leadsto \frac{-13888888888889}{5000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x}} \]
                  8. 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-/.f6428.7%

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

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

                Alternative 13: 63.3% accurate, 0.7× speedup?

                \[\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 -5000000000000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 0.1:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \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 -5000000000000.0)
                     t_0
                     (if (<= t_1 0.1)
                       (/
                        (+
                         0.083333333333333
                         (* z (- (* 0.0007936500793651 z) 0.0027777777777778)))
                        x)
                       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 <= -5000000000000.0) {
                		tmp = t_0;
                	} else if (t_1 <= 0.1) {
                		tmp = (0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x;
                	} 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 <= (-5000000000000.0d0)) then
                        tmp = t_0
                    else if (t_1 <= 0.1d0) then
                        tmp = (0.083333333333333d0 + (z * ((0.0007936500793651d0 * z) - 0.0027777777777778d0))) / x
                    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 <= -5000000000000.0) {
                		tmp = t_0;
                	} else if (t_1 <= 0.1) {
                		tmp = (0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x;
                	} 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 <= -5000000000000.0:
                		tmp = t_0
                	elif t_1 <= 0.1:
                		tmp = (0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x
                	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 <= -5000000000000.0)
                		tmp = t_0;
                	elseif (t_1 <= 0.1)
                		tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(0.0007936500793651 * z) - 0.0027777777777778))) / x);
                	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 <= -5000000000000.0)
                		tmp = t_0;
                	elseif (t_1 <= 0.1)
                		tmp = (0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x;
                	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, -5000000000000.0], t$95$0, If[LessEqual[t$95$1, 0.1], N[(N[(0.083333333333333 + N[(z * N[(N[(0.0007936500793651 * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], t$95$0]]]]
                
                \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 -5000000000000:\\
                \;\;\;\;t\_0\\
                
                \mathbf{elif}\;t\_1 \leq 0.1:\\
                \;\;\;\;\frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x}\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_0\\
                
                
                \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)) < -5e12 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 93.7%

                    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                  2. 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.4%

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

                    \[\leadsto \color{blue}{{z}^{2} \cdot \mathsf{fma}\left(0.0007936500793651, \frac{1}{x}, \frac{y}{x}\right)} \]
                  5. Applied rewrites43.3%

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

                  if -5e12 < (+.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 93.7%

                    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                  2. 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. lift-/.f64N/A

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

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

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

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

                      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                    7. lower--.f64N/A

                      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                  3. Applied rewrites98.6%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{x}, \mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - x\right)\right) - \frac{-0.083333333333333}{x}} \]
                  4. 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}} \]
                  5. 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.0%

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

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

                    \[\leadsto \frac{0.083333333333333 + z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - 0.0027777777777778\right)}{x} \]
                  8. Step-by-step derivation
                    1. lower-*.f6445.6%

                      \[\leadsto \frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x} \]
                  9. Applied rewrites45.6%

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

                Alternative 14: 63.2% accurate, 0.8× speedup?

                \[\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 -5000000000000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 0.1:\\ \;\;\;\;\frac{0.083333333333333 + -0.0027777777777778 \cdot z}{x}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \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 -5000000000000.0)
                     t_0
                     (if (<= t_1 0.1)
                       (/ (+ 0.083333333333333 (* -0.0027777777777778 z)) x)
                       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 <= -5000000000000.0) {
                		tmp = t_0;
                	} else if (t_1 <= 0.1) {
                		tmp = (0.083333333333333 + (-0.0027777777777778 * z)) / x;
                	} 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 <= (-5000000000000.0d0)) then
                        tmp = t_0
                    else if (t_1 <= 0.1d0) then
                        tmp = (0.083333333333333d0 + ((-0.0027777777777778d0) * z)) / x
                    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 <= -5000000000000.0) {
                		tmp = t_0;
                	} else if (t_1 <= 0.1) {
                		tmp = (0.083333333333333 + (-0.0027777777777778 * z)) / x;
                	} 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 <= -5000000000000.0:
                		tmp = t_0
                	elif t_1 <= 0.1:
                		tmp = (0.083333333333333 + (-0.0027777777777778 * z)) / x
                	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 <= -5000000000000.0)
                		tmp = t_0;
                	elseif (t_1 <= 0.1)
                		tmp = Float64(Float64(0.083333333333333 + Float64(-0.0027777777777778 * z)) / x);
                	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 <= -5000000000000.0)
                		tmp = t_0;
                	elseif (t_1 <= 0.1)
                		tmp = (0.083333333333333 + (-0.0027777777777778 * z)) / x;
                	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, -5000000000000.0], t$95$0, If[LessEqual[t$95$1, 0.1], N[(N[(0.083333333333333 + N[(-0.0027777777777778 * z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], t$95$0]]]]
                
                \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 -5000000000000:\\
                \;\;\;\;t\_0\\
                
                \mathbf{elif}\;t\_1 \leq 0.1:\\
                \;\;\;\;\frac{0.083333333333333 + -0.0027777777777778 \cdot z}{x}\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_0\\
                
                
                \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)) < -5e12 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 93.7%

                    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                  2. 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.4%

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

                    \[\leadsto \color{blue}{{z}^{2} \cdot \mathsf{fma}\left(0.0007936500793651, \frac{1}{x}, \frac{y}{x}\right)} \]
                  5. Applied rewrites43.3%

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

                  if -5e12 < (+.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 93.7%

                    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                  2. 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. lift-/.f64N/A

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

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

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

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

                      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                    7. lower--.f64N/A

                      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                  3. Applied rewrites98.6%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{x}, \mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - x\right)\right) - \frac{-0.083333333333333}{x}} \]
                  4. 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}} \]
                  5. 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.0%

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

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

                    \[\leadsto \frac{0.083333333333333 + \frac{-13888888888889}{5000000000000000} \cdot z}{x} \]
                  8. Step-by-step derivation
                    1. lower-*.f6428.7%

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

                    \[\leadsto \frac{0.083333333333333 + -0.0027777777777778 \cdot z}{x} \]
                3. Recombined 2 regimes into one program.
                4. Add Preprocessing

                Alternative 15: 63.1% accurate, 2.0× speedup?

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

                  \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                2. 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. lift-/.f64N/A

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

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

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

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

                    \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                  7. lower--.f64N/A

                    \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                3. Applied rewrites98.6%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{x}, \mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - x\right)\right) - \frac{-0.083333333333333}{x}} \]
                4. 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}} \]
                5. 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.0%

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

                  \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
                7. 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. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 16: 63.1% accurate, 1.1× speedup?

                \[\begin{array}{l} \mathbf{if}\;\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333 \leq 5:\\ \;\;\;\;\mathsf{fma}\left(y \cdot z, \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{y - -0.0007936500793651}{x} \cdot z\right) \cdot z\\ \end{array} \]
                (FPCore (x y z)
                 :precision binary64
                 (if (<=
                      (+
                       (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
                       0.083333333333333)
                      5.0)
                   (fma (* y z) (/ z x) (/ 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) <= 5.0) {
                		tmp = fma((y * z), (z / x), (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) <= 5.0)
                		tmp = fma(Float64(y * z), Float64(z / x), Float64(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], 5.0], N[(N[(y * z), $MachinePrecision] * N[(z / x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y - -0.0007936500793651), $MachinePrecision] / x), $MachinePrecision] * z), $MachinePrecision] * z), $MachinePrecision]]
                
                \begin{array}{l}
                \mathbf{if}\;\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333 \leq 5:\\
                \;\;\;\;\mathsf{fma}\left(y \cdot z, \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(\frac{y - -0.0007936500793651}{x} \cdot z\right) \cdot z\\
                
                
                \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

                  1. Initial program 93.7%

                    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                  2. 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. lift-/.f64N/A

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

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

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

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

                      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                    7. lower--.f64N/A

                      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                  3. Applied rewrites98.6%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{x}, \mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - x\right)\right) - \frac{-0.083333333333333}{x}} \]
                  4. 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}} \]
                  5. 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.0%

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

                    \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
                  7. 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. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(y \cdot z, \frac{\color{blue}{z}}{x}, \frac{0.083333333333333}{x}\right) \]
                  10. Step-by-step derivation
                    1. lower-*.f6450.2%

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

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

                  if 5 < (+.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 93.7%

                    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                  2. 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.4%

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

                    \[\leadsto \color{blue}{{z}^{2} \cdot \mathsf{fma}\left(0.0007936500793651, \frac{1}{x}, \frac{y}{x}\right)} \]
                  5. Applied rewrites43.3%

                    \[\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 17: 62.0% accurate, 2.2× speedup?

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

                  \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                2. 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. lift-/.f64N/A

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

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

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

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

                    \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                  7. lower--.f64N/A

                    \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                3. Applied rewrites98.6%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{x}, \mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - x\right)\right) - \frac{-0.083333333333333}{x}} \]
                4. 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}} \]
                5. 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.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 18: 61.4% accurate, 0.8× speedup?

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

                    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                  2. 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.4%

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

                    \[\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-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{\left(y - \frac{-7936500793651}{10000000000000000}\right) \cdot {z}^{2}}{x} \]
                    19. lower-*.f6441.4%

                      \[\leadsto \frac{\left(y - -0.0007936500793651\right) \cdot {z}^{2}}{x} \]
                    20. lift-pow.f64N/A

                      \[\leadsto \frac{\left(y - \frac{-7936500793651}{10000000000000000}\right) \cdot {z}^{2}}{x} \]
                    21. unpow2N/A

                      \[\leadsto \frac{\left(y - \frac{-7936500793651}{10000000000000000}\right) \cdot \left(z \cdot z\right)}{x} \]
                    22. lower-*.f6441.4%

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

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

                  if -5e12 < (+.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 93.7%

                    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                  2. 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. lift-/.f64N/A

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

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

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

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

                      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                    7. lower--.f64N/A

                      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                  3. Applied rewrites98.6%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{x}, \mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - x\right)\right) - \frac{-0.083333333333333}{x}} \]
                  4. 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}} \]
                  5. 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.0%

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

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

                    \[\leadsto \frac{0.083333333333333 + \frac{-13888888888889}{5000000000000000} \cdot z}{x} \]
                  8. Step-by-step derivation
                    1. lower-*.f6428.7%

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

                    \[\leadsto \frac{0.083333333333333 + -0.0027777777777778 \cdot z}{x} \]
                3. Recombined 2 regimes into one program.
                4. Add Preprocessing

                Alternative 19: 61.2% accurate, 0.8× speedup?

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

                    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                  2. 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.4%

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

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

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

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

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

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

                  if -5e12 < (+.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 93.7%

                    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                  2. 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. lift-/.f64N/A

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

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

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

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

                      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                    7. lower--.f64N/A

                      \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                  3. Applied rewrites98.6%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{x}, \mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - x\right)\right) - \frac{-0.083333333333333}{x}} \]
                  4. 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}} \]
                  5. 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.0%

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

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

                    \[\leadsto \frac{0.083333333333333 + \frac{-13888888888889}{5000000000000000} \cdot z}{x} \]
                  8. Step-by-step derivation
                    1. lower-*.f6428.7%

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

                    \[\leadsto \frac{0.083333333333333 + -0.0027777777777778 \cdot z}{x} \]
                3. Recombined 2 regimes into one program.
                4. Add Preprocessing

                Alternative 20: 28.7% accurate, 3.7× speedup?

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

                  \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                2. 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. lift-/.f64N/A

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

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

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

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

                    \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                  7. lower--.f64N/A

                    \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                3. Applied rewrites98.6%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{x}, \mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - x\right)\right) - \frac{-0.083333333333333}{x}} \]
                4. 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}} \]
                5. 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.0%

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

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

                  \[\leadsto \frac{0.083333333333333 + \frac{-13888888888889}{5000000000000000} \cdot z}{x} \]
                8. Step-by-step derivation
                  1. lower-*.f6428.7%

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

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

                Alternative 21: 22.9% accurate, 4.9× speedup?

                \[\frac{1}{x} \cdot 0.083333333333333 \]
                (FPCore (x y z) :precision binary64 (* (/ 1.0 x) 0.083333333333333))
                double code(double x, double y, double z) {
                	return (1.0 / x) * 0.083333333333333;
                }
                
                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 = (1.0d0 / x) * 0.083333333333333d0
                end function
                
                public static double code(double x, double y, double z) {
                	return (1.0 / x) * 0.083333333333333;
                }
                
                def code(x, y, z):
                	return (1.0 / x) * 0.083333333333333
                
                function code(x, y, z)
                	return Float64(Float64(1.0 / x) * 0.083333333333333)
                end
                
                function tmp = code(x, y, z)
                	tmp = (1.0 / x) * 0.083333333333333;
                end
                
                code[x_, y_, z_] := N[(N[(1.0 / x), $MachinePrecision] * 0.083333333333333), $MachinePrecision]
                
                \frac{1}{x} \cdot 0.083333333333333
                
                Derivation
                1. Initial program 93.7%

                  \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                2. 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. lift-/.f64N/A

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

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

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

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

                    \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                  7. lower--.f64N/A

                    \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                3. Applied rewrites98.6%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{x}, \mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - x\right)\right) - \frac{-0.083333333333333}{x}} \]
                4. 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}} \]
                5. 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.0%

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

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

                  \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
                8. Step-by-step derivation
                  1. lower-/.f6422.9%

                    \[\leadsto \frac{0.083333333333333}{x} \]
                9. Applied rewrites22.9%

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

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

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

                    \[\leadsto \frac{1}{x} \cdot \frac{83333333333333}{1000000000000000} \]
                  4. lower-*.f64N/A

                    \[\leadsto \frac{1}{x} \cdot \frac{83333333333333}{1000000000000000} \]
                  5. lower-/.f6422.9%

                    \[\leadsto \frac{1}{x} \cdot 0.083333333333333 \]
                11. Applied rewrites22.9%

                  \[\leadsto \frac{1}{x} \cdot 0.083333333333333 \]
                12. Add Preprocessing

                Alternative 22: 22.9% accurate, 7.9× speedup?

                \[\frac{0.083333333333333}{x} \]
                (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]
                
                \frac{0.083333333333333}{x}
                
                Derivation
                1. Initial program 93.7%

                  \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
                2. 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. lift-/.f64N/A

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

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

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

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

                    \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                  7. lower--.f64N/A

                    \[\leadsto \color{blue}{\left(\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}{x}\right) - \frac{\mathsf{neg}\left(\frac{83333333333333}{1000000000000000}\right)}{x}} \]
                3. Applied rewrites98.6%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{x}, \mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - x\right)\right) - \frac{-0.083333333333333}{x}} \]
                4. 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}} \]
                5. 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.0%

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

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

                  \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
                8. Step-by-step derivation
                  1. lower-/.f6422.9%

                    \[\leadsto \frac{0.083333333333333}{x} \]
                9. Applied rewrites22.9%

                  \[\leadsto \frac{0.083333333333333}{\color{blue}{x}} \]
                10. Add Preprocessing

                Reproduce

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