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

Percentage Accurate: 94.3% → 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: 94.3% 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, 0.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 98.6% accurate, 0.9× speedup?

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

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


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

    1. Initial program 94.3%

      \[\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 \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} \]
      2. 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} \]
      3. *-commutativeN/A

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

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

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

        \[\leadsto \left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right) + \frac{\color{blue}{\left(\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z\right) \cdot z + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right) \cdot z\right)} + \frac{83333333333333}{1000000000000000}}{x} \]
      7. associate-+l+N/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\right) \cdot z + \left(\left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right) \cdot z + \frac{83333333333333}{1000000000000000}\right)}}{x} \]
      8. 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\right)} \cdot z + \left(\left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right) \cdot z + \frac{83333333333333}{1000000000000000}\right)}{x} \]
      9. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.5e9 < x

    1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\mathsf{fma}\left(z, y - \frac{-7936500793651}{10000000000000000}, \frac{-13888888888889}{5000000000000000}\right)}{x}, z, -1 \cdot \left(x \cdot \left(1 + \log \left(\frac{1}{x}\right)\right)\right)\right) \]
      5. lower-/.f6476.8%

        \[\leadsto \mathsf{fma}\left(\frac{\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right)}{x}, z, -1 \cdot \left(x \cdot \left(1 + \log \left(\frac{1}{x}\right)\right)\right)\right) \]
    6. Applied rewrites76.8%

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

Alternative 3: 98.6% accurate, 1.0× speedup?

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t\_0}{x}, z, -1 \cdot \left(x \cdot \left(1 + \log \left(\frac{1}{x}\right)\right)\right)\right)\\


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

    1. Initial program 94.3%

      \[\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 \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} \]
      3. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

    if 5.5e9 < x

    1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\mathsf{fma}\left(z, y - \frac{-7936500793651}{10000000000000000}, \frac{-13888888888889}{5000000000000000}\right)}{x}, z, -1 \cdot \left(x \cdot \left(1 + \log \left(\frac{1}{x}\right)\right)\right)\right) \]
      5. lower-/.f6476.8%

        \[\leadsto \mathsf{fma}\left(\frac{\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right)}{x}, z, -1 \cdot \left(x \cdot \left(1 + \log \left(\frac{1}{x}\right)\right)\right)\right) \]
    6. Applied rewrites76.8%

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

Alternative 4: 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 94.3%

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

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


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

    1. Initial program 94.3%

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

      \[\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 5.5e9 < x

    1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\mathsf{fma}\left(z, y - \frac{-7936500793651}{10000000000000000}, \frac{-13888888888889}{5000000000000000}\right)}{x}, z, -1 \cdot \left(x \cdot \left(1 + \log \left(\frac{1}{x}\right)\right)\right)\right) \]
      5. lower-/.f6476.8%

        \[\leadsto \mathsf{fma}\left(\frac{\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right)}{x}, z, -1 \cdot \left(x \cdot \left(1 + \log \left(\frac{1}{x}\right)\right)\right)\right) \]
    6. Applied rewrites76.8%

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

Alternative 6: 97.6% accurate, 1.0× speedup?

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


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

    1. Initial program 94.3%

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

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

      \[\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 1.4499999999999999e-7 < x

    1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\mathsf{fma}\left(z, y - \frac{-7936500793651}{10000000000000000}, \frac{-13888888888889}{5000000000000000}\right)}{x}, z, -1 \cdot \left(x \cdot \left(1 + \log \left(\frac{1}{x}\right)\right)\right)\right) \]
      5. lower-/.f6476.8%

        \[\leadsto \mathsf{fma}\left(\frac{\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right)}{x}, z, -1 \cdot \left(x \cdot \left(1 + \log \left(\frac{1}{x}\right)\right)\right)\right) \]
    6. Applied rewrites76.8%

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

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

\mathbf{elif}\;y \leq 5 \cdot 10^{-8}:\\
\;\;\;\;\left(\left(x - 0.5\right) \cdot \log x - x\right) - \left(-0.91893853320467 - \frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}\right)\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -0.0068999999999999999 or 4.9999999999999998e-8 < y

    1. Initial program 94.3%

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

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

      \[\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 -0.0068999999999999999 < y < 4.9999999999999998e-8

    1. Initial program 94.3%

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

        \[\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. 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(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x}} \]
        2. lift-+.f64N/A

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

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

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

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

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

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

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

    Alternative 8: 93.8% accurate, 0.3× speedup?

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

      1. Initial program 94.3%

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

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

        \[\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} \]
      7. Taylor expanded in x around 0

        \[\leadsto \mathsf{fma}\left(\frac{z}{x}, y \cdot z, \mathsf{fma}\left(\log x, x - 0.5, \color{blue}{\frac{91893853320467}{100000000000000}}\right)\right) - \frac{-0.083333333333333}{x} \]
      8. Step-by-step derivation
        1. Applied rewrites60.6%

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

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

        1. Initial program 94.3%

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

            \[\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. 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(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x}} \]
            2. lift-+.f64N/A

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

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

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

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

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

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

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

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

          1. Initial program 94.3%

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

              \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
          6. Applied rewrites63.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{\color{blue}{1}}{x} \]
            4. +-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} \]
            5. 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} \]
            6. *-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} \]
            7. 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} \]
            8. 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} \]
            9. 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} \]
            10. 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} \]
            11. +-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} \]
            12. 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} \]
            13. 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} \]
            14. 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} \]
            15. mult-flipN/A

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

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

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

              \[\leadsto \left(z \cdot \left(y - \frac{-7936500793651}{10000000000000000}\right) + \frac{-13888888888889}{5000000000000000}\right) \cdot \frac{z}{x} + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
          8. Applied rewrites65.1%

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

        Alternative 9: 93.7% accurate, 0.3× 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 -1 \cdot 10^{+32}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{x}, y \cdot z, \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467\right)\right) - \frac{-0.083333333333333}{x}\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+307}:\\ \;\;\;\;\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}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\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 -1e+32)
            (-
             (fma (/ z x) (* y z) (fma (log x) (- x 0.5) 0.91893853320467))
             (/ -0.083333333333333 x))
            (if (<= t_0 5e+307)
              (-
               (/
                (fma
                 (fma 0.0007936500793651 z -0.0027777777777778)
                 z
                 0.083333333333333)
                x)
               (fma (- 0.5 x) (log x) (- x 0.91893853320467)))
              (fma
               (fma z (- y -0.0007936500793651) -0.0027777777777778)
               (/ 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 <= -1e+32) {
        		tmp = fma((z / x), (y * z), fma(log(x), (x - 0.5), 0.91893853320467)) - (-0.083333333333333 / x);
        	} else if (t_0 <= 5e+307) {
        		tmp = (fma(fma(0.0007936500793651, z, -0.0027777777777778), z, 0.083333333333333) / x) - fma((0.5 - x), log(x), (x - 0.91893853320467));
        	} else {
        		tmp = fma(fma(z, (y - -0.0007936500793651), -0.0027777777777778), (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 <= -1e+32)
        		tmp = Float64(fma(Float64(z / x), Float64(y * z), fma(log(x), Float64(x - 0.5), 0.91893853320467)) - Float64(-0.083333333333333 / x));
        	elseif (t_0 <= 5e+307)
        		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 = fma(fma(z, Float64(y - -0.0007936500793651), -0.0027777777777778), 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, -1e+32], N[(N[(N[(z / x), $MachinePrecision] * N[(y * z), $MachinePrecision] + N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision] + 0.91893853320467), $MachinePrecision]), $MachinePrecision] - N[(-0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+307], 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], N[(N[(z * N[(y - -0.0007936500793651), $MachinePrecision] + -0.0027777777777778), $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 -1 \cdot 10^{+32}:\\
        \;\;\;\;\mathsf{fma}\left(\frac{z}{x}, y \cdot z, \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467\right)\right) - \frac{-0.083333333333333}{x}\\
        
        \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+307}:\\
        \;\;\;\;\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}:\\
        \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\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)) < -1.0000000000000001e32

          1. Initial program 94.3%

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

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

            \[\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} \]
          7. Taylor expanded in x around 0

            \[\leadsto \mathsf{fma}\left(\frac{z}{x}, y \cdot z, \mathsf{fma}\left(\log x, x - 0.5, \color{blue}{\frac{91893853320467}{100000000000000}}\right)\right) - \frac{-0.083333333333333}{x} \]
          8. Step-by-step derivation
            1. Applied rewrites60.6%

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

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

            1. Initial program 94.3%

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

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

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

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

              1. Initial program 94.3%

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

                  \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
              6. Applied rewrites63.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{\color{blue}{1}}{x} \]
                4. +-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} \]
                5. 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} \]
                6. *-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} \]
                7. 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} \]
                8. 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} \]
                9. 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} \]
                10. 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} \]
                11. +-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} \]
                12. 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} \]
                13. 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} \]
                14. 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} \]
                15. mult-flipN/A

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

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

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

                  \[\leadsto \left(z \cdot \left(y - \frac{-7936500793651}{10000000000000000}\right) + \frac{-13888888888889}{5000000000000000}\right) \cdot \frac{z}{x} + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
              8. Applied rewrites65.1%

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

            Alternative 10: 88.5% accurate, 0.3× speedup?

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

              1. Initial program 94.3%

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

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

                \[\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} \]
              7. Taylor expanded in x around 0

                \[\leadsto \mathsf{fma}\left(\frac{z}{x}, y \cdot z, \mathsf{fma}\left(\log x, x - 0.5, \color{blue}{\frac{91893853320467}{100000000000000}}\right)\right) - \frac{-0.083333333333333}{x} \]
              8. Step-by-step derivation
                1. Applied rewrites60.6%

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

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

                1. Initial program 94.3%

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

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

                  1. Initial program 94.3%

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

                      \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
                  6. Applied rewrites63.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{\color{blue}{1}}{x} \]
                    4. +-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} \]
                    5. 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} \]
                    6. *-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} \]
                    7. 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} \]
                    8. 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} \]
                    9. 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} \]
                    10. 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} \]
                    11. +-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} \]
                    12. 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} \]
                    13. 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} \]
                    14. 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} \]
                    15. mult-flipN/A

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

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

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

                      \[\leadsto \left(z \cdot \left(y - \frac{-7936500793651}{10000000000000000}\right) + \frac{-13888888888889}{5000000000000000}\right) \cdot \frac{z}{x} + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
                  8. Applied rewrites65.1%

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

                Alternative 11: 88.4% accurate, 0.3× speedup?

                \[\begin{array}{l} t_0 := \left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\\ t_1 := t\_0 + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\ t_2 := \mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\ \mathbf{if}\;t\_1 \leq 100000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+307}:\\ \;\;\;\;t\_0 + \frac{-0.0027777777777778 \cdot z + 0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \]
                (FPCore (x y z)
                  :precision binary64
                  (let* ((t_0 (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467))
                       (t_1
                        (+
                         t_0
                         (/
                          (+
                           (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
                           0.083333333333333)
                          x)))
                       (t_2
                        (fma
                         (fma z (- y -0.0007936500793651) -0.0027777777777778)
                         (/ z x)
                         (/ 0.083333333333333 x))))
                  (if (<= t_1 100000.0)
                    t_2
                    (if (<= t_1 5e+307)
                      (+ t_0 (/ (+ (* -0.0027777777777778 z) 0.083333333333333) x))
                      t_2))))
                double code(double x, double y, double z) {
                	double t_0 = (((x - 0.5) * log(x)) - x) + 0.91893853320467;
                	double t_1 = t_0 + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
                	double t_2 = fma(fma(z, (y - -0.0007936500793651), -0.0027777777777778), (z / x), (0.083333333333333 / x));
                	double tmp;
                	if (t_1 <= 100000.0) {
                		tmp = t_2;
                	} else if (t_1 <= 5e+307) {
                		tmp = t_0 + (((-0.0027777777777778 * z) + 0.083333333333333) / x);
                	} else {
                		tmp = t_2;
                	}
                	return tmp;
                }
                
                function code(x, y, z)
                	t_0 = Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467)
                	t_1 = Float64(t_0 + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x))
                	t_2 = fma(fma(z, Float64(y - -0.0007936500793651), -0.0027777777777778), Float64(z / x), Float64(0.083333333333333 / x))
                	tmp = 0.0
                	if (t_1 <= 100000.0)
                		tmp = t_2;
                	elseif (t_1 <= 5e+307)
                		tmp = Float64(t_0 + Float64(Float64(Float64(-0.0027777777777778 * z) + 0.083333333333333) / x));
                	else
                		tmp = t_2;
                	end
                	return tmp
                end
                
                code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z * N[(y - -0.0007936500793651), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] * N[(z / x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 100000.0], t$95$2, If[LessEqual[t$95$1, 5e+307], N[(t$95$0 + N[(N[(N[(-0.0027777777777778 * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
                
                \begin{array}{l}
                t_0 := \left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
                t_1 := t\_0 + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\
                t_2 := \mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\
                \mathbf{if}\;t\_1 \leq 100000:\\
                \;\;\;\;t\_2\\
                
                \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+307}:\\
                \;\;\;\;t\_0 + \frac{-0.0027777777777778 \cdot z + 0.083333333333333}{x}\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_2\\
                
                
                \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)) < 1e5 or 5.0000000000000001e307 < (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x #s(literal 1/2 binary64)) (log.f64 x)) x) #s(literal 91893853320467/100000000000000 binary64)) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) x))

                  1. Initial program 94.3%

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

                      \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
                  6. Applied rewrites63.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{\color{blue}{1}}{x} \]
                    4. +-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} \]
                    5. 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} \]
                    6. *-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} \]
                    7. 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} \]
                    8. 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} \]
                    9. 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} \]
                    10. 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} \]
                    11. +-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} \]
                    12. 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} \]
                    13. 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} \]
                    14. 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} \]
                    15. mult-flipN/A

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

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

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

                      \[\leadsto \left(z \cdot \left(y - \frac{-7936500793651}{10000000000000000}\right) + \frac{-13888888888889}{5000000000000000}\right) \cdot \frac{z}{x} + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
                  8. Applied rewrites65.1%

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

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

                  1. Initial program 94.3%

                    \[\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 rewrites62.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 12: 88.3% 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}\\ t_1 := \mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\ \mathbf{if}\;t\_0 \leq 100000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+307}:\\ \;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, 0.91893853320467\right) - \left(x - \frac{0.083333333333333}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                  (FPCore (x y z)
                    :precision binary64
                    (let* ((t_0
                          (+
                           (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
                           (/
                            (+
                             (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
                             0.083333333333333)
                            x)))
                         (t_1
                          (fma
                           (fma z (- y -0.0007936500793651) -0.0027777777777778)
                           (/ z x)
                           (/ 0.083333333333333 x))))
                    (if (<= t_0 100000.0)
                      t_1
                      (if (<= t_0 5e+307)
                        (-
                         (fma (- x 0.5) (log x) 0.91893853320467)
                         (- x (/ 0.083333333333333 x)))
                        t_1))))
                  double code(double x, double y, double z) {
                  	double t_0 = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
                  	double t_1 = fma(fma(z, (y - -0.0007936500793651), -0.0027777777777778), (z / x), (0.083333333333333 / x));
                  	double tmp;
                  	if (t_0 <= 100000.0) {
                  		tmp = t_1;
                  	} else if (t_0 <= 5e+307) {
                  		tmp = fma((x - 0.5), log(x), 0.91893853320467) - (x - (0.083333333333333 / x));
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  function code(x, y, z)
                  	t_0 = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x))
                  	t_1 = fma(fma(z, Float64(y - -0.0007936500793651), -0.0027777777777778), Float64(z / x), Float64(0.083333333333333 / x))
                  	tmp = 0.0
                  	if (t_0 <= 100000.0)
                  		tmp = t_1;
                  	elseif (t_0 <= 5e+307)
                  		tmp = Float64(fma(Float64(x - 0.5), log(x), 0.91893853320467) - Float64(x - Float64(0.083333333333333 / x)));
                  	else
                  		tmp = t_1;
                  	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]}, Block[{t$95$1 = N[(N[(z * N[(y - -0.0007936500793651), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] * N[(z / x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 100000.0], t$95$1, If[LessEqual[t$95$0, 5e+307], N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + 0.91893853320467), $MachinePrecision] - N[(x - N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                  
                  \begin{array}{l}
                  t_0 := \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\
                  t_1 := \mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\
                  \mathbf{if}\;t\_0 \leq 100000:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+307}:\\
                  \;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, 0.91893853320467\right) - \left(x - \frac{0.083333333333333}{x}\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \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)) < 1e5 or 5.0000000000000001e307 < (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x #s(literal 1/2 binary64)) (log.f64 x)) x) #s(literal 91893853320467/100000000000000 binary64)) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) x))

                    1. Initial program 94.3%

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

                        \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
                    6. Applied rewrites63.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{\color{blue}{1}}{x} \]
                      4. +-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} \]
                      5. 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} \]
                      6. *-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} \]
                      7. 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} \]
                      8. 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} \]
                      9. 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} \]
                      10. 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} \]
                      11. +-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} \]
                      12. 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} \]
                      13. 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} \]
                      14. 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} \]
                      15. mult-flipN/A

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

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

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

                        \[\leadsto \left(z \cdot \left(y - \frac{-7936500793651}{10000000000000000}\right) + \frac{-13888888888889}{5000000000000000}\right) \cdot \frac{z}{x} + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
                    8. Applied rewrites65.1%

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

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

                    1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 13: 88.3% 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}\\ t_1 := \mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\ \mathbf{if}\;t\_0 \leq 100000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+307}:\\ \;\;\;\;\frac{0.083333333333333}{x} - \mathsf{fma}\left(0.5 - x, \log x, x - 0.91893853320467\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                    (FPCore (x y z)
                      :precision binary64
                      (let* ((t_0
                            (+
                             (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
                             (/
                              (+
                               (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
                               0.083333333333333)
                              x)))
                           (t_1
                            (fma
                             (fma z (- y -0.0007936500793651) -0.0027777777777778)
                             (/ z x)
                             (/ 0.083333333333333 x))))
                      (if (<= t_0 100000.0)
                        t_1
                        (if (<= t_0 5e+307)
                          (-
                           (/ 0.083333333333333 x)
                           (fma (- 0.5 x) (log x) (- x 0.91893853320467)))
                          t_1))))
                    double code(double x, double y, double z) {
                    	double t_0 = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
                    	double t_1 = fma(fma(z, (y - -0.0007936500793651), -0.0027777777777778), (z / x), (0.083333333333333 / x));
                    	double tmp;
                    	if (t_0 <= 100000.0) {
                    		tmp = t_1;
                    	} else if (t_0 <= 5e+307) {
                    		tmp = (0.083333333333333 / x) - fma((0.5 - x), log(x), (x - 0.91893853320467));
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z)
                    	t_0 = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x))
                    	t_1 = fma(fma(z, Float64(y - -0.0007936500793651), -0.0027777777777778), Float64(z / x), Float64(0.083333333333333 / x))
                    	tmp = 0.0
                    	if (t_0 <= 100000.0)
                    		tmp = t_1;
                    	elseif (t_0 <= 5e+307)
                    		tmp = Float64(Float64(0.083333333333333 / x) - fma(Float64(0.5 - x), log(x), Float64(x - 0.91893853320467)));
                    	else
                    		tmp = t_1;
                    	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]}, Block[{t$95$1 = N[(N[(z * N[(y - -0.0007936500793651), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] * N[(z / x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 100000.0], t$95$1, If[LessEqual[t$95$0, 5e+307], N[(N[(0.083333333333333 / x), $MachinePrecision] - N[(N[(0.5 - x), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(x - 0.91893853320467), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                    
                    \begin{array}{l}
                    t_0 := \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\
                    t_1 := \mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\
                    \mathbf{if}\;t\_0 \leq 100000:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+307}:\\
                    \;\;\;\;\frac{0.083333333333333}{x} - \mathsf{fma}\left(0.5 - x, \log x, x - 0.91893853320467\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \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)) < 1e5 or 5.0000000000000001e307 < (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x #s(literal 1/2 binary64)) (log.f64 x)) x) #s(literal 91893853320467/100000000000000 binary64)) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) x))

                      1. Initial program 94.3%

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

                          \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
                      6. Applied rewrites63.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{\color{blue}{1}}{x} \]
                        4. +-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} \]
                        5. 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} \]
                        6. *-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} \]
                        7. 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} \]
                        8. 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} \]
                        9. 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} \]
                        10. 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} \]
                        11. +-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} \]
                        12. 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} \]
                        13. 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} \]
                        14. 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} \]
                        15. mult-flipN/A

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

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

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

                          \[\leadsto \left(z \cdot \left(y - \frac{-7936500793651}{10000000000000000}\right) + \frac{-13888888888889}{5000000000000000}\right) \cdot \frac{z}{x} + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
                      8. Applied rewrites65.1%

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

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

                      1. Initial program 94.3%

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

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

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

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

                            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x} - \left(\mathsf{neg}\left(\left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right)\right)\right)} \]
                          4. 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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 14: 83.5% accurate, 1.5× speedup?

                      \[\begin{array}{l} \mathbf{if}\;x \leq 1.7 \cdot 10^{+89}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\ \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 1.7e+89)
                        (fma
                         (fma z (- y -0.0007936500793651) -0.0027777777777778)
                         (/ z x)
                         (/ 0.083333333333333 x))
                        (* x (- (* -1.0 (log (/ 1.0 x))) 1.0))))
                      double code(double x, double y, double z) {
                      	double tmp;
                      	if (x <= 1.7e+89) {
                      		tmp = fma(fma(z, (y - -0.0007936500793651), -0.0027777777777778), (z / x), (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 <= 1.7e+89)
                      		tmp = fma(fma(z, Float64(y - -0.0007936500793651), -0.0027777777777778), Float64(z / x), Float64(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, 1.7e+89], N[(N[(z * N[(y - -0.0007936500793651), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] * N[(z / x), $MachinePrecision] + N[(0.083333333333333 / 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 1.7 \cdot 10^{+89}:\\
                      \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, y - -0.0007936500793651, -0.0027777777777778\right), \frac{z}{x}, \frac{0.083333333333333}{x}\right)\\
                      
                      \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 < 1.7000000000000001e89

                        1. Initial program 94.3%

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

                            \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
                        6. Applied rewrites63.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{\color{blue}{1}}{x} \]
                          4. +-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} \]
                          5. 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} \]
                          6. *-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} \]
                          7. 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} \]
                          8. 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} \]
                          9. 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} \]
                          10. 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} \]
                          11. +-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} \]
                          12. 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} \]
                          13. 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} \]
                          14. 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} \]
                          15. mult-flipN/A

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

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

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

                            \[\leadsto \left(z \cdot \left(y - \frac{-7936500793651}{10000000000000000}\right) + \frac{-13888888888889}{5000000000000000}\right) \cdot \frac{z}{x} + \frac{\frac{83333333333333}{1000000000000000}}{x} \]
                        8. Applied rewrites65.1%

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

                        if 1.7000000000000001e89 < x

                        1. Initial program 94.3%

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

                            \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
                        6. Applied rewrites63.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}}{x} \]
                        8. Step-by-step derivation
                          1. Applied rewrites22.9%

                            \[\leadsto \frac{0.083333333333333}{x} \]
                          2. Taylor expanded in x around inf

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

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

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

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

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

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

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

                        Alternative 15: 83.0% accurate, 1.5× speedup?

                        \[\begin{array}{l} \mathbf{if}\;x \leq 1.7 \cdot 10^{+89}:\\ \;\;\;\;\frac{0.083333333333333 + \mathsf{fma}\left(z \cdot \left(y - -0.0007936500793651\right), z, -0.0027777777777778 \cdot z\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 1.7e+89)
                          (/
                           (+
                            0.083333333333333
                            (fma (* z (- y -0.0007936500793651)) z (* -0.0027777777777778 z)))
                           x)
                          (* x (- (* -1.0 (log (/ 1.0 x))) 1.0))))
                        double code(double x, double y, double z) {
                        	double tmp;
                        	if (x <= 1.7e+89) {
                        		tmp = (0.083333333333333 + fma((z * (y - -0.0007936500793651)), z, (-0.0027777777777778 * z))) / x;
                        	} else {
                        		tmp = x * ((-1.0 * log((1.0 / x))) - 1.0);
                        	}
                        	return tmp;
                        }
                        
                        function code(x, y, z)
                        	tmp = 0.0
                        	if (x <= 1.7e+89)
                        		tmp = Float64(Float64(0.083333333333333 + fma(Float64(z * Float64(y - -0.0007936500793651)), z, Float64(-0.0027777777777778 * z))) / 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, 1.7e+89], N[(N[(0.083333333333333 + N[(N[(z * N[(y - -0.0007936500793651), $MachinePrecision]), $MachinePrecision] * z + N[(-0.0027777777777778 * z), $MachinePrecision]), $MachinePrecision]), $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 1.7 \cdot 10^{+89}:\\
                        \;\;\;\;\frac{0.083333333333333 + \mathsf{fma}\left(z \cdot \left(y - -0.0007936500793651\right), z, -0.0027777777777778 \cdot z\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 < 1.7000000000000001e89

                          1. Initial program 94.3%

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

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

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

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

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

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

                              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \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)}{x} \]
                            8. metadata-evalN/A

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

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

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

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

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

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

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

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

                          if 1.7000000000000001e89 < x

                          1. Initial program 94.3%

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

                              \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
                          6. Applied rewrites63.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}}{x} \]
                          8. Step-by-step derivation
                            1. Applied rewrites22.9%

                              \[\leadsto \frac{0.083333333333333}{x} \]
                            2. Taylor expanded in x around inf

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

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

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

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

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

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

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

                          Alternative 16: 83.0% accurate, 1.6× speedup?

                          \[\begin{array}{l} \mathbf{if}\;x \leq 1.7 \cdot 10^{+89}:\\ \;\;\;\;\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 1.7e+89)
                            (/
                             (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 <= 1.7e+89) {
                          		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 <= 1.7e+89)
                          		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, 1.7e+89], 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 1.7 \cdot 10^{+89}:\\
                          \;\;\;\;\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 < 1.7000000000000001e89

                            1. Initial program 94.3%

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

                                \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
                            6. Applied rewrites63.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. metadata-evalN/A

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

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

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

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

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

                            if 1.7000000000000001e89 < x

                            1. Initial program 94.3%

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

                                \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
                            6. Applied rewrites63.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}}{x} \]
                            8. Step-by-step derivation
                              1. Applied rewrites22.9%

                                \[\leadsto \frac{0.083333333333333}{x} \]
                              2. Taylor expanded in x around inf

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

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

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

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

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

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

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

                            Alternative 17: 63.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 94.3%

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

                                \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
                            6. Applied rewrites63.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. metadata-evalN/A

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

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

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

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

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

                            Alternative 18: 62.8% accurate, 1.3× speedup?

                            \[\begin{array}{l} t_0 := \frac{1}{\frac{x}{\mathsf{fma}\left(y \cdot z, z, 0.083333333333333\right)}}\\ \mathbf{if}\;y + 0.0007936500793651 \leq -0.005:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y + 0.0007936500793651 \leq 10^{+14}:\\ \;\;\;\;\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 (/ 1.0 (/ x (fma (* y z) z 0.083333333333333)))))
                              (if (<= (+ y 0.0007936500793651) -0.005)
                                t_0
                                (if (<= (+ y 0.0007936500793651) 1e+14)
                                  (/
                                   (+
                                    0.083333333333333
                                    (* z (- (* 0.0007936500793651 z) 0.0027777777777778)))
                                   x)
                                  t_0))))
                            double code(double x, double y, double z) {
                            	double t_0 = 1.0 / (x / fma((y * z), z, 0.083333333333333));
                            	double tmp;
                            	if ((y + 0.0007936500793651) <= -0.005) {
                            		tmp = t_0;
                            	} else if ((y + 0.0007936500793651) <= 1e+14) {
                            		tmp = (0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x;
                            	} else {
                            		tmp = t_0;
                            	}
                            	return tmp;
                            }
                            
                            function code(x, y, z)
                            	t_0 = Float64(1.0 / Float64(x / fma(Float64(y * z), z, 0.083333333333333)))
                            	tmp = 0.0
                            	if (Float64(y + 0.0007936500793651) <= -0.005)
                            		tmp = t_0;
                            	elseif (Float64(y + 0.0007936500793651) <= 1e+14)
                            		tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(0.0007936500793651 * z) - 0.0027777777777778))) / x);
                            	else
                            		tmp = t_0;
                            	end
                            	return tmp
                            end
                            
                            code[x_, y_, z_] := Block[{t$95$0 = N[(1.0 / N[(x / N[(N[(y * z), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(y + 0.0007936500793651), $MachinePrecision], -0.005], t$95$0, If[LessEqual[N[(y + 0.0007936500793651), $MachinePrecision], 1e+14], 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 := \frac{1}{\frac{x}{\mathsf{fma}\left(y \cdot z, z, 0.083333333333333\right)}}\\
                            \mathbf{if}\;y + 0.0007936500793651 \leq -0.005:\\
                            \;\;\;\;t\_0\\
                            
                            \mathbf{elif}\;y + 0.0007936500793651 \leq 10^{+14}:\\
                            \;\;\;\;\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 y #s(literal 7936500793651/10000000000000000 binary64)) < -0.0050000000000000001 or 1e14 < (+.f64 y #s(literal 7936500793651/10000000000000000 binary64))

                              1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{1}{\frac{x}{\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}}} \]
                                15. metadata-evalN/A

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

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

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

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

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

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

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

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

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

                              if -0.0050000000000000001 < (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) < 1e14

                              1. Initial program 94.3%

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

                                  \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
                              6. Applied rewrites63.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-*.f6446.7%

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

                                \[\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 19: 48.5% accurate, 1.2× speedup?

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

                              1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{1}{\frac{x}{\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}}} \]
                                15. metadata-evalN/A

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

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

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

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

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

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

                                \[\leadsto \frac{1}{\frac{x}{\mathsf{fma}\left(\frac{-13888888888889}{5000000000000000}, z, 0.083333333333333\right)}} \]
                              10. Step-by-step derivation
                                1. Applied rewrites28.5%

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

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

                                1. Initial program 94.3%

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

                                    \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
                                6. Applied rewrites63.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-*.f6446.7%

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

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

                              Alternative 20: 28.6% 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 94.3%

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

                                  \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
                              6. Applied rewrites63.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.6%

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

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

                              Alternative 21: 22.9% accurate, 4.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{1}{\frac{x}{\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}}} \]
                                15. metadata-evalN/A

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{1}{12.000000000000048 \cdot \color{blue}{x}} \]
                              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 94.3%

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

                                  \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
                              6. Applied rewrites63.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}}{x} \]
                              8. Step-by-step derivation
                                1. Applied rewrites22.9%

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

                                Reproduce

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