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

Percentage Accurate: 93.8% → 99.5%
Time: 14.9s
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);
}
real(8) function code(x, y, z)
    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}

Sampling outcomes in binary64 precision:

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.8% 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);
}
real(8) function code(x, y, z)
    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: 99.5% accurate, 0.4× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t\_0 + \left(z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right) + \frac{0.083333333333333}{x}\right)\\


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

    1. Initial program 99.5%

      \[\left(\left(\left(x - 0.5\right) \cdot \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. Add Preprocessing
    3. Step-by-step derivation
      1. fma-neg99.5%

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

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right) \cdot z + 0.083333333333333}}\right)}^{-1} \]
      7. *-commutative99.6%

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}}\right)}^{-1} \]
    4. Applied egg-rr99.6%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}\right)}^{-1}} \]
    5. Step-by-step derivation
      1. unpow-199.6%

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

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

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

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

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

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

    if 1.6500000000000001e-38 < x

    1. Initial program 92.0%

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\mathsf{fma}\left(z, z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) - 0.0027777777777778 \cdot \frac{1}{x}, 0.083333333333333 \cdot \frac{1}{x}\right)} \]
      2. associate-*r/99.5%

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \mathsf{fma}\left(z, z \cdot \left(\frac{\color{blue}{0.0007936500793651}}{x} + \frac{y}{x}\right) - 0.0027777777777778 \cdot \frac{1}{x}, 0.083333333333333 \cdot \frac{1}{x}\right) \]
      4. associate-*r/99.5%

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \mathsf{fma}\left(z, z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{\color{blue}{0.0027777777777778}}{x}, 0.083333333333333 \cdot \frac{1}{x}\right) \]
      6. associate-*r/99.5%

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right) + \frac{0.083333333333333}{x}\right)} \]
    7. Applied egg-rr99.6%

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

Alternative 2: 99.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 5 \cdot 10^{-25}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right) + \frac{1}{x \cdot 12.000000000000048}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 5e-25)
   (+
    (* x (+ (log x) -1.0))
    (/
     (+
      0.083333333333333
      (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
     x))
   (+
    (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
    (+
     (*
      z
      (- (* z (+ (/ 0.0007936500793651 x) (/ y x))) (/ 0.0027777777777778 x)))
     (/ 1.0 (* x 12.000000000000048))))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= 5e-25) {
		tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
	} else {
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((z * ((z * ((0.0007936500793651 / x) + (y / x))) - (0.0027777777777778 / x))) + (1.0 / (x * 12.000000000000048)));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (x <= 5d-25) then
        tmp = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x)
    else
        tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((z * ((z * ((0.0007936500793651d0 / x) + (y / x))) - (0.0027777777777778d0 / x))) + (1.0d0 / (x * 12.000000000000048d0)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= 5e-25) {
		tmp = (x * (Math.log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
	} else {
		tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((z * ((z * ((0.0007936500793651 / x) + (y / x))) - (0.0027777777777778 / x))) + (1.0 / (x * 12.000000000000048)));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= 5e-25:
		tmp = (x * (math.log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x)
	else:
		tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((z * ((z * ((0.0007936500793651 / x) + (y / x))) - (0.0027777777777778 / x))) + (1.0 / (x * 12.000000000000048)))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= 5e-25)
		tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x));
	else
		tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 / x) + Float64(y / x))) - Float64(0.0027777777777778 / x))) + Float64(1.0 / Float64(x * 12.000000000000048))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= 5e-25)
		tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
	else
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((z * ((z * ((0.0007936500793651 / x) + (y / x))) - (0.0027777777777778 / x))) + (1.0 / (x * 12.000000000000048)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, 5e-25], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(z * N[(N[(z * N[(N[(0.0007936500793651 / x), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(0.0027777777777778 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 5 \cdot 10^{-25}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\\

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


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

    1. Initial program 99.5%

      \[\left(\left(\left(x - 0.5\right) \cdot \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. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt99.5%

        \[\leadsto \left(\left(\color{blue}{\sqrt{\left(x - 0.5\right) \cdot \log x} \cdot \sqrt{\left(x - 0.5\right) \cdot \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. pow299.5%

        \[\leadsto \left(\left(\color{blue}{{\left(\sqrt{\left(x - 0.5\right) \cdot \log x}\right)}^{2}} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      3. sub-neg99.5%

        \[\leadsto \left(\left({\left(\sqrt{\color{blue}{\left(x + \left(-0.5\right)\right)} \cdot \log x}\right)}^{2} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      4. metadata-eval99.5%

        \[\leadsto \left(\left({\left(\sqrt{\left(x + \color{blue}{-0.5}\right) \cdot \log x}\right)}^{2} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      5. *-commutative99.5%

        \[\leadsto \left(\left({\left(\sqrt{\color{blue}{\log x \cdot \left(x + -0.5\right)}}\right)}^{2} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    4. Applied egg-rr99.5%

      \[\leadsto \left(\left(\color{blue}{{\left(\sqrt{\log x \cdot \left(x + -0.5\right)}\right)}^{2}} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    5. Taylor expanded in x around inf 99.5%

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

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(-1\right)\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. mul-1-neg99.5%

        \[\leadsto x \cdot \left(\color{blue}{\left(-\log \left(\frac{1}{x}\right)\right)} + \left(-1\right)\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      3. log-rec99.5%

        \[\leadsto x \cdot \left(\left(-\color{blue}{\left(-\log x\right)}\right) + \left(-1\right)\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      4. remove-double-neg99.5%

        \[\leadsto x \cdot \left(\color{blue}{\log x} + \left(-1\right)\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      5. metadata-eval99.5%

        \[\leadsto x \cdot \left(\log x + \color{blue}{-1}\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    7. Simplified99.5%

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

    if 4.99999999999999962e-25 < x

    1. Initial program 91.8%

      \[\left(\left(\left(x - 0.5\right) \cdot \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. Add Preprocessing
    3. Taylor expanded in z around 0 99.5%

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\mathsf{fma}\left(z, z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) - 0.0027777777777778 \cdot \frac{1}{x}, 0.083333333333333 \cdot \frac{1}{x}\right)} \]
      2. associate-*r/99.5%

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \mathsf{fma}\left(z, z \cdot \left(\frac{\color{blue}{0.0007936500793651}}{x} + \frac{y}{x}\right) - 0.0027777777777778 \cdot \frac{1}{x}, 0.083333333333333 \cdot \frac{1}{x}\right) \]
      4. associate-*r/99.5%

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \mathsf{fma}\left(z, z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{\color{blue}{0.0027777777777778}}{x}, 0.083333333333333 \cdot \frac{1}{x}\right) \]
      6. associate-*r/99.5%

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right) + \frac{0.083333333333333}{x}\right)} \]
    7. Applied egg-rr99.5%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right) + \frac{0.083333333333333}{x}\right)} \]
    8. Step-by-step derivation
      1. clear-num99.6%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right) + \color{blue}{\frac{1}{\frac{x}{0.083333333333333}}}\right) \]
      2. inv-pow99.6%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right) + \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}}\right) \]
    9. Applied egg-rr99.6%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right) + \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}}\right) \]
    10. Step-by-step derivation
      1. unpow-199.6%

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right) + \color{blue}{\frac{1}{\frac{x}{0.083333333333333}}}\right) \]
    12. Step-by-step derivation
      1. div-inv99.6%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right) + \frac{1}{\color{blue}{x \cdot \frac{1}{0.083333333333333}}}\right) \]
      2. metadata-eval99.6%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right) + \frac{1}{x \cdot \color{blue}{12.000000000000048}}\right) \]
    13. Applied egg-rr99.6%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right) + \frac{1}{\color{blue}{x \cdot 12.000000000000048}}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 5 \cdot 10^{-25}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right) + \frac{1}{x \cdot 12.000000000000048}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 99.5% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 5 \cdot 10^{-37}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right) + \frac{0.083333333333333}{x}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 5e-37)
   (+
    (* x (+ (log x) -1.0))
    (/
     (+
      0.083333333333333
      (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
     x))
   (+
    (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
    (+
     (*
      z
      (- (* z (+ (/ 0.0007936500793651 x) (/ y x))) (/ 0.0027777777777778 x)))
     (/ 0.083333333333333 x)))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= 5e-37) {
		tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
	} else {
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((z * ((z * ((0.0007936500793651 / x) + (y / x))) - (0.0027777777777778 / x))) + (0.083333333333333 / x));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (x <= 5d-37) then
        tmp = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x)
    else
        tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((z * ((z * ((0.0007936500793651d0 / x) + (y / x))) - (0.0027777777777778d0 / x))) + (0.083333333333333d0 / x))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= 5e-37) {
		tmp = (x * (Math.log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
	} else {
		tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((z * ((z * ((0.0007936500793651 / x) + (y / x))) - (0.0027777777777778 / x))) + (0.083333333333333 / x));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= 5e-37:
		tmp = (x * (math.log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x)
	else:
		tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((z * ((z * ((0.0007936500793651 / x) + (y / x))) - (0.0027777777777778 / x))) + (0.083333333333333 / x))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= 5e-37)
		tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x));
	else
		tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 / x) + Float64(y / x))) - Float64(0.0027777777777778 / x))) + Float64(0.083333333333333 / x)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= 5e-37)
		tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
	else
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((z * ((z * ((0.0007936500793651 / x) + (y / x))) - (0.0027777777777778 / x))) + (0.083333333333333 / x));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, 5e-37], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(z * N[(N[(z * N[(N[(0.0007936500793651 / x), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(0.0027777777777778 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 5 \cdot 10^{-37}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\\

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


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

    1. Initial program 99.5%

      \[\left(\left(\left(x - 0.5\right) \cdot \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. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt99.5%

        \[\leadsto \left(\left(\color{blue}{\sqrt{\left(x - 0.5\right) \cdot \log x} \cdot \sqrt{\left(x - 0.5\right) \cdot \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. pow299.5%

        \[\leadsto \left(\left(\color{blue}{{\left(\sqrt{\left(x - 0.5\right) \cdot \log x}\right)}^{2}} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      3. sub-neg99.5%

        \[\leadsto \left(\left({\left(\sqrt{\color{blue}{\left(x + \left(-0.5\right)\right)} \cdot \log x}\right)}^{2} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      4. metadata-eval99.5%

        \[\leadsto \left(\left({\left(\sqrt{\left(x + \color{blue}{-0.5}\right) \cdot \log x}\right)}^{2} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      5. *-commutative99.5%

        \[\leadsto \left(\left({\left(\sqrt{\color{blue}{\log x \cdot \left(x + -0.5\right)}}\right)}^{2} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    4. Applied egg-rr99.5%

      \[\leadsto \left(\left(\color{blue}{{\left(\sqrt{\log x \cdot \left(x + -0.5\right)}\right)}^{2}} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    5. Taylor expanded in x around inf 99.5%

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

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(-1\right)\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. mul-1-neg99.5%

        \[\leadsto x \cdot \left(\color{blue}{\left(-\log \left(\frac{1}{x}\right)\right)} + \left(-1\right)\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      3. log-rec99.5%

        \[\leadsto x \cdot \left(\left(-\color{blue}{\left(-\log x\right)}\right) + \left(-1\right)\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      4. remove-double-neg99.5%

        \[\leadsto x \cdot \left(\color{blue}{\log x} + \left(-1\right)\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      5. metadata-eval99.5%

        \[\leadsto x \cdot \left(\log x + \color{blue}{-1}\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    7. Simplified99.5%

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

    if 4.9999999999999997e-37 < x

    1. Initial program 92.0%

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\mathsf{fma}\left(z, z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) - 0.0027777777777778 \cdot \frac{1}{x}, 0.083333333333333 \cdot \frac{1}{x}\right)} \]
      2. associate-*r/99.5%

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \mathsf{fma}\left(z, z \cdot \left(\frac{\color{blue}{0.0007936500793651}}{x} + \frac{y}{x}\right) - 0.0027777777777778 \cdot \frac{1}{x}, 0.083333333333333 \cdot \frac{1}{x}\right) \]
      4. associate-*r/99.5%

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \mathsf{fma}\left(z, z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{\color{blue}{0.0027777777777778}}{x}, 0.083333333333333 \cdot \frac{1}{x}\right) \]
      6. associate-*r/99.5%

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right) + \frac{0.083333333333333}{x}\right)} \]
    7. Applied egg-rr99.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 5 \cdot 10^{-37}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right) + \frac{0.083333333333333}{x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 81.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+105}:\\ \;\;\;\;z \cdot \left(\frac{y \cdot \left(z \cdot \left(1 + 0.0007936500793651 \cdot \frac{1}{y}\right)\right)}{x} + 0.0027777777777778 \cdot \frac{-1}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-12}:\\ \;\;\;\;\left(\log x \cdot \left(x + -0.5\right) - x\right) + \left(0.91893853320467 + \frac{1}{\frac{x}{0.083333333333333}}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \frac{1}{\frac{x}{y}}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -6e+105)
   (+
    (*
     z
     (+
      (/ (* y (* z (+ 1.0 (* 0.0007936500793651 (/ 1.0 y))))) x)
      (* 0.0027777777777778 (/ -1.0 x))))
    (* 0.083333333333333 (/ 1.0 x)))
   (if (<= z 4.5e-12)
     (+
      (- (* (log x) (+ x -0.5)) x)
      (+ 0.91893853320467 (/ 1.0 (/ x 0.083333333333333))))
     (* (* z z) (+ (/ 0.0007936500793651 x) (/ 1.0 (/ x y)))))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -6e+105) {
		tmp = (z * (((y * (z * (1.0 + (0.0007936500793651 * (1.0 / y))))) / x) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x));
	} else if (z <= 4.5e-12) {
		tmp = ((log(x) * (x + -0.5)) - x) + (0.91893853320467 + (1.0 / (x / 0.083333333333333)));
	} else {
		tmp = (z * z) * ((0.0007936500793651 / x) + (1.0 / (x / y)));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (z <= (-6d+105)) then
        tmp = (z * (((y * (z * (1.0d0 + (0.0007936500793651d0 * (1.0d0 / y))))) / x) + (0.0027777777777778d0 * ((-1.0d0) / x)))) + (0.083333333333333d0 * (1.0d0 / x))
    else if (z <= 4.5d-12) then
        tmp = ((log(x) * (x + (-0.5d0))) - x) + (0.91893853320467d0 + (1.0d0 / (x / 0.083333333333333d0)))
    else
        tmp = (z * z) * ((0.0007936500793651d0 / x) + (1.0d0 / (x / y)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -6e+105) {
		tmp = (z * (((y * (z * (1.0 + (0.0007936500793651 * (1.0 / y))))) / x) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x));
	} else if (z <= 4.5e-12) {
		tmp = ((Math.log(x) * (x + -0.5)) - x) + (0.91893853320467 + (1.0 / (x / 0.083333333333333)));
	} else {
		tmp = (z * z) * ((0.0007936500793651 / x) + (1.0 / (x / y)));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -6e+105:
		tmp = (z * (((y * (z * (1.0 + (0.0007936500793651 * (1.0 / y))))) / x) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x))
	elif z <= 4.5e-12:
		tmp = ((math.log(x) * (x + -0.5)) - x) + (0.91893853320467 + (1.0 / (x / 0.083333333333333)))
	else:
		tmp = (z * z) * ((0.0007936500793651 / x) + (1.0 / (x / y)))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -6e+105)
		tmp = Float64(Float64(z * Float64(Float64(Float64(y * Float64(z * Float64(1.0 + Float64(0.0007936500793651 * Float64(1.0 / y))))) / x) + Float64(0.0027777777777778 * Float64(-1.0 / x)))) + Float64(0.083333333333333 * Float64(1.0 / x)));
	elseif (z <= 4.5e-12)
		tmp = Float64(Float64(Float64(log(x) * Float64(x + -0.5)) - x) + Float64(0.91893853320467 + Float64(1.0 / Float64(x / 0.083333333333333))));
	else
		tmp = Float64(Float64(z * z) * Float64(Float64(0.0007936500793651 / x) + Float64(1.0 / Float64(x / y))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -6e+105)
		tmp = (z * (((y * (z * (1.0 + (0.0007936500793651 * (1.0 / y))))) / x) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x));
	elseif (z <= 4.5e-12)
		tmp = ((log(x) * (x + -0.5)) - x) + (0.91893853320467 + (1.0 / (x / 0.083333333333333)));
	else
		tmp = (z * z) * ((0.0007936500793651 / x) + (1.0 / (x / y)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -6e+105], N[(N[(z * N[(N[(N[(y * N[(z * N[(1.0 + N[(0.0007936500793651 * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e-12], N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + N[(0.91893853320467 + N[(1.0 / N[(x / 0.083333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * z), $MachinePrecision] * N[(N[(0.0007936500793651 / x), $MachinePrecision] + N[(1.0 / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+105}:\\
\;\;\;\;z \cdot \left(\frac{y \cdot \left(z \cdot \left(1 + 0.0007936500793651 \cdot \frac{1}{y}\right)\right)}{x} + 0.0027777777777778 \cdot \frac{-1}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\\

\mathbf{elif}\;z \leq 4.5 \cdot 10^{-12}:\\
\;\;\;\;\left(\log x \cdot \left(x + -0.5\right) - x\right) + \left(0.91893853320467 + \frac{1}{\frac{x}{0.083333333333333}}\right)\\

\mathbf{else}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \frac{1}{\frac{x}{y}}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.0000000000000001e105

    1. Initial program 88.8%

      \[\left(\left(\left(x - 0.5\right) \cdot \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. associate-+l+88.8%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(\left(\frac{0.083333333333333}{x \cdot y} + \left(0.91893853320467 \cdot \frac{1}{y} + \left(\frac{z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x \cdot y} + \left(\frac{\log x \cdot \left(x - 0.5\right)}{y} + \frac{{z}^{2}}{x}\right)\right)\right)\right) - \frac{x}{y}\right)} \]
    6. Taylor expanded in x around 0 46.7%

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

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

    if -6.0000000000000001e105 < z < 4.49999999999999981e-12

    1. Initial program 98.0%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Step-by-step derivation
      1. associate-+l+98.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right) + \color{blue}{\frac{1}{\frac{x}{0.083333333333333}}}\right) \]
      2. inv-pow92.4%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right) + \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}}\right) \]
    7. Applied egg-rr88.8%

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

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

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

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

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

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

    if 4.49999999999999981e-12 < z

    1. Initial program 93.4%

      \[\left(\left(\left(x - 0.5\right) \cdot \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. associate-+l+93.4%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
    6. Step-by-step derivation
      1. associate-*r/82.9%

        \[\leadsto {z}^{2} \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot 1}{x}} + \frac{y}{x}\right) \]
      2. metadata-eval82.9%

        \[\leadsto {z}^{2} \cdot \left(\frac{\color{blue}{0.0007936500793651}}{x} + \frac{y}{x}\right) \]
    7. Simplified82.9%

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)} \]
    8. Step-by-step derivation
      1. unpow282.9%

        \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \]
    9. Applied egg-rr82.9%

      \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \]
    10. Step-by-step derivation
      1. clear-num83.0%

        \[\leadsto \left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \color{blue}{\frac{1}{\frac{x}{y}}}\right) \]
      2. inv-pow83.0%

        \[\leadsto \left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \color{blue}{{\left(\frac{x}{y}\right)}^{-1}}\right) \]
    11. Applied egg-rr83.0%

      \[\leadsto \left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \color{blue}{{\left(\frac{x}{y}\right)}^{-1}}\right) \]
    12. Step-by-step derivation
      1. unpow-183.0%

        \[\leadsto \left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \color{blue}{\frac{1}{\frac{x}{y}}}\right) \]
    13. Simplified83.0%

      \[\leadsto \left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \color{blue}{\frac{1}{\frac{x}{y}}}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification87.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+105}:\\ \;\;\;\;z \cdot \left(\frac{y \cdot \left(z \cdot \left(1 + 0.0007936500793651 \cdot \frac{1}{y}\right)\right)}{x} + 0.0027777777777778 \cdot \frac{-1}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-12}:\\ \;\;\;\;\left(\log x \cdot \left(x + -0.5\right) - x\right) + \left(0.91893853320467 + \frac{1}{\frac{x}{0.083333333333333}}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \frac{1}{\frac{x}{y}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 81.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+106}:\\ \;\;\;\;z \cdot \left(\frac{y \cdot \left(z \cdot \left(1 + 0.0007936500793651 \cdot \frac{1}{y}\right)\right)}{x} + 0.0027777777777778 \cdot \frac{-1}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-11}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \frac{1}{\frac{x}{y}}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -1.15e+106)
   (+
    (*
     z
     (+
      (/ (* y (* z (+ 1.0 (* 0.0007936500793651 (/ 1.0 y))))) x)
      (* 0.0027777777777778 (/ -1.0 x))))
    (* 0.083333333333333 (/ 1.0 x)))
   (if (<= z 2.3e-11)
     (+
      (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
      (/ 0.083333333333333 x))
     (* (* z z) (+ (/ 0.0007936500793651 x) (/ 1.0 (/ x y)))))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -1.15e+106) {
		tmp = (z * (((y * (z * (1.0 + (0.0007936500793651 * (1.0 / y))))) / x) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x));
	} else if (z <= 2.3e-11) {
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
	} else {
		tmp = (z * z) * ((0.0007936500793651 / x) + (1.0 / (x / y)));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (z <= (-1.15d+106)) then
        tmp = (z * (((y * (z * (1.0d0 + (0.0007936500793651d0 * (1.0d0 / y))))) / x) + (0.0027777777777778d0 * ((-1.0d0) / x)))) + (0.083333333333333d0 * (1.0d0 / x))
    else if (z <= 2.3d-11) then
        tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (0.083333333333333d0 / x)
    else
        tmp = (z * z) * ((0.0007936500793651d0 / x) + (1.0d0 / (x / y)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -1.15e+106) {
		tmp = (z * (((y * (z * (1.0 + (0.0007936500793651 * (1.0 / y))))) / x) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x));
	} else if (z <= 2.3e-11) {
		tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
	} else {
		tmp = (z * z) * ((0.0007936500793651 / x) + (1.0 / (x / y)));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -1.15e+106:
		tmp = (z * (((y * (z * (1.0 + (0.0007936500793651 * (1.0 / y))))) / x) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x))
	elif z <= 2.3e-11:
		tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x)
	else:
		tmp = (z * z) * ((0.0007936500793651 / x) + (1.0 / (x / y)))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -1.15e+106)
		tmp = Float64(Float64(z * Float64(Float64(Float64(y * Float64(z * Float64(1.0 + Float64(0.0007936500793651 * Float64(1.0 / y))))) / x) + Float64(0.0027777777777778 * Float64(-1.0 / x)))) + Float64(0.083333333333333 * Float64(1.0 / x)));
	elseif (z <= 2.3e-11)
		tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(0.083333333333333 / x));
	else
		tmp = Float64(Float64(z * z) * Float64(Float64(0.0007936500793651 / x) + Float64(1.0 / Float64(x / y))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -1.15e+106)
		tmp = (z * (((y * (z * (1.0 + (0.0007936500793651 * (1.0 / y))))) / x) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x));
	elseif (z <= 2.3e-11)
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
	else
		tmp = (z * z) * ((0.0007936500793651 / x) + (1.0 / (x / y)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -1.15e+106], N[(N[(z * N[(N[(N[(y * N[(z * N[(1.0 + N[(0.0007936500793651 * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e-11], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(N[(z * z), $MachinePrecision] * N[(N[(0.0007936500793651 / x), $MachinePrecision] + N[(1.0 / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+106}:\\
\;\;\;\;z \cdot \left(\frac{y \cdot \left(z \cdot \left(1 + 0.0007936500793651 \cdot \frac{1}{y}\right)\right)}{x} + 0.0027777777777778 \cdot \frac{-1}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\\

\mathbf{elif}\;z \leq 2.3 \cdot 10^{-11}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\

\mathbf{else}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \frac{1}{\frac{x}{y}}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.1500000000000001e106

    1. Initial program 88.8%

      \[\left(\left(\left(x - 0.5\right) \cdot \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. associate-+l+88.8%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(\left(\frac{0.083333333333333}{x \cdot y} + \left(0.91893853320467 \cdot \frac{1}{y} + \left(\frac{z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x \cdot y} + \left(\frac{\log x \cdot \left(x - 0.5\right)}{y} + \frac{{z}^{2}}{x}\right)\right)\right)\right) - \frac{x}{y}\right)} \]
    6. Taylor expanded in x around 0 46.7%

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

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

    if -1.1500000000000001e106 < z < 2.30000000000000014e-11

    1. Initial program 98.0%

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

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

    if 2.30000000000000014e-11 < z

    1. Initial program 93.4%

      \[\left(\left(\left(x - 0.5\right) \cdot \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. associate-+l+93.4%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
    6. Step-by-step derivation
      1. associate-*r/82.9%

        \[\leadsto {z}^{2} \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot 1}{x}} + \frac{y}{x}\right) \]
      2. metadata-eval82.9%

        \[\leadsto {z}^{2} \cdot \left(\frac{\color{blue}{0.0007936500793651}}{x} + \frac{y}{x}\right) \]
    7. Simplified82.9%

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)} \]
    8. Step-by-step derivation
      1. unpow282.9%

        \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \]
    9. Applied egg-rr82.9%

      \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \]
    10. Step-by-step derivation
      1. clear-num83.0%

        \[\leadsto \left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \color{blue}{\frac{1}{\frac{x}{y}}}\right) \]
      2. inv-pow83.0%

        \[\leadsto \left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \color{blue}{{\left(\frac{x}{y}\right)}^{-1}}\right) \]
    11. Applied egg-rr83.0%

      \[\leadsto \left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \color{blue}{{\left(\frac{x}{y}\right)}^{-1}}\right) \]
    12. Step-by-step derivation
      1. unpow-183.0%

        \[\leadsto \left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \color{blue}{\frac{1}{\frac{x}{y}}}\right) \]
    13. Simplified83.0%

      \[\leadsto \left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \color{blue}{\frac{1}{\frac{x}{y}}}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification87.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+106}:\\ \;\;\;\;z \cdot \left(\frac{y \cdot \left(z \cdot \left(1 + 0.0007936500793651 \cdot \frac{1}{y}\right)\right)}{x} + 0.0027777777777778 \cdot \frac{-1}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-11}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \frac{1}{\frac{x}{y}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 93.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+
  (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
  (/
   (+
    0.083333333333333
    (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
   x)))
double code(double x, double y, double z) {
	return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x)
end function
public static double code(double x, double y, double z) {
	return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
}
def code(x, y, z):
	return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x)
function code(x, y, z)
	return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x))
end
function tmp = code(x, y, z)
	tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / 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[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

Alternative 7: 92.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+
  (* x (+ (log x) -1.0))
  (/
   (+
    0.083333333333333
    (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
   x)))
double code(double x, double y, double z) {
	return (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x)
end function
public static double code(double x, double y, double z) {
	return (x * (Math.log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
}
def code(x, y, z):
	return (x * (math.log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x)
function code(x, y, z)
	return Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x))
end
function tmp = code(x, y, z)
	tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
end
code[x_, y_, z_] := N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}
\end{array}
Derivation
  1. Initial program 95.2%

    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-sqr-sqrt94.6%

      \[\leadsto \left(\left(\color{blue}{\sqrt{\left(x - 0.5\right) \cdot \log x} \cdot \sqrt{\left(x - 0.5\right) \cdot \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. pow294.6%

      \[\leadsto \left(\left(\color{blue}{{\left(\sqrt{\left(x - 0.5\right) \cdot \log x}\right)}^{2}} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    3. sub-neg94.6%

      \[\leadsto \left(\left({\left(\sqrt{\color{blue}{\left(x + \left(-0.5\right)\right)} \cdot \log x}\right)}^{2} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    4. metadata-eval94.6%

      \[\leadsto \left(\left({\left(\sqrt{\left(x + \color{blue}{-0.5}\right) \cdot \log x}\right)}^{2} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    5. *-commutative94.6%

      \[\leadsto \left(\left({\left(\sqrt{\color{blue}{\log x \cdot \left(x + -0.5\right)}}\right)}^{2} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  4. Applied egg-rr94.6%

    \[\leadsto \left(\left(\color{blue}{{\left(\sqrt{\log x \cdot \left(x + -0.5\right)}\right)}^{2}} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  5. Taylor expanded in x around inf 94.7%

    \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  6. Step-by-step derivation
    1. sub-neg94.7%

      \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(-1\right)\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. mul-1-neg94.7%

      \[\leadsto x \cdot \left(\color{blue}{\left(-\log \left(\frac{1}{x}\right)\right)} + \left(-1\right)\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    3. log-rec94.7%

      \[\leadsto x \cdot \left(\left(-\color{blue}{\left(-\log x\right)}\right) + \left(-1\right)\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    4. remove-double-neg94.7%

      \[\leadsto x \cdot \left(\color{blue}{\log x} + \left(-1\right)\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    5. metadata-eval94.7%

      \[\leadsto x \cdot \left(\log x + \color{blue}{-1}\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  7. Simplified94.7%

    \[\leadsto \color{blue}{x \cdot \left(\log x + -1\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  8. Final simplification94.7%

    \[\leadsto x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} \]
  9. Add Preprocessing

Alternative 8: 82.2% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.46 \cdot 10^{+102}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(y \cdot \left(z \cdot \left(1 + 0.0007936500793651 \cdot \frac{1}{y}\right)\right) - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 1.46e+102)
   (/
    (+
     0.083333333333333
     (*
      z
      (-
       (* y (* z (+ 1.0 (* 0.0007936500793651 (/ 1.0 y)))))
       0.0027777777777778)))
    x)
   (* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= 1.46e+102) {
		tmp = (0.083333333333333 + (z * ((y * (z * (1.0 + (0.0007936500793651 * (1.0 / y))))) - 0.0027777777777778))) / x;
	} else {
		tmp = x * (log(x) + -1.0);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (x <= 1.46d+102) then
        tmp = (0.083333333333333d0 + (z * ((y * (z * (1.0d0 + (0.0007936500793651d0 * (1.0d0 / y))))) - 0.0027777777777778d0))) / x
    else
        tmp = x * (log(x) + (-1.0d0))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= 1.46e+102) {
		tmp = (0.083333333333333 + (z * ((y * (z * (1.0 + (0.0007936500793651 * (1.0 / y))))) - 0.0027777777777778))) / x;
	} else {
		tmp = x * (Math.log(x) + -1.0);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= 1.46e+102:
		tmp = (0.083333333333333 + (z * ((y * (z * (1.0 + (0.0007936500793651 * (1.0 / y))))) - 0.0027777777777778))) / x
	else:
		tmp = x * (math.log(x) + -1.0)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= 1.46e+102)
		tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(y * Float64(z * Float64(1.0 + Float64(0.0007936500793651 * Float64(1.0 / y))))) - 0.0027777777777778))) / x);
	else
		tmp = Float64(x * Float64(log(x) + -1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= 1.46e+102)
		tmp = (0.083333333333333 + (z * ((y * (z * (1.0 + (0.0007936500793651 * (1.0 / y))))) - 0.0027777777777778))) / x;
	else
		tmp = x * (log(x) + -1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, 1.46e+102], N[(N[(0.083333333333333 + N[(z * N[(N[(y * N[(z * N[(1.0 + N[(0.0007936500793651 * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.46 \cdot 10^{+102}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(y \cdot \left(z \cdot \left(1 + 0.0007936500793651 \cdot \frac{1}{y}\right)\right) - 0.0027777777777778\right)}{x}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right)\\


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

    1. Initial program 99.0%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Step-by-step derivation
      1. associate-+l+99.0%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(\left(\frac{0.083333333333333}{x \cdot y} + \left(0.91893853320467 \cdot \frac{1}{y} + \left(\frac{z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x \cdot y} + \left(\frac{\log x \cdot \left(x - 0.5\right)}{y} + \frac{{z}^{2}}{x}\right)\right)\right)\right) - \frac{x}{y}\right)} \]
    6. Taylor expanded in x around 0 73.1%

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

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

    if 1.4599999999999999e102 < x

    1. Initial program 88.0%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Step-by-step derivation
      1. associate-+l+88.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} \]
    7. Step-by-step derivation
      1. sub-neg82.4%

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(-1\right)\right)} \]
      2. mul-1-neg82.4%

        \[\leadsto x \cdot \left(\color{blue}{\left(-\log \left(\frac{1}{x}\right)\right)} + \left(-1\right)\right) \]
      3. log-rec82.4%

        \[\leadsto x \cdot \left(\left(-\color{blue}{\left(-\log x\right)}\right) + \left(-1\right)\right) \]
      4. remove-double-neg82.4%

        \[\leadsto x \cdot \left(\color{blue}{\log x} + \left(-1\right)\right) \]
      5. metadata-eval82.4%

        \[\leadsto x \cdot \left(\log x + \color{blue}{-1}\right) \]
    8. Simplified82.4%

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

Alternative 9: 59.9% accurate, 5.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6500:\\ \;\;\;\;\left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \cdot \left(z \cdot z\right)\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-25}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \frac{1}{\frac{x}{y}}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -6500.0)
   (* (+ (/ 0.0007936500793651 x) (/ y x)) (* z z))
   (if (<= z 2.4e-25)
     (/
      (+
       0.083333333333333
       (* z (- (* z 0.0007936500793651) 0.0027777777777778)))
      x)
     (* (* z z) (+ (/ 0.0007936500793651 x) (/ 1.0 (/ x y)))))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -6500.0) {
		tmp = ((0.0007936500793651 / x) + (y / x)) * (z * z);
	} else if (z <= 2.4e-25) {
		tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x;
	} else {
		tmp = (z * z) * ((0.0007936500793651 / x) + (1.0 / (x / y)));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (z <= (-6500.0d0)) then
        tmp = ((0.0007936500793651d0 / x) + (y / x)) * (z * z)
    else if (z <= 2.4d-25) then
        tmp = (0.083333333333333d0 + (z * ((z * 0.0007936500793651d0) - 0.0027777777777778d0))) / x
    else
        tmp = (z * z) * ((0.0007936500793651d0 / x) + (1.0d0 / (x / y)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -6500.0) {
		tmp = ((0.0007936500793651 / x) + (y / x)) * (z * z);
	} else if (z <= 2.4e-25) {
		tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x;
	} else {
		tmp = (z * z) * ((0.0007936500793651 / x) + (1.0 / (x / y)));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -6500.0:
		tmp = ((0.0007936500793651 / x) + (y / x)) * (z * z)
	elif z <= 2.4e-25:
		tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x
	else:
		tmp = (z * z) * ((0.0007936500793651 / x) + (1.0 / (x / y)))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -6500.0)
		tmp = Float64(Float64(Float64(0.0007936500793651 / x) + Float64(y / x)) * Float64(z * z));
	elseif (z <= 2.4e-25)
		tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * 0.0007936500793651) - 0.0027777777777778))) / x);
	else
		tmp = Float64(Float64(z * z) * Float64(Float64(0.0007936500793651 / x) + Float64(1.0 / Float64(x / y))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -6500.0)
		tmp = ((0.0007936500793651 / x) + (y / x)) * (z * z);
	elseif (z <= 2.4e-25)
		tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x;
	else
		tmp = (z * z) * ((0.0007936500793651 / x) + (1.0 / (x / y)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -6500.0], N[(N[(N[(0.0007936500793651 / x), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e-25], N[(N[(0.083333333333333 + N[(z * N[(N[(z * 0.0007936500793651), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(z * z), $MachinePrecision] * N[(N[(0.0007936500793651 / x), $MachinePrecision] + N[(1.0 / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6500:\\
\;\;\;\;\left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \cdot \left(z \cdot z\right)\\

\mathbf{elif}\;z \leq 2.4 \cdot 10^{-25}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x}\\

\mathbf{else}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \frac{1}{\frac{x}{y}}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6500

    1. Initial program 88.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. associate-+l+88.9%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
    6. Step-by-step derivation
      1. associate-*r/78.1%

        \[\leadsto {z}^{2} \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot 1}{x}} + \frac{y}{x}\right) \]
      2. metadata-eval78.1%

        \[\leadsto {z}^{2} \cdot \left(\frac{\color{blue}{0.0007936500793651}}{x} + \frac{y}{x}\right) \]
    7. Simplified78.1%

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)} \]
    8. Step-by-step derivation
      1. unpow278.1%

        \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \]
    9. Applied egg-rr78.1%

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

    if -6500 < z < 2.40000000000000009e-25

    1. Initial program 99.3%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Step-by-step derivation
      1. associate-+l+99.3%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(\left(\frac{0.083333333333333}{x \cdot y} + \left(0.91893853320467 \cdot \frac{1}{y} + \left(\frac{z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x \cdot y} + \left(\frac{\log x \cdot \left(x - 0.5\right)}{y} + \frac{{z}^{2}}{x}\right)\right)\right)\right) - \frac{x}{y}\right)} \]
    6. Taylor expanded in x around 0 46.7%

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

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

    if 2.40000000000000009e-25 < z

    1. Initial program 93.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Step-by-step derivation
      1. associate-+l+93.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
    6. Step-by-step derivation
      1. associate-*r/79.1%

        \[\leadsto {z}^{2} \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot 1}{x}} + \frac{y}{x}\right) \]
      2. metadata-eval79.1%

        \[\leadsto {z}^{2} \cdot \left(\frac{\color{blue}{0.0007936500793651}}{x} + \frac{y}{x}\right) \]
    7. Simplified79.1%

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)} \]
    8. Step-by-step derivation
      1. unpow279.1%

        \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \]
    9. Applied egg-rr79.1%

      \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \]
    10. Step-by-step derivation
      1. clear-num79.1%

        \[\leadsto \left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \color{blue}{\frac{1}{\frac{x}{y}}}\right) \]
      2. inv-pow79.1%

        \[\leadsto \left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \color{blue}{{\left(\frac{x}{y}\right)}^{-1}}\right) \]
    11. Applied egg-rr79.1%

      \[\leadsto \left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \color{blue}{{\left(\frac{x}{y}\right)}^{-1}}\right) \]
    12. Step-by-step derivation
      1. unpow-179.1%

        \[\leadsto \left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \color{blue}{\frac{1}{\frac{x}{y}}}\right) \]
    13. Simplified79.1%

      \[\leadsto \left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \color{blue}{\frac{1}{\frac{x}{y}}}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification61.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6500:\\ \;\;\;\;\left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \cdot \left(z \cdot z\right)\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-25}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \frac{1}{\frac{x}{y}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 47.2% accurate, 5.6× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{y}{x} \cdot \left(z \cdot z\right)\\
\mathbf{if}\;z \leq -6500:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;z \leq 8.6:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\

\mathbf{elif}\;z \leq 1.22 \cdot 10^{+82}:\\
\;\;\;\;\frac{0.0007936500793651}{x} \cdot \left(z \cdot z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6500 or 1.22000000000000008e82 < z

    1. Initial program 89.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. associate-+l+89.9%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
    6. Step-by-step derivation
      1. associate-*r/80.7%

        \[\leadsto {z}^{2} \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot 1}{x}} + \frac{y}{x}\right) \]
      2. metadata-eval80.7%

        \[\leadsto {z}^{2} \cdot \left(\frac{\color{blue}{0.0007936500793651}}{x} + \frac{y}{x}\right) \]
    7. Simplified80.7%

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)} \]
    8. Step-by-step derivation
      1. unpow280.7%

        \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \]
    9. Applied egg-rr80.7%

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

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

    if -6500 < z < 8.59999999999999964

    1. Initial program 99.3%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Step-by-step derivation
      1. associate-+l+99.3%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(\left(\frac{0.083333333333333}{x \cdot y} + \left(0.91893853320467 \cdot \frac{1}{y} + \left(\frac{z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x \cdot y} + \left(\frac{\log x \cdot \left(x - 0.5\right)}{y} + \frac{{z}^{2}}{x}\right)\right)\right)\right) - \frac{x}{y}\right)} \]
    6. Taylor expanded in x around 0 46.8%

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

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

    if 8.59999999999999964 < z < 1.22000000000000008e82

    1. Initial program 99.5%

      \[\left(\left(\left(x - 0.5\right) \cdot \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. associate-+l+99.5%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
    6. Step-by-step derivation
      1. associate-*r/78.4%

        \[\leadsto {z}^{2} \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot 1}{x}} + \frac{y}{x}\right) \]
      2. metadata-eval78.4%

        \[\leadsto {z}^{2} \cdot \left(\frac{\color{blue}{0.0007936500793651}}{x} + \frac{y}{x}\right) \]
    7. Simplified78.4%

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)} \]
    8. Step-by-step derivation
      1. unpow278.4%

        \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \]
    9. Applied egg-rr78.4%

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

      \[\leadsto \left(z \cdot z\right) \cdot \color{blue}{\frac{0.0007936500793651}{x}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification53.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6500:\\ \;\;\;\;\frac{y}{x} \cdot \left(z \cdot z\right)\\ \mathbf{elif}\;z \leq 8.6:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\ \mathbf{elif}\;z \leq 1.22 \cdot 10^{+82}:\\ \;\;\;\;\frac{0.0007936500793651}{x} \cdot \left(z \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{x} \cdot \left(z \cdot z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 47.2% accurate, 5.6× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{y}{x} \cdot \left(z \cdot z\right)\\
\mathbf{if}\;z \leq -6500:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;z \leq 10:\\
\;\;\;\;\frac{1}{\frac{x}{0.083333333333333}}\\

\mathbf{elif}\;z \leq 2.7 \cdot 10^{+68}:\\
\;\;\;\;\frac{0.0007936500793651}{x} \cdot \left(z \cdot z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6500 or 2.69999999999999991e68 < z

    1. Initial program 89.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. associate-+l+89.9%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
    6. Step-by-step derivation
      1. associate-*r/80.7%

        \[\leadsto {z}^{2} \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot 1}{x}} + \frac{y}{x}\right) \]
      2. metadata-eval80.7%

        \[\leadsto {z}^{2} \cdot \left(\frac{\color{blue}{0.0007936500793651}}{x} + \frac{y}{x}\right) \]
    7. Simplified80.7%

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)} \]
    8. Step-by-step derivation
      1. unpow280.7%

        \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \]
    9. Applied egg-rr80.7%

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

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

    if -6500 < z < 10

    1. Initial program 99.3%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Step-by-step derivation
      1. associate-+l+99.3%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{0.083333333333333 + x \cdot \left(0.91893853320467 + -0.5 \cdot \log x\right)}{x}} \]
    7. Taylor expanded in x around 0 41.4%

      \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
    8. Step-by-step derivation
      1. clear-num91.4%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right) + \color{blue}{\frac{1}{\frac{x}{0.083333333333333}}}\right) \]
      2. inv-pow91.4%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right) + \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}}\right) \]
    9. Applied egg-rr41.4%

      \[\leadsto \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}} \]
    10. Step-by-step derivation
      1. unpow-191.4%

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

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

    if 10 < z < 2.69999999999999991e68

    1. Initial program 99.5%

      \[\left(\left(\left(x - 0.5\right) \cdot \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. associate-+l+99.5%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
    6. Step-by-step derivation
      1. associate-*r/78.4%

        \[\leadsto {z}^{2} \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot 1}{x}} + \frac{y}{x}\right) \]
      2. metadata-eval78.4%

        \[\leadsto {z}^{2} \cdot \left(\frac{\color{blue}{0.0007936500793651}}{x} + \frac{y}{x}\right) \]
    7. Simplified78.4%

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)} \]
    8. Step-by-step derivation
      1. unpow278.4%

        \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \]
    9. Applied egg-rr78.4%

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

      \[\leadsto \left(z \cdot z\right) \cdot \color{blue}{\frac{0.0007936500793651}{x}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification53.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6500:\\ \;\;\;\;\frac{y}{x} \cdot \left(z \cdot z\right)\\ \mathbf{elif}\;z \leq 10:\\ \;\;\;\;\frac{1}{\frac{x}{0.083333333333333}}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{+68}:\\ \;\;\;\;\frac{0.0007936500793651}{x} \cdot \left(z \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{x} \cdot \left(z \cdot z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 59.8% accurate, 5.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6500:\\ \;\;\;\;\left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \cdot \left(z \cdot z\right)\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-26}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot z\right) \cdot \frac{0.0007936500793651 + y}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -6500.0)
   (* (+ (/ 0.0007936500793651 x) (/ y x)) (* z z))
   (if (<= z 9.5e-26)
     (/
      (+
       0.083333333333333
       (* z (- (* z 0.0007936500793651) 0.0027777777777778)))
      x)
     (* (* z z) (/ (+ 0.0007936500793651 y) x)))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -6500.0) {
		tmp = ((0.0007936500793651 / x) + (y / x)) * (z * z);
	} else if (z <= 9.5e-26) {
		tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x;
	} else {
		tmp = (z * z) * ((0.0007936500793651 + y) / x);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (z <= (-6500.0d0)) then
        tmp = ((0.0007936500793651d0 / x) + (y / x)) * (z * z)
    else if (z <= 9.5d-26) then
        tmp = (0.083333333333333d0 + (z * ((z * 0.0007936500793651d0) - 0.0027777777777778d0))) / x
    else
        tmp = (z * z) * ((0.0007936500793651d0 + y) / x)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -6500.0) {
		tmp = ((0.0007936500793651 / x) + (y / x)) * (z * z);
	} else if (z <= 9.5e-26) {
		tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x;
	} else {
		tmp = (z * z) * ((0.0007936500793651 + y) / x);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -6500.0:
		tmp = ((0.0007936500793651 / x) + (y / x)) * (z * z)
	elif z <= 9.5e-26:
		tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x
	else:
		tmp = (z * z) * ((0.0007936500793651 + y) / x)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -6500.0)
		tmp = Float64(Float64(Float64(0.0007936500793651 / x) + Float64(y / x)) * Float64(z * z));
	elseif (z <= 9.5e-26)
		tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * 0.0007936500793651) - 0.0027777777777778))) / x);
	else
		tmp = Float64(Float64(z * z) * Float64(Float64(0.0007936500793651 + y) / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -6500.0)
		tmp = ((0.0007936500793651 / x) + (y / x)) * (z * z);
	elseif (z <= 9.5e-26)
		tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x;
	else
		tmp = (z * z) * ((0.0007936500793651 + y) / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -6500.0], N[(N[(N[(0.0007936500793651 / x), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e-26], N[(N[(0.083333333333333 + N[(z * N[(N[(z * 0.0007936500793651), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(z * z), $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6500:\\
\;\;\;\;\left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \cdot \left(z \cdot z\right)\\

\mathbf{elif}\;z \leq 9.5 \cdot 10^{-26}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x}\\

\mathbf{else}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{0.0007936500793651 + y}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6500

    1. Initial program 88.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. associate-+l+88.9%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
    6. Step-by-step derivation
      1. associate-*r/78.1%

        \[\leadsto {z}^{2} \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot 1}{x}} + \frac{y}{x}\right) \]
      2. metadata-eval78.1%

        \[\leadsto {z}^{2} \cdot \left(\frac{\color{blue}{0.0007936500793651}}{x} + \frac{y}{x}\right) \]
    7. Simplified78.1%

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)} \]
    8. Step-by-step derivation
      1. unpow278.1%

        \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \]
    9. Applied egg-rr78.1%

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

    if -6500 < z < 9.4999999999999995e-26

    1. Initial program 99.3%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Step-by-step derivation
      1. associate-+l+99.3%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(\left(\frac{0.083333333333333}{x \cdot y} + \left(0.91893853320467 \cdot \frac{1}{y} + \left(\frac{z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x \cdot y} + \left(\frac{\log x \cdot \left(x - 0.5\right)}{y} + \frac{{z}^{2}}{x}\right)\right)\right)\right) - \frac{x}{y}\right)} \]
    6. Taylor expanded in x around 0 46.7%

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

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

    if 9.4999999999999995e-26 < z

    1. Initial program 93.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Step-by-step derivation
      1. associate-+l+93.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
    6. Step-by-step derivation
      1. associate-*r/79.1%

        \[\leadsto {z}^{2} \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot 1}{x}} + \frac{y}{x}\right) \]
      2. metadata-eval79.1%

        \[\leadsto {z}^{2} \cdot \left(\frac{\color{blue}{0.0007936500793651}}{x} + \frac{y}{x}\right) \]
    7. Simplified79.1%

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)} \]
    8. Step-by-step derivation
      1. unpow279.1%

        \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \]
    9. Applied egg-rr79.1%

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

      \[\leadsto \left(z \cdot z\right) \cdot \color{blue}{\frac{0.0007936500793651 + y}{x}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification61.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6500:\\ \;\;\;\;\left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \cdot \left(z \cdot z\right)\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-26}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot z\right) \cdot \frac{0.0007936500793651 + y}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 59.8% accurate, 6.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.216 \lor \neg \left(z \leq 10^{-26}\right):\\ \;\;\;\;\left(z \cdot z\right) \cdot \frac{0.0007936500793651 + y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -0.216) (not (<= z 1e-26)))
   (* (* z z) (/ (+ 0.0007936500793651 y) x))
   (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x)))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -0.216) || !(z <= 1e-26)) {
		tmp = (z * z) * ((0.0007936500793651 + y) / x);
	} else {
		tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((z <= (-0.216d0)) .or. (.not. (z <= 1d-26))) then
        tmp = (z * z) * ((0.0007936500793651d0 + y) / x)
    else
        tmp = (0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -0.216) || !(z <= 1e-26)) {
		tmp = (z * z) * ((0.0007936500793651 + y) / x);
	} else {
		tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (z <= -0.216) or not (z <= 1e-26):
		tmp = (z * z) * ((0.0007936500793651 + y) / x)
	else:
		tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((z <= -0.216) || !(z <= 1e-26))
		tmp = Float64(Float64(z * z) * Float64(Float64(0.0007936500793651 + y) / x));
	else
		tmp = Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((z <= -0.216) || ~((z <= 1e-26)))
		tmp = (z * z) * ((0.0007936500793651 + y) / x);
	else
		tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.216], N[Not[LessEqual[z, 1e-26]], $MachinePrecision]], N[(N[(z * z), $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.216 \lor \neg \left(z \leq 10^{-26}\right):\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{0.0007936500793651 + y}{x}\\

\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.215999999999999998 or 1e-26 < z

    1. Initial program 91.3%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Step-by-step derivation
      1. associate-+l+91.3%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
    6. Step-by-step derivation
      1. associate-*r/77.7%

        \[\leadsto {z}^{2} \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot 1}{x}} + \frac{y}{x}\right) \]
      2. metadata-eval77.7%

        \[\leadsto {z}^{2} \cdot \left(\frac{\color{blue}{0.0007936500793651}}{x} + \frac{y}{x}\right) \]
    7. Simplified77.7%

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)} \]
    8. Step-by-step derivation
      1. unpow277.7%

        \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \]
    9. Applied egg-rr77.7%

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

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

    if -0.215999999999999998 < z < 1e-26

    1. Initial program 99.3%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Step-by-step derivation
      1. associate-+l+99.3%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(\left(\frac{0.083333333333333}{x \cdot y} + \left(0.91893853320467 \cdot \frac{1}{y} + \left(\frac{z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x \cdot y} + \left(\frac{\log x \cdot \left(x - 0.5\right)}{y} + \frac{{z}^{2}}{x}\right)\right)\right)\right) - \frac{x}{y}\right)} \]
    6. Taylor expanded in x around 0 46.6%

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

      \[\leadsto \frac{\color{blue}{0.083333333333333 + -0.0027777777777778 \cdot z}}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification61.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.216 \lor \neg \left(z \leq 10^{-26}\right):\\ \;\;\;\;\left(z \cdot z\right) \cdot \frac{0.0007936500793651 + y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 59.8% accurate, 6.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.216:\\ \;\;\;\;\left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \cdot \left(z \cdot z\right)\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-25}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot z\right) \cdot \frac{0.0007936500793651 + y}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -0.216)
   (* (+ (/ 0.0007936500793651 x) (/ y x)) (* z z))
   (if (<= z 1.35e-25)
     (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x)
     (* (* z z) (/ (+ 0.0007936500793651 y) x)))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -0.216) {
		tmp = ((0.0007936500793651 / x) + (y / x)) * (z * z);
	} else if (z <= 1.35e-25) {
		tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
	} else {
		tmp = (z * z) * ((0.0007936500793651 + y) / x);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (z <= (-0.216d0)) then
        tmp = ((0.0007936500793651d0 / x) + (y / x)) * (z * z)
    else if (z <= 1.35d-25) then
        tmp = (0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x
    else
        tmp = (z * z) * ((0.0007936500793651d0 + y) / x)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -0.216) {
		tmp = ((0.0007936500793651 / x) + (y / x)) * (z * z);
	} else if (z <= 1.35e-25) {
		tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
	} else {
		tmp = (z * z) * ((0.0007936500793651 + y) / x);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -0.216:
		tmp = ((0.0007936500793651 / x) + (y / x)) * (z * z)
	elif z <= 1.35e-25:
		tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x
	else:
		tmp = (z * z) * ((0.0007936500793651 + y) / x)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -0.216)
		tmp = Float64(Float64(Float64(0.0007936500793651 / x) + Float64(y / x)) * Float64(z * z));
	elseif (z <= 1.35e-25)
		tmp = Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x);
	else
		tmp = Float64(Float64(z * z) * Float64(Float64(0.0007936500793651 + y) / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -0.216)
		tmp = ((0.0007936500793651 / x) + (y / x)) * (z * z);
	elseif (z <= 1.35e-25)
		tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
	else
		tmp = (z * z) * ((0.0007936500793651 + y) / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -0.216], N[(N[(N[(0.0007936500793651 / x), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e-25], N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(z * z), $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.216:\\
\;\;\;\;\left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \cdot \left(z \cdot z\right)\\

\mathbf{elif}\;z \leq 1.35 \cdot 10^{-25}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\

\mathbf{else}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{0.0007936500793651 + y}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -0.215999999999999998

    1. Initial program 89.2%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Step-by-step derivation
      1. associate-+l+89.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
    6. Step-by-step derivation
      1. associate-*r/76.6%

        \[\leadsto {z}^{2} \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot 1}{x}} + \frac{y}{x}\right) \]
      2. metadata-eval76.6%

        \[\leadsto {z}^{2} \cdot \left(\frac{\color{blue}{0.0007936500793651}}{x} + \frac{y}{x}\right) \]
    7. Simplified76.6%

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)} \]
    8. Step-by-step derivation
      1. unpow276.6%

        \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \]
    9. Applied egg-rr76.6%

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

    if -0.215999999999999998 < z < 1.35000000000000008e-25

    1. Initial program 99.3%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Step-by-step derivation
      1. associate-+l+99.3%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(\left(\frac{0.083333333333333}{x \cdot y} + \left(0.91893853320467 \cdot \frac{1}{y} + \left(\frac{z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x \cdot y} + \left(\frac{\log x \cdot \left(x - 0.5\right)}{y} + \frac{{z}^{2}}{x}\right)\right)\right)\right) - \frac{x}{y}\right)} \]
    6. Taylor expanded in x around 0 46.6%

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

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

    if 1.35000000000000008e-25 < z

    1. Initial program 93.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Step-by-step derivation
      1. associate-+l+93.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
    6. Step-by-step derivation
      1. associate-*r/79.1%

        \[\leadsto {z}^{2} \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot 1}{x}} + \frac{y}{x}\right) \]
      2. metadata-eval79.1%

        \[\leadsto {z}^{2} \cdot \left(\frac{\color{blue}{0.0007936500793651}}{x} + \frac{y}{x}\right) \]
    7. Simplified79.1%

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)} \]
    8. Step-by-step derivation
      1. unpow279.1%

        \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \]
    9. Applied egg-rr79.1%

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

      \[\leadsto \left(z \cdot z\right) \cdot \color{blue}{\frac{0.0007936500793651 + y}{x}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification61.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.216:\\ \;\;\;\;\left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \cdot \left(z \cdot z\right)\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-25}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot z\right) \cdot \frac{0.0007936500793651 + y}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 61.8% accurate, 6.5× speedup?

\[\begin{array}{l} \\ \frac{0.083333333333333 + z \cdot \left(y \cdot \left(z \cdot \left(1 + 0.0007936500793651 \cdot \frac{1}{y}\right)\right) - 0.0027777777777778\right)}{x} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (/
  (+
   0.083333333333333
   (*
    z
    (-
     (* y (* z (+ 1.0 (* 0.0007936500793651 (/ 1.0 y)))))
     0.0027777777777778)))
  x))
double code(double x, double y, double z) {
	return (0.083333333333333 + (z * ((y * (z * (1.0 + (0.0007936500793651 * (1.0 / y))))) - 0.0027777777777778))) / x;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (0.083333333333333d0 + (z * ((y * (z * (1.0d0 + (0.0007936500793651d0 * (1.0d0 / y))))) - 0.0027777777777778d0))) / x
end function
public static double code(double x, double y, double z) {
	return (0.083333333333333 + (z * ((y * (z * (1.0 + (0.0007936500793651 * (1.0 / y))))) - 0.0027777777777778))) / x;
}
def code(x, y, z):
	return (0.083333333333333 + (z * ((y * (z * (1.0 + (0.0007936500793651 * (1.0 / y))))) - 0.0027777777777778))) / x
function code(x, y, z)
	return Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(y * Float64(z * Float64(1.0 + Float64(0.0007936500793651 * Float64(1.0 / y))))) - 0.0027777777777778))) / x)
end
function tmp = code(x, y, z)
	tmp = (0.083333333333333 + (z * ((y * (z * (1.0 + (0.0007936500793651 * (1.0 / y))))) - 0.0027777777777778))) / x;
end
code[x_, y_, z_] := N[(N[(0.083333333333333 + N[(z * N[(N[(y * N[(z * N[(1.0 + N[(0.0007936500793651 * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
\begin{array}{l}

\\
\frac{0.083333333333333 + z \cdot \left(y \cdot \left(z \cdot \left(1 + 0.0007936500793651 \cdot \frac{1}{y}\right)\right) - 0.0027777777777778\right)}{x}
\end{array}
Derivation
  1. Initial program 95.2%

    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  2. Step-by-step derivation
    1. associate-+l+95.2%

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{y \cdot \left(\left(\frac{0.083333333333333}{x \cdot y} + \left(0.91893853320467 \cdot \frac{1}{y} + \left(\frac{z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x \cdot y} + \left(\frac{\log x \cdot \left(x - 0.5\right)}{y} + \frac{{z}^{2}}{x}\right)\right)\right)\right) - \frac{x}{y}\right)} \]
  6. Taylor expanded in x around 0 51.0%

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

    \[\leadsto \frac{\color{blue}{0.083333333333333 + z \cdot \left(y \cdot \left(z \cdot \left(1 + 0.0007936500793651 \cdot \frac{1}{y}\right)\right) - 0.0027777777777778\right)}}{x} \]
  8. Add Preprocessing

Alternative 16: 46.6% accurate, 7.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -10.5 \lor \neg \left(z \leq 10\right):\\ \;\;\;\;\frac{0.0007936500793651}{x} \cdot \left(z \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{x}{0.083333333333333}}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -10.5) (not (<= z 10.0)))
   (* (/ 0.0007936500793651 x) (* z z))
   (/ 1.0 (/ x 0.083333333333333))))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -10.5) || !(z <= 10.0)) {
		tmp = (0.0007936500793651 / x) * (z * z);
	} else {
		tmp = 1.0 / (x / 0.083333333333333);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((z <= (-10.5d0)) .or. (.not. (z <= 10.0d0))) then
        tmp = (0.0007936500793651d0 / x) * (z * z)
    else
        tmp = 1.0d0 / (x / 0.083333333333333d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -10.5) || !(z <= 10.0)) {
		tmp = (0.0007936500793651 / x) * (z * z);
	} else {
		tmp = 1.0 / (x / 0.083333333333333);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (z <= -10.5) or not (z <= 10.0):
		tmp = (0.0007936500793651 / x) * (z * z)
	else:
		tmp = 1.0 / (x / 0.083333333333333)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((z <= -10.5) || !(z <= 10.0))
		tmp = Float64(Float64(0.0007936500793651 / x) * Float64(z * z));
	else
		tmp = Float64(1.0 / Float64(x / 0.083333333333333));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((z <= -10.5) || ~((z <= 10.0)))
		tmp = (0.0007936500793651 / x) * (z * z);
	else
		tmp = 1.0 / (x / 0.083333333333333);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[z, -10.5], N[Not[LessEqual[z, 10.0]], $MachinePrecision]], N[(N[(0.0007936500793651 / x), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(x / 0.083333333333333), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -10.5 \lor \neg \left(z \leq 10\right):\\
\;\;\;\;\frac{0.0007936500793651}{x} \cdot \left(z \cdot z\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{x}{0.083333333333333}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -10.5 or 10 < z

    1. Initial program 90.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. associate-+l+90.9%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
    6. Step-by-step derivation
      1. associate-*r/79.5%

        \[\leadsto {z}^{2} \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot 1}{x}} + \frac{y}{x}\right) \]
      2. metadata-eval79.5%

        \[\leadsto {z}^{2} \cdot \left(\frac{\color{blue}{0.0007936500793651}}{x} + \frac{y}{x}\right) \]
    7. Simplified79.5%

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)} \]
    8. Step-by-step derivation
      1. unpow279.5%

        \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \]
    9. Applied egg-rr79.5%

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

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

    if -10.5 < z < 10

    1. Initial program 99.3%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Step-by-step derivation
      1. associate-+l+99.3%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{0.083333333333333 + x \cdot \left(0.91893853320467 + -0.5 \cdot \log x\right)}{x}} \]
    7. Taylor expanded in x around 0 41.9%

      \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
    8. Step-by-step derivation
      1. clear-num91.3%

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right) + \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}}\right) \]
    9. Applied egg-rr41.9%

      \[\leadsto \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}} \]
    10. Step-by-step derivation
      1. unpow-191.3%

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

      \[\leadsto \color{blue}{\frac{1}{\frac{x}{0.083333333333333}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification45.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -10.5 \lor \neg \left(z \leq 10\right):\\ \;\;\;\;\frac{0.0007936500793651}{x} \cdot \left(z \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{x}{0.083333333333333}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 23.5% accurate, 24.6× speedup?

\[\begin{array}{l} \\ \frac{1}{\frac{x}{0.083333333333333}} \end{array} \]
(FPCore (x y z) :precision binary64 (/ 1.0 (/ x 0.083333333333333)))
double code(double x, double y, double z) {
	return 1.0 / (x / 0.083333333333333);
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = 1.0d0 / (x / 0.083333333333333d0)
end function
public static double code(double x, double y, double z) {
	return 1.0 / (x / 0.083333333333333);
}
def code(x, y, z):
	return 1.0 / (x / 0.083333333333333)
function code(x, y, z)
	return Float64(1.0 / Float64(x / 0.083333333333333))
end
function tmp = code(x, y, z)
	tmp = 1.0 / (x / 0.083333333333333);
end
code[x_, y_, z_] := N[(1.0 / N[(x / 0.083333333333333), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{1}{\frac{x}{0.083333333333333}}
\end{array}
Derivation
  1. Initial program 95.2%

    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  2. Step-by-step derivation
    1. associate-+l+95.2%

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{0.083333333333333 + x \cdot \left(0.91893853320467 + -0.5 \cdot \log x\right)}{x}} \]
  7. Taylor expanded in x around 0 22.9%

    \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
  8. Step-by-step derivation
    1. clear-num95.5%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right) + \color{blue}{\frac{1}{\frac{x}{0.083333333333333}}}\right) \]
    2. inv-pow95.5%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right) + \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}}\right) \]
  9. Applied egg-rr22.9%

    \[\leadsto \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}} \]
  10. Step-by-step derivation
    1. unpow-195.5%

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

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

Alternative 18: 23.5% accurate, 41.0× 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;
}
real(8) function code(x, y, z)
    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 95.2%

    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  2. Step-by-step derivation
    1. associate-+l+95.2%

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{0.083333333333333 + x \cdot \left(0.91893853320467 + -0.5 \cdot \log x\right)}{x}} \]
  7. Taylor expanded in x around 0 22.9%

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

Developer Target 1: 98.5% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2024116 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
  :precision binary64

  :alt
  (! :herbie-platform default (+ (+ (+ (* (- x 1/2) (log x)) (- 91893853320467/100000000000000 x)) (/ 83333333333333/1000000000000000 x)) (* (/ z x) (- (* z (+ y 7936500793651/10000000000000000)) 13888888888889/5000000000000000))))

  (+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ (+ (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z) 0.083333333333333) x)))