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

Percentage Accurate: 93.9% → 98.6%
Time: 5.4s
Alternatives: 18
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 18 alternatives:

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

Initial Program: 93.9% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 98.6% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 93.9%

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

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

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

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

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

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

    if 7.59999999999999995e53 < x

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(z, y - \frac{-7936500793651}{10000000000000000}, \frac{-13888888888889}{5000000000000000}\right), \frac{z}{x}, \mathsf{fma}\left(x - \frac{1}{2}, \log x, \color{blue}{-1 \cdot x}\right)\right) \]
    7. Step-by-step derivation
      1. lower-*.f6477.7

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

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

Alternative 2: 98.6% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.59999999999999995e53 < x

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(z, y - \frac{-7936500793651}{10000000000000000}, \frac{-13888888888889}{5000000000000000}\right), \frac{z}{x}, \mathsf{fma}\left(x - \frac{1}{2}, \log x, \color{blue}{-1 \cdot x}\right)\right) \]
    7. Step-by-step derivation
      1. lower-*.f6477.7

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

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

Alternative 3: 98.6% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 93.9%

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

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

    if 7.59999999999999995e53 < x

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(z, y - \frac{-7936500793651}{10000000000000000}, \frac{-13888888888889}{5000000000000000}\right), \frac{z}{x}, \mathsf{fma}\left(x - \frac{1}{2}, \log x, \color{blue}{-1 \cdot x}\right)\right) \]
    7. Step-by-step derivation
      1. lower-*.f6477.7

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

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

Alternative 4: 98.4% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 98.4% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 98.4% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\frac{91893853320467}{100000000000000} + \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)}\right) + \left(\left(x - \frac{1}{2}\right) \cdot \log x - x\right) \]
    8. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 96.9% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.45e19 < x

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(z, y - \frac{-7936500793651}{10000000000000000}, \frac{-13888888888889}{5000000000000000}\right), \frac{z}{x}, \mathsf{fma}\left(x - \frac{1}{2}, \log x, \color{blue}{-1 \cdot x}\right)\right) \]
    7. Step-by-step derivation
      1. lower-*.f6477.7

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

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

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

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

\mathbf{else}:\\
\;\;\;\;z \cdot \left(\left(y - -0.0007936500793651\right) \cdot \frac{z}{x}\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)) < -3.9999999999999998e33

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{{z}^{2} \cdot y}{x} + {z}^{2} \cdot \frac{\frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
      11. associate-*r/N/A

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
      18. lower-*.f6431.0

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

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

        \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
      21. lower-*.f6431.0

        \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot 0.0007936500793651\right)}{x} \]
    6. Applied rewrites31.0%

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

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

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

        \[\leadsto \frac{\left(z \cdot z\right) \cdot y + \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}}{x} \]
      4. distribute-lft-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.9999999999999998e33 < (+.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 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      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))

      1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{{z}^{2} \cdot y}{x} + {z}^{2} \cdot \frac{\frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
        11. associate-*r/N/A

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

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

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
        18. lower-*.f6431.0

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

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

          \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
        21. lower-*.f6431.0

          \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot 0.0007936500793651\right)}{x} \]
      6. Applied rewrites31.0%

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

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

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

          \[\leadsto \frac{\left(z \cdot z\right) \cdot y + \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}}{x} \]
        4. distribute-lft-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto z \cdot \left(\left(y - \frac{-7936500793651}{10000000000000000}\right) \cdot \frac{z}{x}\right) \]
        19. lift--.f6444.7

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

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

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

      1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{{z}^{2} \cdot y}{x} + {z}^{2} \cdot \frac{\frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
        11. associate-*r/N/A

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

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

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
        18. lower-*.f6431.0

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

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

          \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
        21. lower-*.f6431.0

          \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot 0.0007936500793651\right)}{x} \]
      6. Applied rewrites31.0%

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

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

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

          \[\leadsto \frac{\left(z \cdot z\right) \cdot y + \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}}{x} \]
        4. distribute-lft-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -3.9999999999999998e33 < (+.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 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(x - 0.5, \log x, 0.91893853320467 - x\right) - \frac{-0.083333333333333 - -0.0027777777777778 \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))

        1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{{z}^{2} \cdot y}{x} + {z}^{2} \cdot \frac{\frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
          11. associate-*r/N/A

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

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

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

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          18. lower-*.f6431.0

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

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

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          21. lower-*.f6431.0

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot 0.0007936500793651\right)}{x} \]
        6. Applied rewrites31.0%

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

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

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

            \[\leadsto \frac{\left(z \cdot z\right) \cdot y + \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}}{x} \]
          4. distribute-lft-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto z \cdot \left(\left(y - \frac{-7936500793651}{10000000000000000}\right) \cdot \frac{z}{x}\right) \]
          19. lift--.f6444.7

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

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

      Alternative 10: 86.5% accurate, 0.6× 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 -4 \cdot 10^{+33}:\\ \;\;\;\;\left(y - -0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\\ \mathbf{elif}\;t\_0 \leq 10^{+51}:\\ \;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, 0.91893853320467 - x\right) - \frac{-0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\left(y - -0.0007936500793651\right) \cdot \frac{z}{x}\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 -4e+33)
           (* (- y -0.0007936500793651) (* z (/ z x)))
           (if (<= t_0 1e+51)
             (-
              (fma (- x 0.5) (log x) (- 0.91893853320467 x))
              (/ -0.083333333333333 x))
             (* z (* (- y -0.0007936500793651) (/ z 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 <= -4e+33) {
      		tmp = (y - -0.0007936500793651) * (z * (z / x));
      	} else if (t_0 <= 1e+51) {
      		tmp = fma((x - 0.5), log(x), (0.91893853320467 - x)) - (-0.083333333333333 / x);
      	} else {
      		tmp = z * ((y - -0.0007936500793651) * (z / 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 <= -4e+33)
      		tmp = Float64(Float64(y - -0.0007936500793651) * Float64(z * Float64(z / x)));
      	elseif (t_0 <= 1e+51)
      		tmp = Float64(fma(Float64(x - 0.5), log(x), Float64(0.91893853320467 - x)) - Float64(-0.083333333333333 / x));
      	else
      		tmp = Float64(z * Float64(Float64(y - -0.0007936500793651) * Float64(z / 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, -4e+33], N[(N[(y - -0.0007936500793651), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+51], N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision] - N[(-0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(y - -0.0007936500793651), $MachinePrecision] * N[(z / x), $MachinePrecision]), $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 -4 \cdot 10^{+33}:\\
      \;\;\;\;\left(y - -0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\\
      
      \mathbf{elif}\;t\_0 \leq 10^{+51}:\\
      \;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, 0.91893853320467 - x\right) - \frac{-0.083333333333333}{x}\\
      
      \mathbf{else}:\\
      \;\;\;\;z \cdot \left(\left(y - -0.0007936500793651\right) \cdot \frac{z}{x}\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)) < -3.9999999999999998e33

        1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{{z}^{2} \cdot y}{x} + {z}^{2} \cdot \frac{\frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
          11. associate-*r/N/A

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

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

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

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          18. lower-*.f6431.0

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

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

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          21. lower-*.f6431.0

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot 0.0007936500793651\right)}{x} \]
        6. Applied rewrites31.0%

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

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

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

            \[\leadsto \frac{\left(z \cdot z\right) \cdot y + \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}}{x} \]
          4. distribute-lft-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -3.9999999999999998e33 < (+.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 93.9%

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(x - 0.5, \log x, 0.91893853320467 - x\right) - \color{blue}{\frac{-0.083333333333333}{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))

        1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{{z}^{2} \cdot y}{x} + {z}^{2} \cdot \frac{\frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
          11. associate-*r/N/A

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

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

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

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          18. lower-*.f6431.0

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

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

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          21. lower-*.f6431.0

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot 0.0007936500793651\right)}{x} \]
        6. Applied rewrites31.0%

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

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

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

            \[\leadsto \frac{\left(z \cdot z\right) \cdot y + \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}}{x} \]
          4. distribute-lft-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto z \cdot \left(\left(y - \frac{-7936500793651}{10000000000000000}\right) \cdot \frac{z}{x}\right) \]
          19. lift--.f6444.7

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

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

      Alternative 11: 86.5% accurate, 0.6× 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 -4 \cdot 10^{+33}:\\ \;\;\;\;\left(y - -0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\\ \mathbf{elif}\;t\_0 \leq 10^{+51}:\\ \;\;\;\;\left(\frac{0.083333333333333}{x} - \mathsf{fma}\left(0.5 - x, \log x, -0.91893853320467\right)\right) - x\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\left(y - -0.0007936500793651\right) \cdot \frac{z}{x}\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 -4e+33)
           (* (- y -0.0007936500793651) (* z (/ z x)))
           (if (<= t_0 1e+51)
             (-
              (- (/ 0.083333333333333 x) (fma (- 0.5 x) (log x) -0.91893853320467))
              x)
             (* z (* (- y -0.0007936500793651) (/ z 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 <= -4e+33) {
      		tmp = (y - -0.0007936500793651) * (z * (z / x));
      	} else if (t_0 <= 1e+51) {
      		tmp = ((0.083333333333333 / x) - fma((0.5 - x), log(x), -0.91893853320467)) - x;
      	} else {
      		tmp = z * ((y - -0.0007936500793651) * (z / 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 <= -4e+33)
      		tmp = Float64(Float64(y - -0.0007936500793651) * Float64(z * Float64(z / x)));
      	elseif (t_0 <= 1e+51)
      		tmp = Float64(Float64(Float64(0.083333333333333 / x) - fma(Float64(0.5 - x), log(x), -0.91893853320467)) - x);
      	else
      		tmp = Float64(z * Float64(Float64(y - -0.0007936500793651) * Float64(z / 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, -4e+33], N[(N[(y - -0.0007936500793651), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+51], N[(N[(N[(0.083333333333333 / x), $MachinePrecision] - N[(N[(0.5 - x), $MachinePrecision] * N[Log[x], $MachinePrecision] + -0.91893853320467), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], N[(z * N[(N[(y - -0.0007936500793651), $MachinePrecision] * N[(z / x), $MachinePrecision]), $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 -4 \cdot 10^{+33}:\\
      \;\;\;\;\left(y - -0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\\
      
      \mathbf{elif}\;t\_0 \leq 10^{+51}:\\
      \;\;\;\;\left(\frac{0.083333333333333}{x} - \mathsf{fma}\left(0.5 - x, \log x, -0.91893853320467\right)\right) - x\\
      
      \mathbf{else}:\\
      \;\;\;\;z \cdot \left(\left(y - -0.0007936500793651\right) \cdot \frac{z}{x}\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)) < -3.9999999999999998e33

        1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{{z}^{2} \cdot y}{x} + {z}^{2} \cdot \frac{\frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
          11. associate-*r/N/A

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

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

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

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          18. lower-*.f6431.0

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

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

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          21. lower-*.f6431.0

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot 0.0007936500793651\right)}{x} \]
        6. Applied rewrites31.0%

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

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

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

            \[\leadsto \frac{\left(z \cdot z\right) \cdot y + \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}}{x} \]
          4. distribute-lft-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -3.9999999999999998e33 < (+.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 93.9%

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

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

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

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

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

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

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

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

            \[\leadsto \left(\mathsf{fma}\left(\frac{83333333333333}{1000000000000000}, \frac{1}{x}, \log x \cdot \left(x - \frac{1}{2}\right)\right) + \frac{91893853320467}{100000000000000}\right) - x \]
          3. lift-fma.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. lift-*.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 \]
          5. *-commutativeN/A

            \[\leadsto \left(\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(x - \frac{1}{2}\right) \cdot \log x\right) + \frac{91893853320467}{100000000000000}\right) - x \]
          6. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\frac{\frac{83333333333333}{1000000000000000}}{x} - \mathsf{fma}\left(\frac{1}{2} - x, \log x, \mathsf{neg}\left(\frac{91893853320467}{100000000000000}\right)\right)\right) - x \]
          19. metadata-eval56.8

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

          \[\leadsto \left(\frac{0.083333333333333}{x} - \mathsf{fma}\left(0.5 - x, \log x, -0.91893853320467\right)\right) - 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))

        1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{{z}^{2} \cdot y}{x} + {z}^{2} \cdot \frac{\frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
          11. associate-*r/N/A

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

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

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

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          18. lower-*.f6431.0

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

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

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          21. lower-*.f6431.0

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot 0.0007936500793651\right)}{x} \]
        6. Applied rewrites31.0%

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

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

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

            \[\leadsto \frac{\left(z \cdot z\right) \cdot y + \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}}{x} \]
          4. distribute-lft-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto z \cdot \left(\left(y - \frac{-7936500793651}{10000000000000000}\right) \cdot \frac{z}{x}\right) \]
          19. lift--.f6444.7

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

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

      Alternative 12: 83.6% accurate, 1.8× speedup?

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

        1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 6.10000000000000011e78 < x

        1. Initial program 93.9%

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\log x, x - \frac{1}{2}, -1 \cdot x\right) \]
        7. Step-by-step derivation
          1. lower-*.f6436.2

            \[\leadsto \mathsf{fma}\left(\log x, x - 0.5, -1 \cdot x\right) \]
        8. Applied rewrites36.2%

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

      Alternative 13: 65.5% accurate, 1.8× speedup?

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

        1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.6999999999999999e50 < x

        1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{{z}^{2} \cdot y}{x} + {z}^{2} \cdot \frac{\frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
          11. associate-*r/N/A

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

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

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

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          18. lower-*.f6431.0

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

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

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          21. lower-*.f6431.0

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot 0.0007936500793651\right)}{x} \]
        6. Applied rewrites31.0%

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

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

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

            \[\leadsto \frac{\left(z \cdot z\right) \cdot y + \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}}{x} \]
          4. distribute-lft-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto z \cdot \left(\left(y - \frac{-7936500793651}{10000000000000000}\right) \cdot \frac{z}{x}\right) \]
          19. lift--.f6444.7

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

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

      Alternative 14: 65.0% 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\\ \mathbf{if}\;t\_0 \leq -4 \cdot 10^{+33}:\\ \;\;\;\;\left(y - -0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+15}:\\ \;\;\;\;\frac{\mathsf{fma}\left(0.0007936500793651 \cdot z - 0.0027777777777778, z, 0.083333333333333\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\left(y - -0.0007936500793651\right) \cdot \frac{z}{x}\right)\\ \end{array} \end{array} \]
      (FPCore (x y z)
       :precision binary64
       (let* ((t_0 (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)))
         (if (<= t_0 -4e+33)
           (* (- y -0.0007936500793651) (* z (/ z x)))
           (if (<= t_0 5e+15)
             (/
              (fma
               (- (* 0.0007936500793651 z) 0.0027777777777778)
               z
               0.083333333333333)
              x)
             (* z (* (- y -0.0007936500793651) (/ z x)))))))
      double code(double x, double y, double z) {
      	double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
      	double tmp;
      	if (t_0 <= -4e+33) {
      		tmp = (y - -0.0007936500793651) * (z * (z / x));
      	} else if (t_0 <= 5e+15) {
      		tmp = fma(((0.0007936500793651 * z) - 0.0027777777777778), z, 0.083333333333333) / x;
      	} else {
      		tmp = z * ((y - -0.0007936500793651) * (z / x));
      	}
      	return tmp;
      }
      
      function code(x, y, z)
      	t_0 = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z)
      	tmp = 0.0
      	if (t_0 <= -4e+33)
      		tmp = Float64(Float64(y - -0.0007936500793651) * Float64(z * Float64(z / x)));
      	elseif (t_0 <= 5e+15)
      		tmp = Float64(fma(Float64(Float64(0.0007936500793651 * z) - 0.0027777777777778), z, 0.083333333333333) / x);
      	else
      		tmp = Float64(z * Float64(Float64(y - -0.0007936500793651) * Float64(z / x)));
      	end
      	return tmp
      end
      
      code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$0, -4e+33], N[(N[(y - -0.0007936500793651), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+15], N[(N[(N[(N[(0.0007936500793651 * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision], N[(z * N[(N[(y - -0.0007936500793651), $MachinePrecision] * N[(z / x), $MachinePrecision]), $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 -4 \cdot 10^{+33}:\\
      \;\;\;\;\left(y - -0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\\
      
      \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+15}:\\
      \;\;\;\;\frac{\mathsf{fma}\left(0.0007936500793651 \cdot z - 0.0027777777777778, z, 0.083333333333333\right)}{x}\\
      
      \mathbf{else}:\\
      \;\;\;\;z \cdot \left(\left(y - -0.0007936500793651\right) \cdot \frac{z}{x}\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) < -3.9999999999999998e33

        1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{{z}^{2} \cdot y}{x} + {z}^{2} \cdot \frac{\frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
          11. associate-*r/N/A

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

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

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

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          18. lower-*.f6431.0

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

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

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          21. lower-*.f6431.0

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot 0.0007936500793651\right)}{x} \]
        6. Applied rewrites31.0%

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

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

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

            \[\leadsto \frac{\left(z \cdot z\right) \cdot y + \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}}{x} \]
          4. distribute-lft-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x} \]
        7. Applied rewrites46.7%

          \[\leadsto \frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x} \]
        8. Step-by-step derivation
          1. lift-+.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. lift-*.f64N/A

            \[\leadsto \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}{x} \]
          4. *-commutativeN/A

            \[\leadsto \frac{\left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}{x} \]
          5. lower-fma.f6446.7

            \[\leadsto \frac{\mathsf{fma}\left(0.0007936500793651 \cdot z - 0.0027777777777778, z, 0.083333333333333\right)}{x} \]
        9. Applied rewrites46.7%

          \[\leadsto \frac{\mathsf{fma}\left(0.0007936500793651 \cdot z - 0.0027777777777778, z, 0.083333333333333\right)}{\color{blue}{x}} \]

        if 5e15 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z)

        1. Initial program 93.9%

          \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
        2. Taylor expanded in z around inf

          \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
        3. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto {z}^{2} \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
          2. lower-pow.f64N/A

            \[\leadsto {z}^{2} \cdot \left(\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}} + \frac{y}{x}\right) \]
          3. lower-fma.f64N/A

            \[\leadsto {z}^{2} \cdot \mathsf{fma}\left(\frac{7936500793651}{10000000000000000}, \color{blue}{\frac{1}{x}}, \frac{y}{x}\right) \]
          4. lower-/.f64N/A

            \[\leadsto {z}^{2} \cdot \mathsf{fma}\left(\frac{7936500793651}{10000000000000000}, \frac{1}{\color{blue}{x}}, \frac{y}{x}\right) \]
          5. lower-/.f6442.3

            \[\leadsto {z}^{2} \cdot \mathsf{fma}\left(0.0007936500793651, \frac{1}{x}, \frac{y}{x}\right) \]
        4. Applied rewrites42.3%

          \[\leadsto \color{blue}{{z}^{2} \cdot \mathsf{fma}\left(0.0007936500793651, \frac{1}{x}, \frac{y}{x}\right)} \]
        5. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto {z}^{2} \cdot \color{blue}{\mathsf{fma}\left(\frac{7936500793651}{10000000000000000}, \frac{1}{x}, \frac{y}{x}\right)} \]
          2. lift-fma.f64N/A

            \[\leadsto {z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \color{blue}{\frac{y}{x}}\right) \]
          3. +-commutativeN/A

            \[\leadsto {z}^{2} \cdot \left(\frac{y}{x} + \color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}}\right) \]
          4. distribute-rgt-inN/A

            \[\leadsto \frac{y}{x} \cdot {z}^{2} + \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot {z}^{2}} \]
          5. *-commutativeN/A

            \[\leadsto {z}^{2} \cdot \frac{y}{x} + \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right)} \cdot {z}^{2} \]
          6. lift-/.f64N/A

            \[\leadsto {z}^{2} \cdot \frac{y}{x} + \left(\frac{7936500793651}{10000000000000000} \cdot \color{blue}{\frac{1}{x}}\right) \cdot {z}^{2} \]
          7. associate-*r/N/A

            \[\leadsto \frac{{z}^{2} \cdot y}{x} + \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right)} \cdot {z}^{2} \]
          8. *-commutativeN/A

            \[\leadsto \frac{{z}^{2} \cdot y}{x} + {z}^{2} \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right)} \]
          9. lift-/.f64N/A

            \[\leadsto \frac{{z}^{2} \cdot y}{x} + {z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{\color{blue}{x}}\right) \]
          10. mult-flip-revN/A

            \[\leadsto \frac{{z}^{2} \cdot y}{x} + {z}^{2} \cdot \frac{\frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
          11. associate-*r/N/A

            \[\leadsto \frac{{z}^{2} \cdot y}{x} + \frac{{z}^{2} \cdot \frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
          12. div-add-revN/A

            \[\leadsto \frac{{z}^{2} \cdot y + {z}^{2} \cdot \frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
          13. lower-/.f64N/A

            \[\leadsto \frac{{z}^{2} \cdot y + {z}^{2} \cdot \frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
          14. lower-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left({z}^{2}, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          15. lift-pow.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left({z}^{2}, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          16. unpow2N/A

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          17. lower-*.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          18. lower-*.f6431.0

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot 0.0007936500793651\right)}{x} \]
          19. lift-pow.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          20. unpow2N/A

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          21. lower-*.f6431.0

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot 0.0007936500793651\right)}{x} \]
        6. Applied rewrites31.0%

          \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot 0.0007936500793651\right)}{\color{blue}{x}} \]
        7. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}\right)}{\color{blue}{x}} \]
          2. lift-fma.f64N/A

            \[\leadsto \frac{\left(z \cdot z\right) \cdot y + \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}}{x} \]
          3. lift-*.f64N/A

            \[\leadsto \frac{\left(z \cdot z\right) \cdot y + \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}}{x} \]
          4. distribute-lft-outN/A

            \[\leadsto \frac{\left(z \cdot z\right) \cdot \left(y + \frac{7936500793651}{10000000000000000}\right)}{x} \]
          5. lift-+.f64N/A

            \[\leadsto \frac{\left(z \cdot z\right) \cdot \left(y + \frac{7936500793651}{10000000000000000}\right)}{x} \]
          6. *-commutativeN/A

            \[\leadsto \frac{\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \left(z \cdot z\right)}{x} \]
          7. associate-/l*N/A

            \[\leadsto \left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \color{blue}{\frac{z \cdot z}{x}} \]
          8. lift-*.f64N/A

            \[\leadsto \left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \frac{z \cdot z}{x} \]
          9. associate-/l*N/A

            \[\leadsto \left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \left(z \cdot \color{blue}{\frac{z}{x}}\right) \]
          10. lift-/.f64N/A

            \[\leadsto \left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \left(z \cdot \frac{z}{\color{blue}{x}}\right) \]
          11. associate-*l*N/A

            \[\leadsto \left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z\right) \cdot \color{blue}{\frac{z}{x}} \]
          12. *-commutativeN/A

            \[\leadsto \left(z \cdot \left(y + \frac{7936500793651}{10000000000000000}\right)\right) \cdot \frac{\color{blue}{z}}{x} \]
          13. associate-*l*N/A

            \[\leadsto z \cdot \color{blue}{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \frac{z}{x}\right)} \]
          14. lower-*.f64N/A

            \[\leadsto z \cdot \color{blue}{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \frac{z}{x}\right)} \]
          15. lower-*.f6444.7

            \[\leadsto z \cdot \left(\left(y + 0.0007936500793651\right) \cdot \color{blue}{\frac{z}{x}}\right) \]
          16. lift-+.f64N/A

            \[\leadsto z \cdot \left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \frac{\color{blue}{z}}{x}\right) \]
          17. add-flipN/A

            \[\leadsto z \cdot \left(\left(y - \left(\mathsf{neg}\left(\frac{7936500793651}{10000000000000000}\right)\right)\right) \cdot \frac{\color{blue}{z}}{x}\right) \]
          18. metadata-evalN/A

            \[\leadsto z \cdot \left(\left(y - \frac{-7936500793651}{10000000000000000}\right) \cdot \frac{z}{x}\right) \]
          19. lift--.f6444.7

            \[\leadsto z \cdot \left(\left(y - -0.0007936500793651\right) \cdot \frac{\color{blue}{z}}{x}\right) \]
        8. Applied rewrites44.7%

          \[\leadsto z \cdot \color{blue}{\left(\left(y - -0.0007936500793651\right) \cdot \frac{z}{x}\right)} \]
      3. Recombined 3 regimes into one program.
      4. Add Preprocessing

      Alternative 15: 64.6% 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 -4 \cdot 10^{+33}:\\ \;\;\;\;\left(y - -0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\\ \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{-6}:\\ \;\;\;\;\frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\left(y - -0.0007936500793651\right) \cdot \frac{z}{x}\right)\\ \end{array} \end{array} \]
      (FPCore (x y z)
       :precision binary64
       (let* ((t_0 (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)))
         (if (<= t_0 -4e+33)
           (* (- y -0.0007936500793651) (* z (/ z x)))
           (if (<= t_0 4e-6)
             (/ 0.083333333333333 x)
             (* z (* (- y -0.0007936500793651) (/ z x)))))))
      double code(double x, double y, double z) {
      	double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
      	double tmp;
      	if (t_0 <= -4e+33) {
      		tmp = (y - -0.0007936500793651) * (z * (z / x));
      	} else if (t_0 <= 4e-6) {
      		tmp = 0.083333333333333 / x;
      	} else {
      		tmp = z * ((y - -0.0007936500793651) * (z / x));
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y, z)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8) :: t_0
          real(8) :: tmp
          t_0 = (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z
          if (t_0 <= (-4d+33)) then
              tmp = (y - (-0.0007936500793651d0)) * (z * (z / x))
          else if (t_0 <= 4d-6) then
              tmp = 0.083333333333333d0 / x
          else
              tmp = z * ((y - (-0.0007936500793651d0)) * (z / x))
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z) {
      	double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
      	double tmp;
      	if (t_0 <= -4e+33) {
      		tmp = (y - -0.0007936500793651) * (z * (z / x));
      	} else if (t_0 <= 4e-6) {
      		tmp = 0.083333333333333 / x;
      	} else {
      		tmp = z * ((y - -0.0007936500793651) * (z / x));
      	}
      	return tmp;
      }
      
      def code(x, y, z):
      	t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z
      	tmp = 0
      	if t_0 <= -4e+33:
      		tmp = (y - -0.0007936500793651) * (z * (z / x))
      	elif t_0 <= 4e-6:
      		tmp = 0.083333333333333 / x
      	else:
      		tmp = z * ((y - -0.0007936500793651) * (z / x))
      	return tmp
      
      function code(x, y, z)
      	t_0 = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z)
      	tmp = 0.0
      	if (t_0 <= -4e+33)
      		tmp = Float64(Float64(y - -0.0007936500793651) * Float64(z * Float64(z / x)));
      	elseif (t_0 <= 4e-6)
      		tmp = Float64(0.083333333333333 / x);
      	else
      		tmp = Float64(z * Float64(Float64(y - -0.0007936500793651) * Float64(z / x)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z)
      	t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
      	tmp = 0.0;
      	if (t_0 <= -4e+33)
      		tmp = (y - -0.0007936500793651) * (z * (z / x));
      	elseif (t_0 <= 4e-6)
      		tmp = 0.083333333333333 / x;
      	else
      		tmp = z * ((y - -0.0007936500793651) * (z / x));
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$0, -4e+33], N[(N[(y - -0.0007936500793651), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 4e-6], N[(0.083333333333333 / x), $MachinePrecision], N[(z * N[(N[(y - -0.0007936500793651), $MachinePrecision] * N[(z / x), $MachinePrecision]), $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 -4 \cdot 10^{+33}:\\
      \;\;\;\;\left(y - -0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\\
      
      \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{-6}:\\
      \;\;\;\;\frac{0.083333333333333}{x}\\
      
      \mathbf{else}:\\
      \;\;\;\;z \cdot \left(\left(y - -0.0007936500793651\right) \cdot \frac{z}{x}\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) < -3.9999999999999998e33

        1. Initial program 93.9%

          \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
        2. Taylor expanded in z around inf

          \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
        3. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto {z}^{2} \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
          2. lower-pow.f64N/A

            \[\leadsto {z}^{2} \cdot \left(\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}} + \frac{y}{x}\right) \]
          3. lower-fma.f64N/A

            \[\leadsto {z}^{2} \cdot \mathsf{fma}\left(\frac{7936500793651}{10000000000000000}, \color{blue}{\frac{1}{x}}, \frac{y}{x}\right) \]
          4. lower-/.f64N/A

            \[\leadsto {z}^{2} \cdot \mathsf{fma}\left(\frac{7936500793651}{10000000000000000}, \frac{1}{\color{blue}{x}}, \frac{y}{x}\right) \]
          5. lower-/.f6442.3

            \[\leadsto {z}^{2} \cdot \mathsf{fma}\left(0.0007936500793651, \frac{1}{x}, \frac{y}{x}\right) \]
        4. Applied rewrites42.3%

          \[\leadsto \color{blue}{{z}^{2} \cdot \mathsf{fma}\left(0.0007936500793651, \frac{1}{x}, \frac{y}{x}\right)} \]
        5. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto {z}^{2} \cdot \color{blue}{\mathsf{fma}\left(\frac{7936500793651}{10000000000000000}, \frac{1}{x}, \frac{y}{x}\right)} \]
          2. lift-fma.f64N/A

            \[\leadsto {z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \color{blue}{\frac{y}{x}}\right) \]
          3. +-commutativeN/A

            \[\leadsto {z}^{2} \cdot \left(\frac{y}{x} + \color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}}\right) \]
          4. distribute-rgt-inN/A

            \[\leadsto \frac{y}{x} \cdot {z}^{2} + \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot {z}^{2}} \]
          5. *-commutativeN/A

            \[\leadsto {z}^{2} \cdot \frac{y}{x} + \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right)} \cdot {z}^{2} \]
          6. lift-/.f64N/A

            \[\leadsto {z}^{2} \cdot \frac{y}{x} + \left(\frac{7936500793651}{10000000000000000} \cdot \color{blue}{\frac{1}{x}}\right) \cdot {z}^{2} \]
          7. associate-*r/N/A

            \[\leadsto \frac{{z}^{2} \cdot y}{x} + \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right)} \cdot {z}^{2} \]
          8. *-commutativeN/A

            \[\leadsto \frac{{z}^{2} \cdot y}{x} + {z}^{2} \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right)} \]
          9. lift-/.f64N/A

            \[\leadsto \frac{{z}^{2} \cdot y}{x} + {z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{\color{blue}{x}}\right) \]
          10. mult-flip-revN/A

            \[\leadsto \frac{{z}^{2} \cdot y}{x} + {z}^{2} \cdot \frac{\frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
          11. associate-*r/N/A

            \[\leadsto \frac{{z}^{2} \cdot y}{x} + \frac{{z}^{2} \cdot \frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
          12. div-add-revN/A

            \[\leadsto \frac{{z}^{2} \cdot y + {z}^{2} \cdot \frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
          13. lower-/.f64N/A

            \[\leadsto \frac{{z}^{2} \cdot y + {z}^{2} \cdot \frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
          14. lower-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left({z}^{2}, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          15. lift-pow.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left({z}^{2}, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          16. unpow2N/A

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          17. lower-*.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          18. lower-*.f6431.0

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot 0.0007936500793651\right)}{x} \]
          19. lift-pow.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          20. unpow2N/A

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
          21. lower-*.f6431.0

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot 0.0007936500793651\right)}{x} \]
        6. Applied rewrites31.0%

          \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot 0.0007936500793651\right)}{\color{blue}{x}} \]
        7. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}\right)}{\color{blue}{x}} \]
          2. lift-fma.f64N/A

            \[\leadsto \frac{\left(z \cdot z\right) \cdot y + \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}}{x} \]
          3. lift-*.f64N/A

            \[\leadsto \frac{\left(z \cdot z\right) \cdot y + \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}}{x} \]
          4. distribute-lft-outN/A

            \[\leadsto \frac{\left(z \cdot z\right) \cdot \left(y + \frac{7936500793651}{10000000000000000}\right)}{x} \]
          5. lift-+.f64N/A

            \[\leadsto \frac{\left(z \cdot z\right) \cdot \left(y + \frac{7936500793651}{10000000000000000}\right)}{x} \]
          6. *-commutativeN/A

            \[\leadsto \frac{\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \left(z \cdot z\right)}{x} \]
          7. associate-/l*N/A

            \[\leadsto \left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \color{blue}{\frac{z \cdot z}{x}} \]
          8. lower-*.f64N/A

            \[\leadsto \left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \color{blue}{\frac{z \cdot z}{x}} \]
          9. lift-+.f64N/A

            \[\leadsto \left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \frac{\color{blue}{z \cdot z}}{x} \]
          10. add-flipN/A

            \[\leadsto \left(y - \left(\mathsf{neg}\left(\frac{7936500793651}{10000000000000000}\right)\right)\right) \cdot \frac{\color{blue}{z \cdot z}}{x} \]
          11. metadata-evalN/A

            \[\leadsto \left(y - \frac{-7936500793651}{10000000000000000}\right) \cdot \frac{z \cdot \color{blue}{z}}{x} \]
          12. lift--.f64N/A

            \[\leadsto \left(y - \frac{-7936500793651}{10000000000000000}\right) \cdot \frac{\color{blue}{z \cdot z}}{x} \]
          13. lift-*.f64N/A

            \[\leadsto \left(y - \frac{-7936500793651}{10000000000000000}\right) \cdot \frac{z \cdot z}{x} \]
          14. associate-/l*N/A

            \[\leadsto \left(y - \frac{-7936500793651}{10000000000000000}\right) \cdot \left(z \cdot \color{blue}{\frac{z}{x}}\right) \]
          15. lift-/.f64N/A

            \[\leadsto \left(y - \frac{-7936500793651}{10000000000000000}\right) \cdot \left(z \cdot \frac{z}{\color{blue}{x}}\right) \]
          16. lower-*.f6445.0

            \[\leadsto \left(y - -0.0007936500793651\right) \cdot \left(z \cdot \color{blue}{\frac{z}{x}}\right) \]
        8. Applied rewrites45.0%

          \[\leadsto \left(y - -0.0007936500793651\right) \cdot \color{blue}{\left(z \cdot \frac{z}{x}\right)} \]

        if -3.9999999999999998e33 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 3.99999999999999982e-6

        1. Initial program 93.9%

          \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
        2. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{\color{blue}{x}} \]
          2. lower-+.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          3. lower-*.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          4. lower--.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          5. lower-*.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          6. lower-+.f6463.2

            \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
        4. Applied rewrites63.2%

          \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
        5. Taylor expanded in z around 0

          \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} \]
        6. Step-by-step derivation
          1. Applied rewrites23.2%

            \[\leadsto \frac{0.083333333333333}{x} \]

          if 3.99999999999999982e-6 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z)

          1. Initial program 93.9%

            \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
          2. Taylor expanded in z around inf

            \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
          3. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto {z}^{2} \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
            2. lower-pow.f64N/A

              \[\leadsto {z}^{2} \cdot \left(\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}} + \frac{y}{x}\right) \]
            3. lower-fma.f64N/A

              \[\leadsto {z}^{2} \cdot \mathsf{fma}\left(\frac{7936500793651}{10000000000000000}, \color{blue}{\frac{1}{x}}, \frac{y}{x}\right) \]
            4. lower-/.f64N/A

              \[\leadsto {z}^{2} \cdot \mathsf{fma}\left(\frac{7936500793651}{10000000000000000}, \frac{1}{\color{blue}{x}}, \frac{y}{x}\right) \]
            5. lower-/.f6442.3

              \[\leadsto {z}^{2} \cdot \mathsf{fma}\left(0.0007936500793651, \frac{1}{x}, \frac{y}{x}\right) \]
          4. Applied rewrites42.3%

            \[\leadsto \color{blue}{{z}^{2} \cdot \mathsf{fma}\left(0.0007936500793651, \frac{1}{x}, \frac{y}{x}\right)} \]
          5. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto {z}^{2} \cdot \color{blue}{\mathsf{fma}\left(\frac{7936500793651}{10000000000000000}, \frac{1}{x}, \frac{y}{x}\right)} \]
            2. lift-fma.f64N/A

              \[\leadsto {z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \color{blue}{\frac{y}{x}}\right) \]
            3. +-commutativeN/A

              \[\leadsto {z}^{2} \cdot \left(\frac{y}{x} + \color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}}\right) \]
            4. distribute-rgt-inN/A

              \[\leadsto \frac{y}{x} \cdot {z}^{2} + \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot {z}^{2}} \]
            5. *-commutativeN/A

              \[\leadsto {z}^{2} \cdot \frac{y}{x} + \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right)} \cdot {z}^{2} \]
            6. lift-/.f64N/A

              \[\leadsto {z}^{2} \cdot \frac{y}{x} + \left(\frac{7936500793651}{10000000000000000} \cdot \color{blue}{\frac{1}{x}}\right) \cdot {z}^{2} \]
            7. associate-*r/N/A

              \[\leadsto \frac{{z}^{2} \cdot y}{x} + \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right)} \cdot {z}^{2} \]
            8. *-commutativeN/A

              \[\leadsto \frac{{z}^{2} \cdot y}{x} + {z}^{2} \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right)} \]
            9. lift-/.f64N/A

              \[\leadsto \frac{{z}^{2} \cdot y}{x} + {z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{\color{blue}{x}}\right) \]
            10. mult-flip-revN/A

              \[\leadsto \frac{{z}^{2} \cdot y}{x} + {z}^{2} \cdot \frac{\frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
            11. associate-*r/N/A

              \[\leadsto \frac{{z}^{2} \cdot y}{x} + \frac{{z}^{2} \cdot \frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
            12. div-add-revN/A

              \[\leadsto \frac{{z}^{2} \cdot y + {z}^{2} \cdot \frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
            13. lower-/.f64N/A

              \[\leadsto \frac{{z}^{2} \cdot y + {z}^{2} \cdot \frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
            14. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left({z}^{2}, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
            15. lift-pow.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left({z}^{2}, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
            16. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
            17. lower-*.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
            18. lower-*.f6431.0

              \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot 0.0007936500793651\right)}{x} \]
            19. lift-pow.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
            20. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
            21. lower-*.f6431.0

              \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot 0.0007936500793651\right)}{x} \]
          6. Applied rewrites31.0%

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot 0.0007936500793651\right)}{\color{blue}{x}} \]
          7. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}\right)}{\color{blue}{x}} \]
            2. lift-fma.f64N/A

              \[\leadsto \frac{\left(z \cdot z\right) \cdot y + \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}}{x} \]
            3. lift-*.f64N/A

              \[\leadsto \frac{\left(z \cdot z\right) \cdot y + \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}}{x} \]
            4. distribute-lft-outN/A

              \[\leadsto \frac{\left(z \cdot z\right) \cdot \left(y + \frac{7936500793651}{10000000000000000}\right)}{x} \]
            5. lift-+.f64N/A

              \[\leadsto \frac{\left(z \cdot z\right) \cdot \left(y + \frac{7936500793651}{10000000000000000}\right)}{x} \]
            6. *-commutativeN/A

              \[\leadsto \frac{\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \left(z \cdot z\right)}{x} \]
            7. associate-/l*N/A

              \[\leadsto \left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \color{blue}{\frac{z \cdot z}{x}} \]
            8. lift-*.f64N/A

              \[\leadsto \left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \frac{z \cdot z}{x} \]
            9. associate-/l*N/A

              \[\leadsto \left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \left(z \cdot \color{blue}{\frac{z}{x}}\right) \]
            10. lift-/.f64N/A

              \[\leadsto \left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \left(z \cdot \frac{z}{\color{blue}{x}}\right) \]
            11. associate-*l*N/A

              \[\leadsto \left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z\right) \cdot \color{blue}{\frac{z}{x}} \]
            12. *-commutativeN/A

              \[\leadsto \left(z \cdot \left(y + \frac{7936500793651}{10000000000000000}\right)\right) \cdot \frac{\color{blue}{z}}{x} \]
            13. associate-*l*N/A

              \[\leadsto z \cdot \color{blue}{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \frac{z}{x}\right)} \]
            14. lower-*.f64N/A

              \[\leadsto z \cdot \color{blue}{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \frac{z}{x}\right)} \]
            15. lower-*.f6444.7

              \[\leadsto z \cdot \left(\left(y + 0.0007936500793651\right) \cdot \color{blue}{\frac{z}{x}}\right) \]
            16. lift-+.f64N/A

              \[\leadsto z \cdot \left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \frac{\color{blue}{z}}{x}\right) \]
            17. add-flipN/A

              \[\leadsto z \cdot \left(\left(y - \left(\mathsf{neg}\left(\frac{7936500793651}{10000000000000000}\right)\right)\right) \cdot \frac{\color{blue}{z}}{x}\right) \]
            18. metadata-evalN/A

              \[\leadsto z \cdot \left(\left(y - \frac{-7936500793651}{10000000000000000}\right) \cdot \frac{z}{x}\right) \]
            19. lift--.f6444.7

              \[\leadsto z \cdot \left(\left(y - -0.0007936500793651\right) \cdot \frac{\color{blue}{z}}{x}\right) \]
          8. Applied rewrites44.7%

            \[\leadsto z \cdot \color{blue}{\left(\left(y - -0.0007936500793651\right) \cdot \frac{z}{x}\right)} \]
        7. Recombined 3 regimes into one program.
        8. Add Preprocessing

        Alternative 16: 64.4% accurate, 0.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z\\ t_1 := z \cdot \left(\left(y - -0.0007936500793651\right) \cdot \frac{z}{x}\right)\\ \mathbf{if}\;t\_0 \leq -4 \cdot 10^{+33}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{-6}:\\ \;\;\;\;\frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (let* ((t_0 (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z))
                (t_1 (* z (* (- y -0.0007936500793651) (/ z x)))))
           (if (<= t_0 -4e+33) t_1 (if (<= t_0 4e-6) (/ 0.083333333333333 x) t_1))))
        double code(double x, double y, double z) {
        	double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
        	double t_1 = z * ((y - -0.0007936500793651) * (z / x));
        	double tmp;
        	if (t_0 <= -4e+33) {
        		tmp = t_1;
        	} else if (t_0 <= 4e-6) {
        		tmp = 0.083333333333333 / x;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        module fmin_fmax_functions
            implicit none
            private
            public fmax
            public fmin
        
            interface fmax
                module procedure fmax88
                module procedure fmax44
                module procedure fmax84
                module procedure fmax48
            end interface
            interface fmin
                module procedure fmin88
                module procedure fmin44
                module procedure fmin84
                module procedure fmin48
            end interface
        contains
            real(8) function fmax88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(4) function fmax44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(8) function fmax84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmax48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
            end function
            real(8) function fmin88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(4) function fmin44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(8) function fmin84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmin48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
            end function
        end module
        
        real(8) function code(x, y, z)
        use fmin_fmax_functions
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8) :: t_0
            real(8) :: t_1
            real(8) :: tmp
            t_0 = (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z
            t_1 = z * ((y - (-0.0007936500793651d0)) * (z / x))
            if (t_0 <= (-4d+33)) then
                tmp = t_1
            else if (t_0 <= 4d-6) then
                tmp = 0.083333333333333d0 / x
            else
                tmp = t_1
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z) {
        	double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
        	double t_1 = z * ((y - -0.0007936500793651) * (z / x));
        	double tmp;
        	if (t_0 <= -4e+33) {
        		tmp = t_1;
        	} else if (t_0 <= 4e-6) {
        		tmp = 0.083333333333333 / x;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z
        	t_1 = z * ((y - -0.0007936500793651) * (z / x))
        	tmp = 0
        	if t_0 <= -4e+33:
        		tmp = t_1
        	elif t_0 <= 4e-6:
        		tmp = 0.083333333333333 / x
        	else:
        		tmp = t_1
        	return tmp
        
        function code(x, y, z)
        	t_0 = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z)
        	t_1 = Float64(z * Float64(Float64(y - -0.0007936500793651) * Float64(z / x)))
        	tmp = 0.0
        	if (t_0 <= -4e+33)
        		tmp = t_1;
        	elseif (t_0 <= 4e-6)
        		tmp = Float64(0.083333333333333 / x);
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z)
        	t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
        	t_1 = z * ((y - -0.0007936500793651) * (z / x));
        	tmp = 0.0;
        	if (t_0 <= -4e+33)
        		tmp = t_1;
        	elseif (t_0 <= 4e-6)
        		tmp = 0.083333333333333 / x;
        	else
        		tmp = t_1;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$1 = N[(z * N[(N[(y - -0.0007936500793651), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -4e+33], t$95$1, If[LessEqual[t$95$0, 4e-6], N[(0.083333333333333 / x), $MachinePrecision], t$95$1]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z\\
        t_1 := z \cdot \left(\left(y - -0.0007936500793651\right) \cdot \frac{z}{x}\right)\\
        \mathbf{if}\;t\_0 \leq -4 \cdot 10^{+33}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{-6}:\\
        \;\;\;\;\frac{0.083333333333333}{x}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < -3.9999999999999998e33 or 3.99999999999999982e-6 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z)

          1. Initial program 93.9%

            \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
          2. Taylor expanded in z around inf

            \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
          3. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto {z}^{2} \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
            2. lower-pow.f64N/A

              \[\leadsto {z}^{2} \cdot \left(\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}} + \frac{y}{x}\right) \]
            3. lower-fma.f64N/A

              \[\leadsto {z}^{2} \cdot \mathsf{fma}\left(\frac{7936500793651}{10000000000000000}, \color{blue}{\frac{1}{x}}, \frac{y}{x}\right) \]
            4. lower-/.f64N/A

              \[\leadsto {z}^{2} \cdot \mathsf{fma}\left(\frac{7936500793651}{10000000000000000}, \frac{1}{\color{blue}{x}}, \frac{y}{x}\right) \]
            5. lower-/.f6442.3

              \[\leadsto {z}^{2} \cdot \mathsf{fma}\left(0.0007936500793651, \frac{1}{x}, \frac{y}{x}\right) \]
          4. Applied rewrites42.3%

            \[\leadsto \color{blue}{{z}^{2} \cdot \mathsf{fma}\left(0.0007936500793651, \frac{1}{x}, \frac{y}{x}\right)} \]
          5. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto {z}^{2} \cdot \color{blue}{\mathsf{fma}\left(\frac{7936500793651}{10000000000000000}, \frac{1}{x}, \frac{y}{x}\right)} \]
            2. lift-fma.f64N/A

              \[\leadsto {z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \color{blue}{\frac{y}{x}}\right) \]
            3. +-commutativeN/A

              \[\leadsto {z}^{2} \cdot \left(\frac{y}{x} + \color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}}\right) \]
            4. distribute-rgt-inN/A

              \[\leadsto \frac{y}{x} \cdot {z}^{2} + \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot {z}^{2}} \]
            5. *-commutativeN/A

              \[\leadsto {z}^{2} \cdot \frac{y}{x} + \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right)} \cdot {z}^{2} \]
            6. lift-/.f64N/A

              \[\leadsto {z}^{2} \cdot \frac{y}{x} + \left(\frac{7936500793651}{10000000000000000} \cdot \color{blue}{\frac{1}{x}}\right) \cdot {z}^{2} \]
            7. associate-*r/N/A

              \[\leadsto \frac{{z}^{2} \cdot y}{x} + \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right)} \cdot {z}^{2} \]
            8. *-commutativeN/A

              \[\leadsto \frac{{z}^{2} \cdot y}{x} + {z}^{2} \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right)} \]
            9. lift-/.f64N/A

              \[\leadsto \frac{{z}^{2} \cdot y}{x} + {z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{\color{blue}{x}}\right) \]
            10. mult-flip-revN/A

              \[\leadsto \frac{{z}^{2} \cdot y}{x} + {z}^{2} \cdot \frac{\frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
            11. associate-*r/N/A

              \[\leadsto \frac{{z}^{2} \cdot y}{x} + \frac{{z}^{2} \cdot \frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
            12. div-add-revN/A

              \[\leadsto \frac{{z}^{2} \cdot y + {z}^{2} \cdot \frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
            13. lower-/.f64N/A

              \[\leadsto \frac{{z}^{2} \cdot y + {z}^{2} \cdot \frac{7936500793651}{10000000000000000}}{\color{blue}{x}} \]
            14. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left({z}^{2}, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
            15. lift-pow.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left({z}^{2}, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
            16. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
            17. lower-*.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
            18. lower-*.f6431.0

              \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot 0.0007936500793651\right)}{x} \]
            19. lift-pow.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, {z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
            20. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}\right)}{x} \]
            21. lower-*.f6431.0

              \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot 0.0007936500793651\right)}{x} \]
          6. Applied rewrites31.0%

            \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot 0.0007936500793651\right)}{\color{blue}{x}} \]
          7. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z \cdot z, y, \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}\right)}{\color{blue}{x}} \]
            2. lift-fma.f64N/A

              \[\leadsto \frac{\left(z \cdot z\right) \cdot y + \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}}{x} \]
            3. lift-*.f64N/A

              \[\leadsto \frac{\left(z \cdot z\right) \cdot y + \left(z \cdot z\right) \cdot \frac{7936500793651}{10000000000000000}}{x} \]
            4. distribute-lft-outN/A

              \[\leadsto \frac{\left(z \cdot z\right) \cdot \left(y + \frac{7936500793651}{10000000000000000}\right)}{x} \]
            5. lift-+.f64N/A

              \[\leadsto \frac{\left(z \cdot z\right) \cdot \left(y + \frac{7936500793651}{10000000000000000}\right)}{x} \]
            6. *-commutativeN/A

              \[\leadsto \frac{\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \left(z \cdot z\right)}{x} \]
            7. associate-/l*N/A

              \[\leadsto \left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \color{blue}{\frac{z \cdot z}{x}} \]
            8. lift-*.f64N/A

              \[\leadsto \left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \frac{z \cdot z}{x} \]
            9. associate-/l*N/A

              \[\leadsto \left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \left(z \cdot \color{blue}{\frac{z}{x}}\right) \]
            10. lift-/.f64N/A

              \[\leadsto \left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \left(z \cdot \frac{z}{\color{blue}{x}}\right) \]
            11. associate-*l*N/A

              \[\leadsto \left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z\right) \cdot \color{blue}{\frac{z}{x}} \]
            12. *-commutativeN/A

              \[\leadsto \left(z \cdot \left(y + \frac{7936500793651}{10000000000000000}\right)\right) \cdot \frac{\color{blue}{z}}{x} \]
            13. associate-*l*N/A

              \[\leadsto z \cdot \color{blue}{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \frac{z}{x}\right)} \]
            14. lower-*.f64N/A

              \[\leadsto z \cdot \color{blue}{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \frac{z}{x}\right)} \]
            15. lower-*.f6444.7

              \[\leadsto z \cdot \left(\left(y + 0.0007936500793651\right) \cdot \color{blue}{\frac{z}{x}}\right) \]
            16. lift-+.f64N/A

              \[\leadsto z \cdot \left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot \frac{\color{blue}{z}}{x}\right) \]
            17. add-flipN/A

              \[\leadsto z \cdot \left(\left(y - \left(\mathsf{neg}\left(\frac{7936500793651}{10000000000000000}\right)\right)\right) \cdot \frac{\color{blue}{z}}{x}\right) \]
            18. metadata-evalN/A

              \[\leadsto z \cdot \left(\left(y - \frac{-7936500793651}{10000000000000000}\right) \cdot \frac{z}{x}\right) \]
            19. lift--.f6444.7

              \[\leadsto z \cdot \left(\left(y - -0.0007936500793651\right) \cdot \frac{\color{blue}{z}}{x}\right) \]
          8. Applied rewrites44.7%

            \[\leadsto z \cdot \color{blue}{\left(\left(y - -0.0007936500793651\right) \cdot \frac{z}{x}\right)} \]

          if -3.9999999999999998e33 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 3.99999999999999982e-6

          1. Initial program 93.9%

            \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
          2. Taylor expanded in x around 0

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{\color{blue}{x}} \]
            2. lower-+.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            3. lower-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            4. lower--.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            5. lower-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            6. lower-+.f6463.2

              \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
          4. Applied rewrites63.2%

            \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
          5. Taylor expanded in z around 0

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} \]
          6. Step-by-step derivation
            1. Applied rewrites23.2%

              \[\leadsto \frac{0.083333333333333}{x} \]
          7. Recombined 2 regimes into one program.
          8. Add Preprocessing

          Alternative 17: 29.0% accurate, 3.8× speedup?

          \[\begin{array}{l} \\ \frac{0.083333333333333 + -0.0027777777777778 \cdot z}{x} \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (/ (+ 0.083333333333333 (* -0.0027777777777778 z)) x))
          double code(double x, double y, double z) {
          	return (0.083333333333333 + (-0.0027777777777778 * z)) / x;
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(x, y, z)
          use fmin_fmax_functions
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              code = (0.083333333333333d0 + ((-0.0027777777777778d0) * z)) / x
          end function
          
          public static double code(double x, double y, double z) {
          	return (0.083333333333333 + (-0.0027777777777778 * z)) / x;
          }
          
          def code(x, y, z):
          	return (0.083333333333333 + (-0.0027777777777778 * z)) / x
          
          function code(x, y, z)
          	return Float64(Float64(0.083333333333333 + Float64(-0.0027777777777778 * z)) / x)
          end
          
          function tmp = code(x, y, z)
          	tmp = (0.083333333333333 + (-0.0027777777777778 * z)) / x;
          end
          
          code[x_, y_, z_] := N[(N[(0.083333333333333 + N[(-0.0027777777777778 * z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          \frac{0.083333333333333 + -0.0027777777777778 \cdot z}{x}
          \end{array}
          
          Derivation
          1. Initial program 93.9%

            \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
          2. Taylor expanded in x around 0

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{\color{blue}{x}} \]
            2. lower-+.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            3. lower-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            4. lower--.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            5. lower-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            6. lower-+.f6463.2

              \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
          4. Applied rewrites63.2%

            \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
          5. Taylor expanded in z around 0

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + \frac{-13888888888889}{5000000000000000} \cdot z}{x} \]
          6. Step-by-step derivation
            1. lower-*.f6429.0

              \[\leadsto \frac{0.083333333333333 + -0.0027777777777778 \cdot z}{x} \]
          7. Applied rewrites29.0%

            \[\leadsto \frac{0.083333333333333 + -0.0027777777777778 \cdot z}{x} \]
          8. Add Preprocessing

          Alternative 18: 23.2% 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 93.9%

            \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
          2. Taylor expanded in x around 0

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{\color{blue}{x}} \]
            2. lower-+.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            3. lower-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            4. lower--.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            5. lower-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            6. lower-+.f6463.2

              \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
          4. Applied rewrites63.2%

            \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
          5. Taylor expanded in z around 0

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} \]
          6. Step-by-step derivation
            1. Applied rewrites23.2%

              \[\leadsto \frac{0.083333333333333}{x} \]
            2. Add Preprocessing

            Reproduce

            ?
            herbie shell --seed 2025156 
            (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)))