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

Percentage Accurate: 94.2% → 97.8%
Time: 5.4s
Alternatives: 19
Speedup: 1.0×

Specification

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

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

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 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.2% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 97.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 96.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 2 \cdot 10^{+209}:\\
\;\;\;\;\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{else}:\\
\;\;\;\;\left(\left(\log x \cdot x - x\right) + 0.91893853320467\right) + \mathsf{fma}\left(z, \frac{y \cdot z}{x}, \frac{0.083333333333333}{x}\right)\\


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

    1. Initial program 94.2%

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

    if 2.0000000000000001e209 < x

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(-\log \left(\frac{1}{x}\right) \cdot x\right) - x\right) + \frac{91893853320467}{100000000000000}\right) + \mathsf{fma}\left(z, \frac{y \cdot z}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
      4. lower-*.f64N/A

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

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

        \[\leadsto \left(\left(\left(-\left(-\log x\right) \cdot x\right) - x\right) + \frac{91893853320467}{100000000000000}\right) + \mathsf{fma}\left(z, \frac{y \cdot z}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
      7. lift-log.f6482.3

        \[\leadsto \left(\left(\left(-\left(-\log x\right) \cdot x\right) - x\right) + 0.91893853320467\right) + \mathsf{fma}\left(z, \frac{y \cdot z}{x}, \frac{0.083333333333333}{x}\right) \]
    9. Applied rewrites82.3%

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

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

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

        \[\leadsto \left(\left(\log x \cdot x - x\right) + \frac{91893853320467}{100000000000000}\right) + \mathsf{fma}\left(z, \frac{y \cdot z}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
      3. lift-log.f6482.3

        \[\leadsto \left(\left(\log x \cdot x - x\right) + 0.91893853320467\right) + \mathsf{fma}\left(z, \frac{y \cdot z}{x}, \frac{0.083333333333333}{x}\right) \]
    12. Applied rewrites82.3%

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

Alternative 3: 92.4% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 94.2%

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

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

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

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

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

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

        \[\leadsto \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
    4. Applied rewrites62.7%

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

    if 4.2999999999999999e-32 < x

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 92.2% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 94.2%

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

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

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

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

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

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

        \[\leadsto \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
    4. Applied rewrites62.7%

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

    if 6.60000000000000034e-6 < x

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(-\log \left(\frac{1}{x}\right) \cdot x\right) - x\right) + \frac{91893853320467}{100000000000000}\right) + \mathsf{fma}\left(z, \frac{y \cdot z}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
      4. lower-*.f64N/A

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

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

        \[\leadsto \left(\left(\left(-\left(-\log x\right) \cdot x\right) - x\right) + \frac{91893853320467}{100000000000000}\right) + \mathsf{fma}\left(z, \frac{y \cdot z}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
      7. lift-log.f6482.3

        \[\leadsto \left(\left(\left(-\left(-\log x\right) \cdot x\right) - x\right) + 0.91893853320467\right) + \mathsf{fma}\left(z, \frac{y \cdot z}{x}, \frac{0.083333333333333}{x}\right) \]
    9. Applied rewrites82.3%

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

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

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

        \[\leadsto \left(\left(\log x \cdot x - x\right) + \frac{91893853320467}{100000000000000}\right) + \mathsf{fma}\left(z, \frac{y \cdot z}{x}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
      3. lift-log.f6482.3

        \[\leadsto \left(\left(\log x \cdot x - x\right) + 0.91893853320467\right) + \mathsf{fma}\left(z, \frac{y \cdot z}{x}, \frac{0.083333333333333}{x}\right) \]
    12. Applied rewrites82.3%

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

Alternative 5: 90.2% accurate, 1.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(z \cdot z\right) \cdot y}{x}\\


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

    1. Initial program 94.2%

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

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

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

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

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

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

        \[\leadsto \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
    4. Applied rewrites62.7%

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

    if 6.29999999999999982 < x

    1. Initial program 94.2%

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

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

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

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

        \[\leadsto \left(\left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) + \frac{91893853320467}{100000000000000}\right) + \frac{\left(z \cdot z\right) \cdot y}{x} \]
      4. lower-*.f6461.8

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

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

Alternative 6: 88.3% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_0 := \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{+79}:\\
\;\;\;\;-\left(-z \cdot \frac{z}{x}\right) \cdot y\\

\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, \frac{0.083333333333333}{x} + 0.91893853320467\right) - x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x #s(literal 1/2 binary64)) (log.f64 x)) x) #s(literal 91893853320467/100000000000000 binary64)) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) x)) < -9.99999999999999967e78

    1. Initial program 94.2%

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

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

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

      \[\leadsto -\left(-1 \cdot \frac{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{y} + \left(\frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{y} + {z}^{2}\right)}{x}\right) \cdot y \]
    5. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

      \[\leadsto -\left(-\frac{{z}^{2}}{x}\right) \cdot y \]
    8. Step-by-step derivation
      1. pow2N/A

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

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

        \[\leadsto -\left(-z \cdot \frac{z}{x}\right) \cdot y \]
      4. lower-/.f6432.2

        \[\leadsto -\left(-z \cdot \frac{z}{x}\right) \cdot y \]
    9. Applied rewrites32.2%

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

    if -9.99999999999999967e78 < (+.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)) < 2.00000000000000003e306

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{fma}\left(\log x, x - \frac{1}{2}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) + \frac{91893853320467}{100000000000000}\right) - x \]
      9. lower-/.f6457.5

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x - \frac{1}{2}, \log x, \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \frac{91893853320467}{100000000000000}\right) - x \]
      13. mult-flip-revN/A

        \[\leadsto \mathsf{fma}\left(x - \frac{1}{2}, \log x, \frac{\frac{83333333333333}{1000000000000000}}{x} + \frac{91893853320467}{100000000000000}\right) - x \]
      14. lift-/.f6457.5

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

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

    if 2.00000000000000003e306 < (+.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.2%

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

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

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

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

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

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

        \[\leadsto \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
    4. Applied rewrites62.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\mathsf{fma}\left(y - \frac{-7936500793651}{10000000000000000}, z, \frac{-13888888888889}{5000000000000000}\right)}{x}, z, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
      15. lift-/.f6463.8

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

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

Alternative 7: 88.3% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_0 := \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{+79}:\\
\;\;\;\;-\left(-z \cdot \frac{z}{x}\right) \cdot y\\

\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;\left(\mathsf{fma}\left(\log x, x - 0.5, \frac{0.083333333333333}{x}\right) - -0.91893853320467\right) - x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x #s(literal 1/2 binary64)) (log.f64 x)) x) #s(literal 91893853320467/100000000000000 binary64)) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) x)) < -9.99999999999999967e78

    1. Initial program 94.2%

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

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

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

      \[\leadsto -\left(-1 \cdot \frac{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{y} + \left(\frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{y} + {z}^{2}\right)}{x}\right) \cdot y \]
    5. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

      \[\leadsto -\left(-\frac{{z}^{2}}{x}\right) \cdot y \]
    8. Step-by-step derivation
      1. pow2N/A

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

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

        \[\leadsto -\left(-z \cdot \frac{z}{x}\right) \cdot y \]
      4. lower-/.f6432.2

        \[\leadsto -\left(-z \cdot \frac{z}{x}\right) \cdot y \]
    9. Applied rewrites32.2%

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

    if -9.99999999999999967e78 < (+.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)) < 2.00000000000000003e306

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{fma}\left(\log x, x - \frac{1}{2}, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) + \frac{91893853320467}{100000000000000}\right) - x \]
      9. lower-/.f6457.5

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

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(\log x, x - 0.5, \frac{0.083333333333333}{x}\right) + 0.91893853320467\right) - x} \]
    5. Step-by-step derivation
      1. Applied rewrites57.5%

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

      if 2.00000000000000003e306 < (+.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.2%

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

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

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

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

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

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

          \[\leadsto \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
      4. Applied rewrites62.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{\mathsf{fma}\left(y - \frac{-7936500793651}{10000000000000000}, z, \frac{-13888888888889}{5000000000000000}\right)}{x}, z, \frac{\frac{83333333333333}{1000000000000000}}{x}\right) \]
        15. lift-/.f6463.8

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

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

    Alternative 8: 84.6% accurate, 1.8× speedup?

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

      1. Initial program 94.2%

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

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

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

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

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

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

          \[\leadsto \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
      4. Applied rewrites62.7%

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

      if 2.9e9 < x

      1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
        3. metadata-evalN/A

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

          \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
        5. metadata-evalN/A

          \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
        6. sub-flipN/A

          \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
        7. div-addN/A

          \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
        8. *-commutativeN/A

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

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

    Alternative 9: 65.8% accurate, 0.3× speedup?

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

      1. Initial program 94.2%

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

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

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

        \[\leadsto -\left(-1 \cdot \frac{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{y} + \left(\frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{y} + {z}^{2}\right)}{x}\right) \cdot y \]
      5. Step-by-step derivation
        1. mul-1-negN/A

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

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

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

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

        \[\leadsto -\left(-\frac{{z}^{2}}{x}\right) \cdot y \]
      8. Step-by-step derivation
        1. pow2N/A

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

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

          \[\leadsto -\left(-z \cdot \frac{z}{x}\right) \cdot y \]
        4. lower-/.f6432.2

          \[\leadsto -\left(-z \cdot \frac{z}{x}\right) \cdot y \]
      9. Applied rewrites32.2%

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

      if -9.99999999999999967e78 < (+.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.99999999999999984e134

      1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.99999999999999984e134 < (+.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)) < 9.9999999999999994e304

      1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
        3. metadata-evalN/A

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

          \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
        5. metadata-evalN/A

          \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
        6. sub-flipN/A

          \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
        7. div-addN/A

          \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
        8. *-commutativeN/A

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

        \[\leadsto \color{blue}{\left(\log x - 1\right) \cdot x} \]

      if 9.9999999999999994e304 < (+.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.2%

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

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

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

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

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

          \[\leadsto \frac{\frac{7936500793651}{10000000000000000} + y}{x} \cdot {\color{blue}{z}}^{2} \]
        5. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right) \cdot \color{blue}{z} \]
      6. Applied rewrites43.7%

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

    Alternative 10: 64.5% accurate, 0.3× speedup?

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

      1. Initial program 94.2%

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

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

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

        \[\leadsto -\left(-1 \cdot \frac{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{y} + \left(\frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{y} + {z}^{2}\right)}{x}\right) \cdot y \]
      5. Step-by-step derivation
        1. mul-1-negN/A

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

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

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

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

        \[\leadsto -\left(-\frac{{z}^{2}}{x}\right) \cdot y \]
      8. Step-by-step derivation
        1. pow2N/A

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

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

          \[\leadsto -\left(-z \cdot \frac{z}{x}\right) \cdot y \]
        4. lower-/.f6432.2

          \[\leadsto -\left(-z \cdot \frac{z}{x}\right) \cdot y \]
      9. Applied rewrites32.2%

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

      if -9.99999999999999967e78 < (+.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.99999999999999984e134

      1. Initial program 94.2%

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

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

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

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

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

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

          \[\leadsto \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
      4. Applied rewrites62.7%

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

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

          \[\leadsto \frac{\frac{-13888888888889}{5000000000000000} \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
        2. lower-fma.f6429.0

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

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

      if 1.99999999999999984e134 < (+.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)) < 9.9999999999999994e304

      1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
        3. metadata-evalN/A

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

          \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
        5. metadata-evalN/A

          \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
        6. sub-flipN/A

          \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
        7. div-addN/A

          \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
        8. *-commutativeN/A

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

        \[\leadsto \color{blue}{\left(\log x - 1\right) \cdot x} \]

      if 9.9999999999999994e304 < (+.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.2%

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

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

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

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

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

          \[\leadsto \frac{\frac{7936500793651}{10000000000000000} + y}{x} \cdot {\color{blue}{z}}^{2} \]
        5. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right) \cdot \color{blue}{z} \]
      6. Applied rewrites43.7%

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

    Alternative 11: 60.9% accurate, 0.3× speedup?

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

      1. Initial program 94.2%

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

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

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

        \[\leadsto -\left(-1 \cdot \frac{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{y} + \left(\frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{y} + {z}^{2}\right)}{x}\right) \cdot y \]
      5. Step-by-step derivation
        1. mul-1-negN/A

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

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

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

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

        \[\leadsto -\left(-\frac{{z}^{2}}{x}\right) \cdot y \]
      8. Step-by-step derivation
        1. pow2N/A

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

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

          \[\leadsto -\left(-z \cdot \frac{z}{x}\right) \cdot y \]
        4. lower-/.f6432.2

          \[\leadsto -\left(-z \cdot \frac{z}{x}\right) \cdot y \]
      9. Applied rewrites32.2%

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

      if -9.99999999999999967e78 < (+.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.99999999999999984e134

      1. Initial program 94.2%

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

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

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

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

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

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

          \[\leadsto \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
      4. Applied rewrites62.7%

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

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

          \[\leadsto \frac{\frac{-13888888888889}{5000000000000000} \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
        2. lower-fma.f6429.0

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

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

      if 1.99999999999999984e134 < (+.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)) < 9.9999999999999994e304

      1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
        3. metadata-evalN/A

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

          \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
        5. metadata-evalN/A

          \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
        6. sub-flipN/A

          \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
        7. div-addN/A

          \[\leadsto x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \]
        8. *-commutativeN/A

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

        \[\leadsto \color{blue}{\left(\log x - 1\right) \cdot x} \]

      if 9.9999999999999994e304 < (+.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.2%

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

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

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

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

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

          \[\leadsto \frac{\frac{7936500793651}{10000000000000000} + y}{x} \cdot {\color{blue}{z}}^{2} \]
        5. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

      Alternative 12: 58.2% accurate, 0.9× speedup?

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

        1. Initial program 94.2%

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

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

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

          \[\leadsto -\left(-1 \cdot \frac{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{y} + \left(\frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{y} + {z}^{2}\right)}{x}\right) \cdot y \]
        5. Step-by-step derivation
          1. mul-1-negN/A

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

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

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

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

          \[\leadsto -\left(-\frac{{z}^{2}}{x}\right) \cdot y \]
        8. Step-by-step derivation
          1. pow2N/A

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

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

            \[\leadsto -\left(-z \cdot \frac{z}{x}\right) \cdot y \]
          4. lower-/.f6432.2

            \[\leadsto -\left(-z \cdot \frac{z}{x}\right) \cdot y \]
        9. Applied rewrites32.2%

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

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

        1. Initial program 94.2%

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

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

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

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

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

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

            \[\leadsto \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
        4. Applied rewrites62.7%

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

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

            \[\leadsto \frac{\frac{-13888888888889}{5000000000000000} \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
          2. lower-fma.f6429.0

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

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

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

        1. Initial program 94.2%

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

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

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

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

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

            \[\leadsto \frac{\frac{7936500793651}{10000000000000000} + y}{x} \cdot {\color{blue}{z}}^{2} \]
          5. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

        Alternative 13: 57.9% accurate, 0.8× speedup?

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

          1. Initial program 94.2%

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

            \[\leadsto \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

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

              \[\leadsto \frac{{z}^{2} \cdot y}{x} \]
            3. lower-*.f64N/A

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

              \[\leadsto \frac{\left(z \cdot z\right) \cdot y}{x} \]
            5. lower-*.f6430.1

              \[\leadsto \frac{\left(z \cdot z\right) \cdot y}{x} \]
          4. Applied rewrites30.1%

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

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

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

              \[\leadsto \frac{\left(z \cdot z\right) \cdot y}{x} \]
            4. pow2N/A

              \[\leadsto \frac{{z}^{2} \cdot y}{x} \]
            5. *-commutativeN/A

              \[\leadsto \frac{y \cdot {z}^{2}}{x} \]
            6. associate-/l*N/A

              \[\leadsto y \cdot \color{blue}{\frac{{z}^{2}}{x}} \]
            7. lower-*.f64N/A

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

              \[\leadsto y \cdot \frac{z \cdot z}{x} \]
            9. lift-/.f64N/A

              \[\leadsto y \cdot \frac{z \cdot z}{\color{blue}{x}} \]
            10. lift-*.f6431.7

              \[\leadsto y \cdot \frac{z \cdot z}{x} \]
          6. Applied rewrites31.7%

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

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

          1. Initial program 94.2%

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

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

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

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

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

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

              \[\leadsto \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
          4. Applied rewrites62.7%

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

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

              \[\leadsto \frac{\frac{-13888888888889}{5000000000000000} \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
            2. lower-fma.f6429.0

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

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

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

          1. Initial program 94.2%

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

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

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

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

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

              \[\leadsto \frac{\frac{7936500793651}{10000000000000000} + y}{x} \cdot {\color{blue}{z}}^{2} \]
            5. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

          Alternative 14: 57.9% accurate, 0.8× speedup?

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

            1. Initial program 94.2%

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

              \[\leadsto \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
            3. Step-by-step derivation
              1. lower-/.f64N/A

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

                \[\leadsto \frac{{z}^{2} \cdot y}{x} \]
              3. lower-*.f64N/A

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

                \[\leadsto \frac{\left(z \cdot z\right) \cdot y}{x} \]
              5. lower-*.f6430.1

                \[\leadsto \frac{\left(z \cdot z\right) \cdot y}{x} \]
            4. Applied rewrites30.1%

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

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

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

                \[\leadsto \frac{\left(z \cdot z\right) \cdot y}{x} \]
              4. pow2N/A

                \[\leadsto \frac{{z}^{2} \cdot y}{x} \]
              5. *-commutativeN/A

                \[\leadsto \frac{y \cdot {z}^{2}}{x} \]
              6. associate-/l*N/A

                \[\leadsto y \cdot \color{blue}{\frac{{z}^{2}}{x}} \]
              7. lower-*.f64N/A

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

                \[\leadsto y \cdot \frac{z \cdot z}{x} \]
              9. lift-/.f64N/A

                \[\leadsto y \cdot \frac{z \cdot z}{\color{blue}{x}} \]
              10. lift-*.f6431.7

                \[\leadsto y \cdot \frac{z \cdot z}{x} \]
            6. Applied rewrites31.7%

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

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

            1. Initial program 94.2%

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

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

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

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

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

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

                \[\leadsto \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
            4. Applied rewrites62.7%

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

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

                \[\leadsto \frac{\frac{-13888888888889}{5000000000000000} \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
              2. lower-fma.f6429.0

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

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

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

            1. Initial program 94.2%

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

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

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

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

              \[\leadsto \frac{7936500793651}{10000000000000000} \cdot \color{blue}{\frac{{z}^{2}}{x}} \]
            6. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \frac{{z}^{2}}{x} \cdot \frac{7936500793651}{10000000000000000} \]
              2. lower-*.f64N/A

                \[\leadsto \frac{{z}^{2}}{x} \cdot \frac{7936500793651}{10000000000000000} \]
              3. pow2N/A

                \[\leadsto \frac{z \cdot z}{x} \cdot \frac{7936500793651}{10000000000000000} \]
              4. lift-/.f64N/A

                \[\leadsto \frac{z \cdot z}{x} \cdot \frac{7936500793651}{10000000000000000} \]
              5. lift-*.f6426.2

                \[\leadsto \frac{z \cdot z}{x} \cdot 0.0007936500793651 \]
            7. Applied rewrites26.2%

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

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

                \[\leadsto \frac{z \cdot z}{x} \cdot \frac{7936500793651}{10000000000000000} \]
              3. lift-/.f64N/A

                \[\leadsto \frac{z \cdot z}{x} \cdot \frac{7936500793651}{10000000000000000} \]
              4. *-commutativeN/A

                \[\leadsto \frac{7936500793651}{10000000000000000} \cdot \frac{z \cdot z}{\color{blue}{x}} \]
              5. pow2N/A

                \[\leadsto \frac{7936500793651}{10000000000000000} \cdot \frac{{z}^{2}}{x} \]
              6. associate-*r/N/A

                \[\leadsto \frac{\frac{7936500793651}{10000000000000000} \cdot {z}^{2}}{x} \]
              7. lower-/.f64N/A

                \[\leadsto \frac{\frac{7936500793651}{10000000000000000} \cdot {z}^{2}}{x} \]
              8. *-commutativeN/A

                \[\leadsto \frac{{z}^{2} \cdot \frac{7936500793651}{10000000000000000}}{x} \]
              9. lower-*.f64N/A

                \[\leadsto \frac{{z}^{2} \cdot \frac{7936500793651}{10000000000000000}}{x} \]
              10. pow2N/A

                \[\leadsto \frac{\left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}}{x} \]
              11. lift-*.f6426.2

                \[\leadsto \frac{\left(z \cdot z\right) \cdot 0.0007936500793651}{x} \]
            9. Applied rewrites26.2%

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

          Alternative 15: 48.1% accurate, 1.5× speedup?

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

            1. Initial program 94.2%

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

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

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

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

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

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

                \[\leadsto \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
            4. Applied rewrites62.7%

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

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

                \[\leadsto \frac{\frac{-13888888888889}{5000000000000000} \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
              2. lower-fma.f6429.0

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

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

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

            1. Initial program 94.2%

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

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

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

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

              \[\leadsto \frac{7936500793651}{10000000000000000} \cdot \color{blue}{\frac{{z}^{2}}{x}} \]
            6. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \frac{{z}^{2}}{x} \cdot \frac{7936500793651}{10000000000000000} \]
              2. lower-*.f64N/A

                \[\leadsto \frac{{z}^{2}}{x} \cdot \frac{7936500793651}{10000000000000000} \]
              3. pow2N/A

                \[\leadsto \frac{z \cdot z}{x} \cdot \frac{7936500793651}{10000000000000000} \]
              4. lift-/.f64N/A

                \[\leadsto \frac{z \cdot z}{x} \cdot \frac{7936500793651}{10000000000000000} \]
              5. lift-*.f6426.2

                \[\leadsto \frac{z \cdot z}{x} \cdot 0.0007936500793651 \]
            7. Applied rewrites26.2%

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

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

                \[\leadsto \frac{z \cdot z}{x} \cdot \frac{7936500793651}{10000000000000000} \]
              3. lift-/.f64N/A

                \[\leadsto \frac{z \cdot z}{x} \cdot \frac{7936500793651}{10000000000000000} \]
              4. *-commutativeN/A

                \[\leadsto \frac{7936500793651}{10000000000000000} \cdot \frac{z \cdot z}{\color{blue}{x}} \]
              5. pow2N/A

                \[\leadsto \frac{7936500793651}{10000000000000000} \cdot \frac{{z}^{2}}{x} \]
              6. associate-*r/N/A

                \[\leadsto \frac{\frac{7936500793651}{10000000000000000} \cdot {z}^{2}}{x} \]
              7. lower-/.f64N/A

                \[\leadsto \frac{\frac{7936500793651}{10000000000000000} \cdot {z}^{2}}{x} \]
              8. *-commutativeN/A

                \[\leadsto \frac{{z}^{2} \cdot \frac{7936500793651}{10000000000000000}}{x} \]
              9. lower-*.f64N/A

                \[\leadsto \frac{{z}^{2} \cdot \frac{7936500793651}{10000000000000000}}{x} \]
              10. pow2N/A

                \[\leadsto \frac{\left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}}{x} \]
              11. lift-*.f6426.2

                \[\leadsto \frac{\left(z \cdot z\right) \cdot 0.0007936500793651}{x} \]
            9. Applied rewrites26.2%

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

          Alternative 16: 48.0% accurate, 1.5× speedup?

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

            1. Initial program 94.2%

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

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

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

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

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

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

                \[\leadsto \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
            4. Applied rewrites62.7%

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

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

                \[\leadsto \frac{\frac{-13888888888889}{5000000000000000} \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
              2. lower-fma.f6429.0

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

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

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

            1. Initial program 94.2%

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

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

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

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

              \[\leadsto \frac{7936500793651}{10000000000000000} \cdot \color{blue}{\frac{{z}^{2}}{x}} \]
            6. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \frac{{z}^{2}}{x} \cdot \frac{7936500793651}{10000000000000000} \]
              2. lower-*.f64N/A

                \[\leadsto \frac{{z}^{2}}{x} \cdot \frac{7936500793651}{10000000000000000} \]
              3. pow2N/A

                \[\leadsto \frac{z \cdot z}{x} \cdot \frac{7936500793651}{10000000000000000} \]
              4. lift-/.f64N/A

                \[\leadsto \frac{z \cdot z}{x} \cdot \frac{7936500793651}{10000000000000000} \]
              5. lift-*.f6426.2

                \[\leadsto \frac{z \cdot z}{x} \cdot 0.0007936500793651 \]
            7. Applied rewrites26.2%

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

          Alternative 17: 48.0% accurate, 1.5× speedup?

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

            1. Initial program 94.2%

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

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

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

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

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

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

                \[\leadsto \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
            4. Applied rewrites62.7%

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

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

                \[\leadsto \frac{\frac{-13888888888889}{5000000000000000} \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
              2. lower-fma.f6429.0

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

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

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

            1. Initial program 94.2%

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

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

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

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

              \[\leadsto \frac{7936500793651}{10000000000000000} \cdot \color{blue}{\frac{{z}^{2}}{x}} \]
            6. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \frac{{z}^{2}}{x} \cdot \frac{7936500793651}{10000000000000000} \]
              2. lower-*.f64N/A

                \[\leadsto \frac{{z}^{2}}{x} \cdot \frac{7936500793651}{10000000000000000} \]
              3. pow2N/A

                \[\leadsto \frac{z \cdot z}{x} \cdot \frac{7936500793651}{10000000000000000} \]
              4. lift-/.f64N/A

                \[\leadsto \frac{z \cdot z}{x} \cdot \frac{7936500793651}{10000000000000000} \]
              5. lift-*.f6426.2

                \[\leadsto \frac{z \cdot z}{x} \cdot 0.0007936500793651 \]
            7. Applied rewrites26.2%

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

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

                \[\leadsto \frac{z \cdot z}{x} \cdot \frac{7936500793651}{10000000000000000} \]
              3. associate-/l*N/A

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

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

                \[\leadsto \left(z \cdot \frac{z}{x}\right) \cdot 0.0007936500793651 \]
            9. Applied rewrites26.3%

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

          Alternative 18: 29.0% accurate, 4.0× speedup?

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

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

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

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

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

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

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

              \[\leadsto \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
          4. Applied rewrites62.7%

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

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

              \[\leadsto \frac{\frac{-13888888888889}{5000000000000000} \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
            2. lower-fma.f6429.0

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

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

          Alternative 19: 23.1% accurate, 8.7× speedup?

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

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

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

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

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

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

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

              \[\leadsto \frac{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{\color{blue}{x}} \]
          4. Applied rewrites62.7%

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

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

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

            Reproduce

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