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

Percentage Accurate: 93.6% → 99.5%
Time: 16.2s
Alternatives: 20
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 20 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.6% 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 8 \cdot 10^{-47}:\\ \;\;\;\;t\_0 + \left(\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right) \cdot \frac{z}{x} + 0.083333333333333 \cdot \frac{1}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0 + \left(z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right) + \sqrt{\frac{0.0069444444444443885}{{x}^{2}}}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)))
   (if (<= x 8e-47)
     (+
      t_0
      (+
       (* (fma z (+ 0.0007936500793651 y) -0.0027777777777778) (/ z x))
       (* 0.083333333333333 (/ 1.0 x))))
     (+
      t_0
      (+
       (*
        z
        (+
         (* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))
         (* 0.0027777777777778 (/ -1.0 x))))
       (sqrt (/ 0.0069444444444443885 (pow x 2.0))))))))
double code(double x, double y, double z) {
	double t_0 = (((x - 0.5) * log(x)) - x) + 0.91893853320467;
	double tmp;
	if (x <= 8e-47) {
		tmp = t_0 + ((fma(z, (0.0007936500793651 + y), -0.0027777777777778) * (z / x)) + (0.083333333333333 * (1.0 / x)));
	} else {
		tmp = t_0 + ((z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + sqrt((0.0069444444444443885 / pow(x, 2.0))));
	}
	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 <= 8e-47)
		tmp = Float64(t_0 + Float64(Float64(fma(z, Float64(0.0007936500793651 + y), -0.0027777777777778) * Float64(z / x)) + Float64(0.083333333333333 * Float64(1.0 / x))));
	else
		tmp = Float64(t_0 + Float64(Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 * Float64(1.0 / x)) + Float64(y / x))) + Float64(0.0027777777777778 * Float64(-1.0 / x)))) + sqrt(Float64(0.0069444444444443885 / (x ^ 2.0)))));
	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, 8e-47], N[(t$95$0 + N[(N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(z * N[(N[(z * N[(N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[(0.0069444444444443885 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]], $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 8 \cdot 10^{-47}:\\
\;\;\;\;t\_0 + \left(\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right) \cdot \frac{z}{x} + 0.083333333333333 \cdot \frac{1}{x}\right)\\

\mathbf{else}:\\
\;\;\;\;t\_0 + \left(z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right) + \sqrt{\frac{0.0069444444444443885}{{x}^{2}}}\right)\\


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

    1. Initial program 99.6%

      \[\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 91.4%

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

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

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

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

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

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

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

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

    if 7.9999999999999998e-47 < x

    1. Initial program 89.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.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(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. 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(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) - 0.0027777777777778 \cdot \frac{1}{x}\right) + \color{blue}{\frac{0.083333333333333}{x}}\right) \]
      2. add-sqr-sqrt99.6%

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) - 0.0027777777777778 \cdot \frac{1}{x}\right) + \sqrt{\color{blue}{\frac{0.083333333333333 \cdot 0.083333333333333}{x \cdot x}}}\right) \]
      5. 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(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) - 0.0027777777777778 \cdot \frac{1}{x}\right) + \sqrt{\frac{\color{blue}{0.0069444444444443885}}{x \cdot x}}\right) \]
      6. pow299.6%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) - 0.0027777777777778 \cdot \frac{1}{x}\right) + \sqrt{\frac{0.0069444444444443885}{\color{blue}{{x}^{2}}}}\right) \]
    5. 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(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) - 0.0027777777777778 \cdot \frac{1}{x}\right) + \color{blue}{\sqrt{\frac{0.0069444444444443885}{{x}^{2}}}}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.6%

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

Alternative 2: 99.5% accurate, 0.5× 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 8 \cdot 10^{-47}:\\ \;\;\;\;t\_0 + \left(\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right) \cdot \frac{z}{x} + 0.083333333333333 \cdot \frac{1}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0 + \left(z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right) + \frac{1}{\frac{x}{0.083333333333333}}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)))
   (if (<= x 8e-47)
     (+
      t_0
      (+
       (* (fma z (+ 0.0007936500793651 y) -0.0027777777777778) (/ z x))
       (* 0.083333333333333 (/ 1.0 x))))
     (+
      t_0
      (+
       (*
        z
        (+
         (* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))
         (* 0.0027777777777778 (/ -1.0 x))))
       (/ 1.0 (/ x 0.083333333333333)))))))
double code(double x, double y, double z) {
	double t_0 = (((x - 0.5) * log(x)) - x) + 0.91893853320467;
	double tmp;
	if (x <= 8e-47) {
		tmp = t_0 + ((fma(z, (0.0007936500793651 + y), -0.0027777777777778) * (z / x)) + (0.083333333333333 * (1.0 / x)));
	} else {
		tmp = t_0 + ((z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (1.0 / (x / 0.083333333333333)));
	}
	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 <= 8e-47)
		tmp = Float64(t_0 + Float64(Float64(fma(z, Float64(0.0007936500793651 + y), -0.0027777777777778) * Float64(z / x)) + Float64(0.083333333333333 * Float64(1.0 / x))));
	else
		tmp = Float64(t_0 + Float64(Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 * Float64(1.0 / x)) + Float64(y / x))) + Float64(0.0027777777777778 * Float64(-1.0 / x)))) + Float64(1.0 / Float64(x / 0.083333333333333))));
	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, 8e-47], N[(t$95$0 + N[(N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(z * N[(N[(z * N[(N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(x / 0.083333333333333), $MachinePrecision]), $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 8 \cdot 10^{-47}:\\
\;\;\;\;t\_0 + \left(\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right) \cdot \frac{z}{x} + 0.083333333333333 \cdot \frac{1}{x}\right)\\

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


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

    1. Initial program 99.6%

      \[\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 91.4%

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

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

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

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

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

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

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

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

    if 7.9999999999999998e-47 < x

    1. Initial program 89.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.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(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. 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(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) - 0.0027777777777778 \cdot \frac{1}{x}\right) + \color{blue}{\frac{0.083333333333333}{x}}\right) \]
      2. 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(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) - 0.0027777777777778 \cdot \frac{1}{x}\right) + \color{blue}{\frac{1}{\frac{x}{0.083333333333333}}}\right) \]
    5. 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(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) - 0.0027777777777778 \cdot \frac{1}{x}\right) + \color{blue}{\frac{1}{\frac{x}{0.083333333333333}}}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.6%

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

Alternative 3: 99.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 8 \cdot 10^{-47}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + \left(\left(0.0007936500793651 + y\right) \cdot {z}^{2} + z \cdot -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(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right) + \frac{1}{\frac{x}{0.083333333333333}}\right)\\


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

    1. Initial program 99.6%

      \[\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 x around inf 99.6%

      \[\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} \]
    4. Step-by-step derivation
      1. sub-neg99.6%

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

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

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

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

        \[\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} \]
      6. +-commutative99.6%

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

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

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

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

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

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

        \[\leadsto x \cdot \left(-1 + \log x\right) + \frac{\left(z \cdot \color{blue}{\left(z \cdot \left(0.0007936500793651 + y\right)\right)} + z \cdot \left(-0.0027777777777778\right)\right) + 0.083333333333333}{x} \]
      6. associate-*l*99.7%

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

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

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

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

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

    if 7.9999999999999998e-47 < x

    1. Initial program 89.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.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(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. 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(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) - 0.0027777777777778 \cdot \frac{1}{x}\right) + \color{blue}{\frac{0.083333333333333}{x}}\right) \]
      2. 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(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) - 0.0027777777777778 \cdot \frac{1}{x}\right) + \color{blue}{\frac{1}{\frac{x}{0.083333333333333}}}\right) \]
    5. 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(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) - 0.0027777777777778 \cdot \frac{1}{x}\right) + \color{blue}{\frac{1}{\frac{x}{0.083333333333333}}}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 8 \cdot 10^{-47}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + \left(\left(0.0007936500793651 + y\right) \cdot {z}^{2} + z \cdot -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(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right) + \frac{1}{\frac{x}{0.083333333333333}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 99.6% accurate, 0.9× 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 0.0095:\\ \;\;\;\;t\_0 + \left(\frac{1}{\frac{x}{0.083333333333333}} + \frac{z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0 + \left(0.083333333333333 \cdot \frac{1}{x} + z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)))
   (if (<= x 0.0095)
     (+
      t_0
      (+
       (/ 1.0 (/ x 0.083333333333333))
       (/ (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)) x)))
     (+
      t_0
      (+
       (* 0.083333333333333 (/ 1.0 x))
       (*
        z
        (+
         (* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))
         (* 0.0027777777777778 (/ -1.0 x)))))))))
double code(double x, double y, double z) {
	double t_0 = (((x - 0.5) * log(x)) - x) + 0.91893853320467;
	double tmp;
	if (x <= 0.0095) {
		tmp = t_0 + ((1.0 / (x / 0.083333333333333)) + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x));
	} else {
		tmp = t_0 + ((0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / 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) :: t_0
    real(8) :: tmp
    t_0 = (((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0
    if (x <= 0.0095d0) then
        tmp = t_0 + ((1.0d0 / (x / 0.083333333333333d0)) + ((z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0)) / x))
    else
        tmp = t_0 + ((0.083333333333333d0 * (1.0d0 / x)) + (z * ((z * ((0.0007936500793651d0 * (1.0d0 / x)) + (y / x))) + (0.0027777777777778d0 * ((-1.0d0) / x)))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = (((x - 0.5) * Math.log(x)) - x) + 0.91893853320467;
	double tmp;
	if (x <= 0.0095) {
		tmp = t_0 + ((1.0 / (x / 0.083333333333333)) + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x));
	} else {
		tmp = t_0 + ((0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))));
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (((x - 0.5) * math.log(x)) - x) + 0.91893853320467
	tmp = 0
	if x <= 0.0095:
		tmp = t_0 + ((1.0 / (x / 0.083333333333333)) + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x))
	else:
		tmp = t_0 + ((0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / 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 <= 0.0095)
		tmp = Float64(t_0 + Float64(Float64(1.0 / Float64(x / 0.083333333333333)) + Float64(Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778)) / x)));
	else
		tmp = Float64(t_0 + Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 * Float64(1.0 / x)) + Float64(y / x))) + Float64(0.0027777777777778 * Float64(-1.0 / x))))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (((x - 0.5) * log(x)) - x) + 0.91893853320467;
	tmp = 0.0;
	if (x <= 0.0095)
		tmp = t_0 + ((1.0 / (x / 0.083333333333333)) + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x));
	else
		tmp = t_0 + ((0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))));
	end
	tmp_2 = 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, 0.0095], N[(t$95$0 + N[(N[(1.0 / N[(x / 0.083333333333333), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(z * N[(N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 0.0095:\\
\;\;\;\;t\_0 + \left(\frac{1}{\frac{x}{0.083333333333333}} + \frac{z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\right)\\

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


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

    1. Initial program 99.6%

      \[\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 93.1%

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

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

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

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

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

    if 0.00949999999999999976 < x

    1. Initial program 86.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. Add Preprocessing
    3. Taylor expanded in z around 0 99.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(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) - 0.0027777777777778 \cdot \frac{1}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.6%

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

Alternative 5: 93.9% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)\\ \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(0.083333333333333 \cdot \frac{1}{x} + z \cdot \left(z \cdot \frac{y}{x}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{t\_0}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0
         (+
          0.083333333333333
          (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))))
   (if (<= t_0 (- INFINITY))
     (+
      (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
      (+ (* 0.083333333333333 (/ 1.0 x)) (* z (* z (/ y x)))))
     (+ (* x (+ (log x) -1.0)) (/ t_0 x)))))
double code(double x, double y, double z) {
	double t_0 = 0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778));
	double tmp;
	if (t_0 <= -((double) INFINITY)) {
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 * (1.0 / x)) + (z * (z * (y / x))));
	} else {
		tmp = (x * (log(x) + -1.0)) + (t_0 / x);
	}
	return tmp;
}
public static double code(double x, double y, double z) {
	double t_0 = 0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778));
	double tmp;
	if (t_0 <= -Double.POSITIVE_INFINITY) {
		tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 * (1.0 / x)) + (z * (z * (y / x))));
	} else {
		tmp = (x * (Math.log(x) + -1.0)) + (t_0 / x);
	}
	return tmp;
}
def code(x, y, z):
	t_0 = 0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))
	tmp = 0
	if t_0 <= -math.inf:
		tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 * (1.0 / x)) + (z * (z * (y / x))))
	else:
		tmp = (x * (math.log(x) + -1.0)) + (t_0 / x)
	return tmp
function code(x, y, z)
	t_0 = Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778)))
	tmp = 0.0
	if (t_0 <= Float64(-Inf))
		tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(z * Float64(z * Float64(y / x)))));
	else
		tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(t_0 / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = 0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778));
	tmp = 0.0;
	if (t_0 <= -Inf)
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 * (1.0 / x)) + (z * (z * (y / x))));
	else
		tmp = (x * (log(x) + -1.0)) + (t_0 / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) < -inf.0

    1. Initial program 72.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.9%

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\color{blue}{\left(z \cdot z\right)} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      2. associate-*l*99.9%

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(\frac{\color{blue}{0.0007936500793651}}{x} \cdot z + \frac{y}{x} \cdot z\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      6. associate-*l/75.6%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot z}{x}} + \frac{y}{x} \cdot z\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      7. associate-*r/72.9%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(\color{blue}{0.0007936500793651 \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      8. associate-*l/65.8%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{\frac{y \cdot z}{x}}\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      9. associate-/l*72.9%

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

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\color{blue}{z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)\right)} + 0.083333333333333 \cdot \frac{1}{x}\right) \]
    8. Taylor expanded in y around inf 92.8%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \color{blue}{\frac{y \cdot z}{x}} + 0.083333333333333 \cdot \frac{1}{x}\right) \]
    9. Step-by-step derivation
      1. *-commutative92.8%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \frac{\color{blue}{z \cdot y}}{x} + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      2. associate-/l*99.9%

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

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

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

    1. Initial program 97.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 x around inf 95.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} \]
    4. Step-by-step derivation
      1. sub-neg95.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-neg95.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-rec95.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-neg95.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-eval95.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} \]
      6. +-commutative95.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right) \leq -\infty:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(0.083333333333333 \cdot \frac{1}{x} + z \cdot \left(z \cdot \frac{y}{x}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;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} \]
  5. Add Preprocessing

Alternative 6: 99.5% accurate, 0.9× 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 2.45 \cdot 10^{-46}:\\ \;\;\;\;t\_0 + \left(\frac{1}{\frac{x}{0.083333333333333}} + \frac{z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0 + \left(0.083333333333333 \cdot \frac{1}{x} + z \cdot \frac{0.0007936500793651 + y}{\frac{x}{z}}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)))
   (if (<= x 2.45e-46)
     (+
      t_0
      (+
       (/ 1.0 (/ x 0.083333333333333))
       (/ (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)) x)))
     (+
      t_0
      (+
       (* 0.083333333333333 (/ 1.0 x))
       (* z (/ (+ 0.0007936500793651 y) (/ x z))))))))
double code(double x, double y, double z) {
	double t_0 = (((x - 0.5) * log(x)) - x) + 0.91893853320467;
	double tmp;
	if (x <= 2.45e-46) {
		tmp = t_0 + ((1.0 / (x / 0.083333333333333)) + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x));
	} else {
		tmp = t_0 + ((0.083333333333333 * (1.0 / x)) + (z * ((0.0007936500793651 + y) / (x / z))));
	}
	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 = (((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0
    if (x <= 2.45d-46) then
        tmp = t_0 + ((1.0d0 / (x / 0.083333333333333d0)) + ((z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0)) / x))
    else
        tmp = t_0 + ((0.083333333333333d0 * (1.0d0 / x)) + (z * ((0.0007936500793651d0 + y) / (x / z))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = (((x - 0.5) * Math.log(x)) - x) + 0.91893853320467;
	double tmp;
	if (x <= 2.45e-46) {
		tmp = t_0 + ((1.0 / (x / 0.083333333333333)) + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x));
	} else {
		tmp = t_0 + ((0.083333333333333 * (1.0 / x)) + (z * ((0.0007936500793651 + y) / (x / z))));
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (((x - 0.5) * math.log(x)) - x) + 0.91893853320467
	tmp = 0
	if x <= 2.45e-46:
		tmp = t_0 + ((1.0 / (x / 0.083333333333333)) + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x))
	else:
		tmp = t_0 + ((0.083333333333333 * (1.0 / x)) + (z * ((0.0007936500793651 + y) / (x / z))))
	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 <= 2.45e-46)
		tmp = Float64(t_0 + Float64(Float64(1.0 / Float64(x / 0.083333333333333)) + Float64(Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778)) / x)));
	else
		tmp = Float64(t_0 + Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(z * Float64(Float64(0.0007936500793651 + y) / Float64(x / z)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (((x - 0.5) * log(x)) - x) + 0.91893853320467;
	tmp = 0.0;
	if (x <= 2.45e-46)
		tmp = t_0 + ((1.0 / (x / 0.083333333333333)) + ((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x));
	else
		tmp = t_0 + ((0.083333333333333 * (1.0 / x)) + (z * ((0.0007936500793651 + y) / (x / z))));
	end
	tmp_2 = 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, 2.45e-46], N[(t$95$0 + N[(N[(1.0 / N[(x / 0.083333333333333), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(0.0007936500793651 + y), $MachinePrecision] / N[(x / z), $MachinePrecision]), $MachinePrecision]), $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 2.45 \cdot 10^{-46}:\\
\;\;\;\;t\_0 + \left(\frac{1}{\frac{x}{0.083333333333333}} + \frac{z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\right)\\

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


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

    1. Initial program 99.6%

      \[\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 91.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. Taylor expanded in x around 0 99.6%

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

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

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

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

    if 2.45e-46 < x

    1. Initial program 89.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.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(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. Taylor expanded in x around 0 96.6%

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\color{blue}{\left(z \cdot z\right)} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      2. associate-*l*99.6%

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(\frac{\color{blue}{0.0007936500793651}}{x} \cdot z + \frac{y}{x} \cdot z\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      6. associate-*l/99.6%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot z}{x}} + \frac{y}{x} \cdot z\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      7. associate-*r/99.6%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(\color{blue}{0.0007936500793651 \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      8. associate-*l/96.6%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{\frac{y \cdot z}{x}}\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      9. associate-/l*98.9%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      10. distribute-rgt-out99.5%

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \color{blue}{\frac{0.0007936500793651 + y}{\frac{x}{z}}} + 0.083333333333333 \cdot \frac{1}{x}\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 \color{blue}{\frac{0.0007936500793651 + y}{\frac{x}{z}}} + 0.083333333333333 \cdot \frac{1}{x}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.6%

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

Alternative 7: 99.5% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 99.6%

      \[\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 91.4%

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

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

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

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

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

    if 7.9999999999999998e-47 < x

    1. Initial program 89.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.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(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. Taylor expanded in x around 0 96.6%

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\color{blue}{\left(z \cdot z\right)} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      2. associate-*l*99.6%

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(\frac{\color{blue}{0.0007936500793651}}{x} \cdot z + \frac{y}{x} \cdot z\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      6. associate-*l/99.6%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot z}{x}} + \frac{y}{x} \cdot z\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      7. associate-*r/99.6%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(\color{blue}{0.0007936500793651 \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      8. associate-*l/96.6%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{\frac{y \cdot z}{x}}\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      9. associate-/l*98.9%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      10. distribute-rgt-out99.5%

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \color{blue}{\frac{0.0007936500793651 + y}{\frac{x}{z}}} + 0.083333333333333 \cdot \frac{1}{x}\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 \color{blue}{\frac{0.0007936500793651 + y}{\frac{x}{z}}} + 0.083333333333333 \cdot \frac{1}{x}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.6%

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

Alternative 8: 99.1% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 99.6%

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

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

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

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

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

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

    if 4.9999999999999999e-198 < x

    1. Initial program 92.1%

      \[\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 97.7%

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\color{blue}{\left(z \cdot z\right)} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      2. associate-*l*97.7%

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(\frac{\color{blue}{0.0007936500793651}}{x} \cdot z + \frac{y}{x} \cdot z\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      6. associate-*l/94.9%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot z}{x}} + \frac{y}{x} \cdot z\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      7. associate-*r/94.9%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(\color{blue}{0.0007936500793651 \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      8. associate-*l/94.6%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{\frac{y \cdot z}{x}}\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      9. associate-/l*94.8%

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) - 0.0027777777777778 \cdot \frac{1}{x}\right) + \color{blue}{\frac{1}{\frac{x}{0.083333333333333}}}\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(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)\right) + \color{blue}{\frac{1}{\frac{x}{0.083333333333333}}}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.6%

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

Alternative 9: 99.5% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.6%

      \[\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 91.9%

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

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

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

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

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

    if 1.99999999999999994e-28 < x

    1. Initial program 88.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. Taylor expanded in z around 0 99.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(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. Taylor expanded in x around 0 96.5%

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\color{blue}{\left(z \cdot z\right)} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      2. associate-*l*99.6%

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(\frac{\color{blue}{0.0007936500793651}}{x} \cdot z + \frac{y}{x} \cdot z\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      6. associate-*l/99.6%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot z}{x}} + \frac{y}{x} \cdot z\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      7. associate-*r/99.6%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(\color{blue}{0.0007936500793651 \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      8. associate-*l/96.5%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{\frac{y \cdot z}{x}}\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      9. associate-/l*98.8%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      10. distribute-rgt-out99.5%

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

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

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

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

Alternative 10: 83.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7.8 \cdot 10^{+25}:\\ \;\;\;\;\left(0.0007936500793651 + y\right) \cdot \frac{{z}^{2}}{x}\\ \mathbf{elif}\;z \leq 20500000000:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -7.8e+25)
   (* (+ 0.0007936500793651 y) (/ (pow z 2.0) x))
   (if (<= z 20500000000.0)
     (+
      (* x (+ (log x) -1.0))
      (/
       (+
        0.083333333333333
        (* z (- (* z 0.0007936500793651) 0.0027777777777778)))
       x))
     (* (pow z 2.0) (/ (+ 0.0007936500793651 y) x)))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -7.8e+25) {
		tmp = (0.0007936500793651 + y) * (pow(z, 2.0) / x);
	} else if (z <= 20500000000.0) {
		tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x);
	} else {
		tmp = pow(z, 2.0) * ((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 <= (-7.8d+25)) then
        tmp = (0.0007936500793651d0 + y) * ((z ** 2.0d0) / x)
    else if (z <= 20500000000.0d0) then
        tmp = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 + (z * ((z * 0.0007936500793651d0) - 0.0027777777777778d0))) / x)
    else
        tmp = (z ** 2.0d0) * ((0.0007936500793651d0 + y) / x)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -7.8e+25) {
		tmp = (0.0007936500793651 + y) * (Math.pow(z, 2.0) / x);
	} else if (z <= 20500000000.0) {
		tmp = (x * (Math.log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x);
	} else {
		tmp = Math.pow(z, 2.0) * ((0.0007936500793651 + y) / x);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -7.8e+25:
		tmp = (0.0007936500793651 + y) * (math.pow(z, 2.0) / x)
	elif z <= 20500000000.0:
		tmp = (x * (math.log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x)
	else:
		tmp = math.pow(z, 2.0) * ((0.0007936500793651 + y) / x)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -7.8e+25)
		tmp = Float64(Float64(0.0007936500793651 + y) * Float64((z ^ 2.0) / x));
	elseif (z <= 20500000000.0)
		tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * 0.0007936500793651) - 0.0027777777777778))) / x));
	else
		tmp = Float64((z ^ 2.0) * Float64(Float64(0.0007936500793651 + y) / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -7.8e+25)
		tmp = (0.0007936500793651 + y) * ((z ^ 2.0) / x);
	elseif (z <= 20500000000.0)
		tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x);
	else
		tmp = (z ^ 2.0) * ((0.0007936500793651 + y) / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -7.8e+25], N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(N[Power[z, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 20500000000.0], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * 0.0007936500793651), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[Power[z, 2.0], $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.8 \cdot 10^{+25}:\\
\;\;\;\;\left(0.0007936500793651 + y\right) \cdot \frac{{z}^{2}}{x}\\

\mathbf{elif}\;z \leq 20500000000:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x}\\

\mathbf{else}:\\
\;\;\;\;{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}\\


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

    1. Initial program 89.1%

      \[\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 inf 89.1%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}}{x} \]
      2. associate-*r/87.5%

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

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

    if -7.8000000000000004e25 < z < 2.05e10

    1. Initial program 98.6%

      \[\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 x around inf 96.1%

      \[\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} \]
    4. Step-by-step derivation
      1. sub-neg96.1%

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

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

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

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

        \[\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} \]
      6. +-commutative96.1%

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

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

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

    if 2.05e10 < z

    1. Initial program 86.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. Taylor expanded in z around inf 86.2%

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

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

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

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

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

        \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]
    9. Simplified79.8%

      \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification85.8%

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

Alternative 11: 83.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.0295:\\ \;\;\;\;\left(0.0007936500793651 + y\right) \cdot \frac{{z}^{2}}{x}\\ \mathbf{elif}\;z \leq 105000000:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -0.0295)
   (* (+ 0.0007936500793651 y) (/ (pow z 2.0) x))
   (if (<= z 105000000.0)
     (+
      (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
      (/ 0.083333333333333 x))
     (* (pow z 2.0) (/ (+ 0.0007936500793651 y) x)))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -0.0295) {
		tmp = (0.0007936500793651 + y) * (pow(z, 2.0) / x);
	} else if (z <= 105000000.0) {
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
	} else {
		tmp = pow(z, 2.0) * ((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.0295d0)) then
        tmp = (0.0007936500793651d0 + y) * ((z ** 2.0d0) / x)
    else if (z <= 105000000.0d0) then
        tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (0.083333333333333d0 / x)
    else
        tmp = (z ** 2.0d0) * ((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.0295) {
		tmp = (0.0007936500793651 + y) * (Math.pow(z, 2.0) / x);
	} else if (z <= 105000000.0) {
		tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
	} else {
		tmp = Math.pow(z, 2.0) * ((0.0007936500793651 + y) / x);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -0.0295:
		tmp = (0.0007936500793651 + y) * (math.pow(z, 2.0) / x)
	elif z <= 105000000.0:
		tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x)
	else:
		tmp = math.pow(z, 2.0) * ((0.0007936500793651 + y) / x)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -0.0295)
		tmp = Float64(Float64(0.0007936500793651 + y) * Float64((z ^ 2.0) / x));
	elseif (z <= 105000000.0)
		tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(0.083333333333333 / x));
	else
		tmp = Float64((z ^ 2.0) * Float64(Float64(0.0007936500793651 + y) / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -0.0295)
		tmp = (0.0007936500793651 + y) * ((z ^ 2.0) / x);
	elseif (z <= 105000000.0)
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
	else
		tmp = (z ^ 2.0) * ((0.0007936500793651 + y) / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -0.0295], N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(N[Power[z, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 105000000.0], 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[Power[z, 2.0], $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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

\mathbf{else}:\\
\;\;\;\;{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}\\


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

    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. Add Preprocessing
    3. Taylor expanded in z around inf 88.9%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}}{x} \]
      2. associate-*r/84.7%

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

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

    if -0.029499999999999998 < z < 1.05e8

    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. Add Preprocessing
    3. Taylor expanded in z around 0 89.0%

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

    if 1.05e8 < z

    1. Initial program 86.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. Taylor expanded in z around inf 86.2%

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

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

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

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

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

        \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]
    9. Simplified79.8%

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

Alternative 12: 83.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.057:\\ \;\;\;\;\left(0.0007936500793651 + y\right) \cdot \frac{{z}^{2}}{x}\\ \mathbf{elif}\;z \leq 35000000000:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\ \mathbf{else}:\\ \;\;\;\;{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -0.057)
   (* (+ 0.0007936500793651 y) (/ (pow z 2.0) x))
   (if (<= z 35000000000.0)
     (+
      (* x (+ (log x) -1.0))
      (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x))
     (* (pow z 2.0) (/ (+ 0.0007936500793651 y) x)))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -0.057) {
		tmp = (0.0007936500793651 + y) * (pow(z, 2.0) / x);
	} else if (z <= 35000000000.0) {
		tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
	} else {
		tmp = pow(z, 2.0) * ((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.057d0)) then
        tmp = (0.0007936500793651d0 + y) * ((z ** 2.0d0) / x)
    else if (z <= 35000000000.0d0) then
        tmp = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x)
    else
        tmp = (z ** 2.0d0) * ((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.057) {
		tmp = (0.0007936500793651 + y) * (Math.pow(z, 2.0) / x);
	} else if (z <= 35000000000.0) {
		tmp = (x * (Math.log(x) + -1.0)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
	} else {
		tmp = Math.pow(z, 2.0) * ((0.0007936500793651 + y) / x);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -0.057:
		tmp = (0.0007936500793651 + y) * (math.pow(z, 2.0) / x)
	elif z <= 35000000000.0:
		tmp = (x * (math.log(x) + -1.0)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x)
	else:
		tmp = math.pow(z, 2.0) * ((0.0007936500793651 + y) / x)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -0.057)
		tmp = Float64(Float64(0.0007936500793651 + y) * Float64((z ^ 2.0) / x));
	elseif (z <= 35000000000.0)
		tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x));
	else
		tmp = Float64((z ^ 2.0) * Float64(Float64(0.0007936500793651 + y) / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -0.057)
		tmp = (0.0007936500793651 + y) * ((z ^ 2.0) / x);
	elseif (z <= 35000000000.0)
		tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
	else
		tmp = (z ^ 2.0) * ((0.0007936500793651 + y) / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -0.057], N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(N[Power[z, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 35000000000.0], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[Power[z, 2.0], $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 35000000000:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\

\mathbf{else}:\\
\;\;\;\;{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}\\


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

    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. Add Preprocessing
    3. Taylor expanded in z around inf 88.9%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}}{x} \]
      2. associate-*r/84.7%

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

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

    if -0.0570000000000000021 < z < 3.5e10

    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. Add Preprocessing
    3. Taylor expanded in x around inf 96.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} \]
    4. Step-by-step derivation
      1. sub-neg96.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-neg96.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-rec96.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-neg96.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-eval96.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} \]
      6. +-commutative96.7%

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

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

      \[\leadsto x \cdot \left(-1 + \log x\right) + \frac{\color{blue}{-0.0027777777777778 \cdot z} + 0.083333333333333}{x} \]
    7. Step-by-step derivation
      1. *-commutative86.5%

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

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

    if 3.5e10 < z

    1. Initial program 86.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. Taylor expanded in z around inf 86.2%

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

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

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

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

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

        \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]
    9. Simplified79.8%

      \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification84.4%

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

Alternative 13: 82.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.175:\\ \;\;\;\;\left(0.0007936500793651 + y\right) \cdot \frac{{z}^{2}}{x}\\ \mathbf{elif}\;z \leq 85000000:\\ \;\;\;\;0.083333333333333 \cdot \frac{1}{x} + x \cdot \left(\log x + -1\right)\\ \mathbf{else}:\\ \;\;\;\;{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -0.175)
   (* (+ 0.0007936500793651 y) (/ (pow z 2.0) x))
   (if (<= z 85000000.0)
     (+ (* 0.083333333333333 (/ 1.0 x)) (* x (+ (log x) -1.0)))
     (* (pow z 2.0) (/ (+ 0.0007936500793651 y) x)))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -0.175) {
		tmp = (0.0007936500793651 + y) * (pow(z, 2.0) / x);
	} else if (z <= 85000000.0) {
		tmp = (0.083333333333333 * (1.0 / x)) + (x * (log(x) + -1.0));
	} else {
		tmp = pow(z, 2.0) * ((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.175d0)) then
        tmp = (0.0007936500793651d0 + y) * ((z ** 2.0d0) / x)
    else if (z <= 85000000.0d0) then
        tmp = (0.083333333333333d0 * (1.0d0 / x)) + (x * (log(x) + (-1.0d0)))
    else
        tmp = (z ** 2.0d0) * ((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.175) {
		tmp = (0.0007936500793651 + y) * (Math.pow(z, 2.0) / x);
	} else if (z <= 85000000.0) {
		tmp = (0.083333333333333 * (1.0 / x)) + (x * (Math.log(x) + -1.0));
	} else {
		tmp = Math.pow(z, 2.0) * ((0.0007936500793651 + y) / x);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -0.175:
		tmp = (0.0007936500793651 + y) * (math.pow(z, 2.0) / x)
	elif z <= 85000000.0:
		tmp = (0.083333333333333 * (1.0 / x)) + (x * (math.log(x) + -1.0))
	else:
		tmp = math.pow(z, 2.0) * ((0.0007936500793651 + y) / x)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -0.175)
		tmp = Float64(Float64(0.0007936500793651 + y) * Float64((z ^ 2.0) / x));
	elseif (z <= 85000000.0)
		tmp = Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(x * Float64(log(x) + -1.0)));
	else
		tmp = Float64((z ^ 2.0) * Float64(Float64(0.0007936500793651 + y) / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -0.175)
		tmp = (0.0007936500793651 + y) * ((z ^ 2.0) / x);
	elseif (z <= 85000000.0)
		tmp = (0.083333333333333 * (1.0 / x)) + (x * (log(x) + -1.0));
	else
		tmp = (z ^ 2.0) * ((0.0007936500793651 + y) / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -0.175], N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(N[Power[z, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 85000000.0], N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[z, 2.0], $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 85000000:\\
\;\;\;\;0.083333333333333 \cdot \frac{1}{x} + x \cdot \left(\log x + -1\right)\\

\mathbf{else}:\\
\;\;\;\;{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}\\


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

    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. Add Preprocessing
    3. Taylor expanded in z around inf 88.9%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}}{x} \]
      2. associate-*r/84.7%

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

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

    if -0.17499999999999999 < z < 8.5e7

    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. Add Preprocessing
    3. Taylor expanded in z around 0 89.0%

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

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} + \frac{0.083333333333333}{x} \]
    5. Step-by-step derivation
      1. sub-neg96.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-neg96.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-rec96.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-neg96.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-eval96.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} \]
      6. +-commutative96.7%

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

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

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

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

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

    if 8.5e7 < z

    1. Initial program 86.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. Taylor expanded in z around inf 86.2%

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

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

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

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

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

        \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]
    9. Simplified79.8%

      \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification84.4%

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

Alternative 14: 82.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.0009:\\ \;\;\;\;\left(0.0007936500793651 + y\right) \cdot \frac{{z}^{2}}{x}\\ \mathbf{elif}\;z \leq 23500000000:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -0.0009)
   (* (+ 0.0007936500793651 y) (/ (pow z 2.0) x))
   (if (<= z 23500000000.0)
     (+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x))
     (* (pow z 2.0) (/ (+ 0.0007936500793651 y) x)))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -0.0009) {
		tmp = (0.0007936500793651 + y) * (pow(z, 2.0) / x);
	} else if (z <= 23500000000.0) {
		tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x);
	} else {
		tmp = pow(z, 2.0) * ((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.0009d0)) then
        tmp = (0.0007936500793651d0 + y) * ((z ** 2.0d0) / x)
    else if (z <= 23500000000.0d0) then
        tmp = (x * (log(x) + (-1.0d0))) + (0.083333333333333d0 / x)
    else
        tmp = (z ** 2.0d0) * ((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.0009) {
		tmp = (0.0007936500793651 + y) * (Math.pow(z, 2.0) / x);
	} else if (z <= 23500000000.0) {
		tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
	} else {
		tmp = Math.pow(z, 2.0) * ((0.0007936500793651 + y) / x);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -0.0009:
		tmp = (0.0007936500793651 + y) * (math.pow(z, 2.0) / x)
	elif z <= 23500000000.0:
		tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x)
	else:
		tmp = math.pow(z, 2.0) * ((0.0007936500793651 + y) / x)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -0.0009)
		tmp = Float64(Float64(0.0007936500793651 + y) * Float64((z ^ 2.0) / x));
	elseif (z <= 23500000000.0)
		tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x));
	else
		tmp = Float64((z ^ 2.0) * Float64(Float64(0.0007936500793651 + y) / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -0.0009)
		tmp = (0.0007936500793651 + y) * ((z ^ 2.0) / x);
	elseif (z <= 23500000000.0)
		tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x);
	else
		tmp = (z ^ 2.0) * ((0.0007936500793651 + y) / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -0.0009], N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(N[Power[z, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 23500000000.0], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(N[Power[z, 2.0], $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 23500000000:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\

\mathbf{else}:\\
\;\;\;\;{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}\\


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

    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. Add Preprocessing
    3. Taylor expanded in z around inf 88.9%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}}{x} \]
      2. associate-*r/84.7%

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

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

    if -8.9999999999999998e-4 < z < 2.35e10

    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. Add Preprocessing
    3. Taylor expanded in z around 0 89.0%

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

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} + \frac{0.083333333333333}{x} \]
    5. Step-by-step derivation
      1. sub-neg96.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-neg96.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-rec96.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-neg96.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-eval96.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} \]
      6. +-commutative96.7%

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

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

    if 2.35e10 < z

    1. Initial program 86.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. Taylor expanded in z around inf 86.2%

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

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

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

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

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

        \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]
    9. Simplified79.8%

      \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification84.4%

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

Alternative 15: 92.5% 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 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. Add Preprocessing
  3. Taylor expanded in x around inf 92.1%

    \[\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} \]
  4. Step-by-step derivation
    1. sub-neg92.1%

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

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

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

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

      \[\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} \]
    6. +-commutative92.1%

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

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

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

Alternative 16: 59.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.000166 \lor \neg \left(z \leq 1.7 \cdot 10^{-41}\right):\\ \;\;\;\;\left(0.0007936500793651 + y\right) \cdot \frac{{z}^{2}}{x}\\ \mathbf{else}:\\ \;\;\;\;0.083333333333333 \cdot \frac{1}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -0.000166) (not (<= z 1.7e-41)))
   (* (+ 0.0007936500793651 y) (/ (pow z 2.0) x))
   (* 0.083333333333333 (/ 1.0 x))))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -0.000166) || !(z <= 1.7e-41)) {
		tmp = (0.0007936500793651 + y) * (pow(z, 2.0) / x);
	} else {
		tmp = 0.083333333333333 * (1.0 / 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.000166d0)) .or. (.not. (z <= 1.7d-41))) then
        tmp = (0.0007936500793651d0 + y) * ((z ** 2.0d0) / x)
    else
        tmp = 0.083333333333333d0 * (1.0d0 / x)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -0.000166) || !(z <= 1.7e-41)) {
		tmp = (0.0007936500793651 + y) * (Math.pow(z, 2.0) / x);
	} else {
		tmp = 0.083333333333333 * (1.0 / x);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (z <= -0.000166) or not (z <= 1.7e-41):
		tmp = (0.0007936500793651 + y) * (math.pow(z, 2.0) / x)
	else:
		tmp = 0.083333333333333 * (1.0 / x)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((z <= -0.000166) || !(z <= 1.7e-41))
		tmp = Float64(Float64(0.0007936500793651 + y) * Float64((z ^ 2.0) / x));
	else
		tmp = Float64(0.083333333333333 * Float64(1.0 / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((z <= -0.000166) || ~((z <= 1.7e-41)))
		tmp = (0.0007936500793651 + y) * ((z ^ 2.0) / x);
	else
		tmp = 0.083333333333333 * (1.0 / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.000166], N[Not[LessEqual[z, 1.7e-41]], $MachinePrecision]], N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(N[Power[z, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.65999999999999996e-4 or 1.6999999999999999e-41 < z

    1. Initial program 89.1%

      \[\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 inf 86.4%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}}{x} \]
      2. associate-*r/76.5%

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

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

    if -1.65999999999999996e-4 < z < 1.6999999999999999e-41

    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. Add Preprocessing
    3. Taylor expanded in z around 0 93.9%

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

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} + \frac{0.083333333333333}{x} \]
    5. Step-by-step derivation
      1. sub-neg96.2%

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

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

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

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

        \[\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} \]
      6. +-commutative96.2%

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

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

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

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

        \[\leadsto x \cdot \left(-1 + \log x\right) + \color{blue}{\frac{1}{x} \cdot 0.083333333333333} \]
    9. Applied egg-rr46.9%

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

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

Alternative 17: 59.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.0055:\\ \;\;\;\;\left(0.0007936500793651 + y\right) \cdot \frac{{z}^{2}}{x}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-41}:\\ \;\;\;\;0.083333333333333 \cdot \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -0.0055)
   (* (+ 0.0007936500793651 y) (/ (pow z 2.0) x))
   (if (<= z 5.2e-41)
     (* 0.083333333333333 (/ 1.0 x))
     (* (pow z 2.0) (/ (+ 0.0007936500793651 y) x)))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -0.0055) {
		tmp = (0.0007936500793651 + y) * (pow(z, 2.0) / x);
	} else if (z <= 5.2e-41) {
		tmp = 0.083333333333333 * (1.0 / x);
	} else {
		tmp = pow(z, 2.0) * ((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.0055d0)) then
        tmp = (0.0007936500793651d0 + y) * ((z ** 2.0d0) / x)
    else if (z <= 5.2d-41) then
        tmp = 0.083333333333333d0 * (1.0d0 / x)
    else
        tmp = (z ** 2.0d0) * ((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.0055) {
		tmp = (0.0007936500793651 + y) * (Math.pow(z, 2.0) / x);
	} else if (z <= 5.2e-41) {
		tmp = 0.083333333333333 * (1.0 / x);
	} else {
		tmp = Math.pow(z, 2.0) * ((0.0007936500793651 + y) / x);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -0.0055:
		tmp = (0.0007936500793651 + y) * (math.pow(z, 2.0) / x)
	elif z <= 5.2e-41:
		tmp = 0.083333333333333 * (1.0 / x)
	else:
		tmp = math.pow(z, 2.0) * ((0.0007936500793651 + y) / x)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -0.0055)
		tmp = Float64(Float64(0.0007936500793651 + y) * Float64((z ^ 2.0) / x));
	elseif (z <= 5.2e-41)
		tmp = Float64(0.083333333333333 * Float64(1.0 / x));
	else
		tmp = Float64((z ^ 2.0) * Float64(Float64(0.0007936500793651 + y) / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -0.0055)
		tmp = (0.0007936500793651 + y) * ((z ^ 2.0) / x);
	elseif (z <= 5.2e-41)
		tmp = 0.083333333333333 * (1.0 / x);
	else
		tmp = (z ^ 2.0) * ((0.0007936500793651 + y) / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -0.0055], N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(N[Power[z, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e-41], N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(N[Power[z, 2.0], $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 5.2 \cdot 10^{-41}:\\
\;\;\;\;0.083333333333333 \cdot \frac{1}{x}\\

\mathbf{else}:\\
\;\;\;\;{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}\\


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

    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. Add Preprocessing
    3. Taylor expanded in z around inf 88.9%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}}{x} \]
      2. associate-*r/84.7%

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

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

    if -0.0054999999999999997 < z < 5.1999999999999999e-41

    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. Add Preprocessing
    3. Taylor expanded in z around 0 93.9%

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

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} + \frac{0.083333333333333}{x} \]
    5. Step-by-step derivation
      1. sub-neg96.2%

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

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

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

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

        \[\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} \]
      6. +-commutative96.2%

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

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

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

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

        \[\leadsto x \cdot \left(-1 + \log x\right) + \color{blue}{\frac{1}{x} \cdot 0.083333333333333} \]
    9. Applied egg-rr46.9%

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

    if 5.1999999999999999e-41 < z

    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. Add Preprocessing
    3. Taylor expanded in z around inf 84.2%

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

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

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

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

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

        \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]
    9. Simplified69.3%

      \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification63.9%

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

Alternative 18: 47.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.000166 \lor \neg \left(z \leq 5 \cdot 10^{-37}\right):\\ \;\;\;\;\frac{y}{x} \cdot {z}^{2}\\ \mathbf{else}:\\ \;\;\;\;0.083333333333333 \cdot \frac{1}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -0.000166) (not (<= z 5e-37)))
   (* (/ y x) (pow z 2.0))
   (* 0.083333333333333 (/ 1.0 x))))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -0.000166) || !(z <= 5e-37)) {
		tmp = (y / x) * pow(z, 2.0);
	} else {
		tmp = 0.083333333333333 * (1.0 / 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.000166d0)) .or. (.not. (z <= 5d-37))) then
        tmp = (y / x) * (z ** 2.0d0)
    else
        tmp = 0.083333333333333d0 * (1.0d0 / x)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -0.000166) || !(z <= 5e-37)) {
		tmp = (y / x) * Math.pow(z, 2.0);
	} else {
		tmp = 0.083333333333333 * (1.0 / x);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (z <= -0.000166) or not (z <= 5e-37):
		tmp = (y / x) * math.pow(z, 2.0)
	else:
		tmp = 0.083333333333333 * (1.0 / x)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((z <= -0.000166) || !(z <= 5e-37))
		tmp = Float64(Float64(y / x) * (z ^ 2.0));
	else
		tmp = Float64(0.083333333333333 * Float64(1.0 / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((z <= -0.000166) || ~((z <= 5e-37)))
		tmp = (y / x) * (z ^ 2.0);
	else
		tmp = 0.083333333333333 * (1.0 / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.000166], N[Not[LessEqual[z, 5e-37]], $MachinePrecision]], N[(N[(y / x), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision], N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.000166 \lor \neg \left(z \leq 5 \cdot 10^{-37}\right):\\
\;\;\;\;\frac{y}{x} \cdot {z}^{2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.65999999999999996e-4 or 4.9999999999999997e-37 < z

    1. Initial program 89.1%

      \[\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 inf 86.4%

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
    8. Step-by-step derivation
      1. *-commutative54.3%

        \[\leadsto \frac{\color{blue}{{z}^{2} \cdot y}}{x} \]
      2. associate-*r/56.2%

        \[\leadsto \color{blue}{{z}^{2} \cdot \frac{y}{x}} \]
    9. Simplified56.2%

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

    if -1.65999999999999996e-4 < z < 4.9999999999999997e-37

    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. Add Preprocessing
    3. Taylor expanded in z around 0 93.9%

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

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} + \frac{0.083333333333333}{x} \]
    5. Step-by-step derivation
      1. sub-neg96.2%

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

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

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

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

        \[\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} \]
      6. +-commutative96.2%

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

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

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

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

        \[\leadsto x \cdot \left(-1 + \log x\right) + \color{blue}{\frac{1}{x} \cdot 0.083333333333333} \]
    9. Applied egg-rr46.9%

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

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

Alternative 19: 23.5% accurate, 24.6× speedup?

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

\\
0.083333333333333 \cdot \frac{1}{x}
\end{array}
Derivation
  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. Add Preprocessing
  3. Taylor expanded in z around 0 52.1%

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

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

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

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

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

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

      \[\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} \]
    6. +-commutative92.1%

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

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

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

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

      \[\leadsto x \cdot \left(-1 + \log x\right) + \color{blue}{\frac{1}{x} \cdot 0.083333333333333} \]
  9. Applied egg-rr22.7%

    \[\leadsto \color{blue}{\frac{1}{x} \cdot 0.083333333333333} \]
  10. Final simplification22.7%

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

Alternative 20: 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 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. Add Preprocessing
  3. Taylor expanded in z around 0 52.1%

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

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

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

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

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

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

      \[\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} \]
    6. +-commutative92.1%

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

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

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

Developer target: 98.6% 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 2024091 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
  :precision binary64

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

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