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

Percentage Accurate: 93.9% → 99.5%
Time: 14.4s
Alternatives: 19
Speedup: 0.9×

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 19 alternatives:

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

Initial Program: 93.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+
  (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
  (/
   (+
    (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
    0.083333333333333)
   x)))
double code(double x, double y, double z) {
	return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
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.3× speedup?

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2e30 < x

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.4% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z \cdot \left(\color{blue}{\left(0.0007936500793651 + y\right) \cdot z} - 0.0027777777777778\right) + 0.083333333333333}{x} \]
      3. fmm-def99.8%

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{\left(0.0007936500793651 + y\right)} \cdot z + -0.0027777777777778, 0.083333333333333\right)}{x} \]
      9. *-commutative99.8%

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

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

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

    if 6.49999999999999964e-58 < x

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 99.4% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \color{blue}{\left(y \cdot \left(1 + 0.0007936500793651 \cdot \frac{1}{y}\right)\right)} - 0.0027777777777778\right)}{x} \]
    7. Step-by-step derivation
      1. associate-*r/99.8%

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

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

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

    if 6.9999999999999998e-58 < x

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 95.4% accurate, 0.9× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;z \cdot \frac{t\_0}{x}\\


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

    1. Initial program 98.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

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

    1. Initial program 84.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right)} \]
      2. distribute-rgt-in91.4%

        \[\leadsto z \cdot \left(\color{blue}{\left(\left(0.0007936500793651 \cdot \frac{1}{x}\right) \cdot z + \frac{y}{x} \cdot z\right)} + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      3. associate-*r/91.4%

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

        \[\leadsto z \cdot \left(\left(\frac{\color{blue}{0.0007936500793651}}{x} \cdot z + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      5. associate-*l/91.4%

        \[\leadsto z \cdot \left(\left(\color{blue}{\frac{0.0007936500793651 \cdot z}{x}} + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      6. associate-*r/91.3%

        \[\leadsto z \cdot \left(\left(\color{blue}{0.0007936500793651 \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      7. associate-*l/91.4%

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

        \[\leadsto z \cdot \left(\left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      9. distribute-rgt-out94.8%

        \[\leadsto z \cdot \left(\color{blue}{\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)} + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      10. associate-*r/94.8%

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

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \left(-\frac{\color{blue}{0.0027777777777778}}{x}\right)\right) \]
      12. distribute-neg-frac94.8%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \color{blue}{\frac{-0.0027777777777778}{x}}\right) \]
      13. metadata-eval94.8%

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

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

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

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

Alternative 5: 94.3% accurate, 0.9× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;z \cdot \frac{t\_0}{x}\\


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

    1. Initial program 98.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. Step-by-step derivation
      1. flip--79.4%

        \[\leadsto \left(\left(\color{blue}{\frac{x \cdot x - 0.5 \cdot 0.5}{x + 0.5}} \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. metadata-eval79.4%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{0.25}}{x + 0.5} \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} \]
      3. metadata-eval79.4%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{-0.5 \cdot -0.5}}{x + 0.5} \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} \]
      4. clear-num79.3%

        \[\leadsto \left(\left(\color{blue}{\frac{1}{\frac{x + 0.5}{x \cdot x - -0.5 \cdot -0.5}}} \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} \]
      5. fmm-def79.3%

        \[\leadsto \left(\left(\frac{1}{\frac{x + 0.5}{\color{blue}{\mathsf{fma}\left(x, x, --0.5 \cdot -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} \]
      6. metadata-eval79.3%

        \[\leadsto \left(\left(\frac{1}{\frac{x + 0.5}{\mathsf{fma}\left(x, x, -\color{blue}{0.25}\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} \]
      7. metadata-eval79.3%

        \[\leadsto \left(\left(\frac{1}{\frac{x + 0.5}{\mathsf{fma}\left(x, x, \color{blue}{-0.25}\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} \]
    4. Applied egg-rr79.3%

      \[\leadsto \left(\left(\color{blue}{\frac{1}{\frac{x + 0.5}{\mathsf{fma}\left(x, x, -0.25\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} \]
    5. Step-by-step derivation
      1. associate-+l-79.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\frac{\log x}{\frac{1}{x + -0.5}} - \left(x - 0.91893853320467\right)\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    7. Taylor expanded in x around inf 97.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} \]
    8. Step-by-step derivation
      1. sub-neg97.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-neg97.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-rec97.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-neg97.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-eval97.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} \]
    9. Simplified97.5%

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

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

    1. Initial program 84.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right)} \]
      2. distribute-rgt-in91.4%

        \[\leadsto z \cdot \left(\color{blue}{\left(\left(0.0007936500793651 \cdot \frac{1}{x}\right) \cdot z + \frac{y}{x} \cdot z\right)} + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      3. associate-*r/91.4%

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

        \[\leadsto z \cdot \left(\left(\frac{\color{blue}{0.0007936500793651}}{x} \cdot z + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      5. associate-*l/91.4%

        \[\leadsto z \cdot \left(\left(\color{blue}{\frac{0.0007936500793651 \cdot z}{x}} + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      6. associate-*r/91.3%

        \[\leadsto z \cdot \left(\left(\color{blue}{0.0007936500793651 \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      7. associate-*l/91.4%

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

        \[\leadsto z \cdot \left(\left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      9. distribute-rgt-out94.8%

        \[\leadsto z \cdot \left(\color{blue}{\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)} + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      10. associate-*r/94.8%

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

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \left(-\frac{\color{blue}{0.0027777777777778}}{x}\right)\right) \]
      12. distribute-neg-frac94.8%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \color{blue}{\frac{-0.0027777777777778}{x}}\right) \]
      13. metadata-eval94.8%

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

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

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

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

Alternative 6: 84.3% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \color{blue}{\left(y \cdot \left(1 + 0.0007936500793651 \cdot \frac{1}{y}\right)\right)} - 0.0027777777777778\right)}{x} \]
    7. Step-by-step derivation
      1. associate-*r/98.8%

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

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

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

    if 5.6e18 < x

    1. Initial program 89.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\log x + \color{blue}{-1}\right) \]
    7. Simplified71.2%

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

Alternative 7: 64.9% accurate, 4.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 9.2 \cdot 10^{-58}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y \cdot \left(1 + \frac{0.0007936500793651}{y}\right)\right) - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;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)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 9.2e-58)
   (/
    (+
     0.083333333333333
     (* z (- (* z (* y (+ 1.0 (/ 0.0007936500793651 y)))) 0.0027777777777778)))
    x)
   (+
    (* 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 tmp;
	if (x <= 9.2e-58) {
		tmp = (0.083333333333333 + (z * ((z * (y * (1.0 + (0.0007936500793651 / y)))) - 0.0027777777777778))) / x;
	} else {
		tmp = (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) :: tmp
    if (x <= 9.2d-58) then
        tmp = (0.083333333333333d0 + (z * ((z * (y * (1.0d0 + (0.0007936500793651d0 / y)))) - 0.0027777777777778d0))) / x
    else
        tmp = (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 tmp;
	if (x <= 9.2e-58) {
		tmp = (0.083333333333333 + (z * ((z * (y * (1.0 + (0.0007936500793651 / y)))) - 0.0027777777777778))) / x;
	} else {
		tmp = (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):
	tmp = 0
	if x <= 9.2e-58:
		tmp = (0.083333333333333 + (z * ((z * (y * (1.0 + (0.0007936500793651 / y)))) - 0.0027777777777778))) / x
	else:
		tmp = (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)
	tmp = 0.0
	if (x <= 9.2e-58)
		tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y * Float64(1.0 + Float64(0.0007936500793651 / y)))) - 0.0027777777777778))) / x);
	else
		tmp = 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)
	tmp = 0.0;
	if (x <= 9.2e-58)
		tmp = (0.083333333333333 + (z * ((z * (y * (1.0 + (0.0007936500793651 / y)))) - 0.0027777777777778))) / x;
	else
		tmp = (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_] := If[LessEqual[x, 9.2e-58], N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y * N[(1.0 + N[(0.0007936500793651 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], 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]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;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)\\


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \color{blue}{\left(y \cdot \left(1 + 0.0007936500793651 \cdot \frac{1}{y}\right)\right)} - 0.0027777777777778\right)}{x} \]
    7. Step-by-step derivation
      1. associate-*r/99.8%

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

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

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

    if 9.1999999999999995e-58 < x

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{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}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification67.4%

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

Alternative 8: 64.6% accurate, 5.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -13500000 \lor \neg \left(z \leq 11.5\right):\\
\;\;\;\;z \cdot \left(\left(y + 0.0007936500793651\right) \cdot \frac{z}{x} + \frac{-0.0027777777777778}{x}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.35e7 or 11.5 < z

    1. Initial program 91.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right)} \]
      2. distribute-rgt-in75.7%

        \[\leadsto z \cdot \left(\color{blue}{\left(\left(0.0007936500793651 \cdot \frac{1}{x}\right) \cdot z + \frac{y}{x} \cdot z\right)} + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      3. associate-*r/75.7%

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

        \[\leadsto z \cdot \left(\left(\frac{\color{blue}{0.0007936500793651}}{x} \cdot z + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      5. associate-*l/75.7%

        \[\leadsto z \cdot \left(\left(\color{blue}{\frac{0.0007936500793651 \cdot z}{x}} + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      6. associate-*r/75.7%

        \[\leadsto z \cdot \left(\left(\color{blue}{0.0007936500793651 \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      7. associate-*l/75.1%

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

        \[\leadsto z \cdot \left(\left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      9. distribute-rgt-out83.5%

        \[\leadsto z \cdot \left(\color{blue}{\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)} + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      10. associate-*r/83.5%

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

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \left(-\frac{\color{blue}{0.0027777777777778}}{x}\right)\right) \]
      12. distribute-neg-frac83.5%

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

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

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

    if -1.35e7 < z < 11.5

    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. Step-by-step derivation
      1. remove-double-neg99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{0.083333333333333 + z \cdot \left(\color{blue}{z \cdot y} - 0.0027777777777778\right)}{x} \]
    8. Simplified46.9%

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

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

Alternative 9: 64.4% accurate, 5.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -13500000:\\ \;\;\;\;z \cdot \frac{z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778}{x}\\ \mathbf{elif}\;z \leq 0.108:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot y - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -13500000.0)
   (* z (/ (- (* z (+ y 0.0007936500793651)) 0.0027777777777778) x))
   (if (<= z 0.108)
     (/ (+ 0.083333333333333 (* z (- (* z y) 0.0027777777777778))) x)
     (* z (* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -13500000.0) {
		tmp = z * (((z * (y + 0.0007936500793651)) - 0.0027777777777778) / x);
	} else if (z <= 0.108) {
		tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x;
	} else {
		tmp = z * (z * ((0.0007936500793651 * (1.0 / x)) + (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 <= (-13500000.0d0)) then
        tmp = z * (((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0) / x)
    else if (z <= 0.108d0) then
        tmp = (0.083333333333333d0 + (z * ((z * y) - 0.0027777777777778d0))) / x
    else
        tmp = z * (z * ((0.0007936500793651d0 * (1.0d0 / x)) + (y / x)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -13500000.0) {
		tmp = z * (((z * (y + 0.0007936500793651)) - 0.0027777777777778) / x);
	} else if (z <= 0.108) {
		tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x;
	} else {
		tmp = z * (z * ((0.0007936500793651 * (1.0 / x)) + (y / x)));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -13500000.0:
		tmp = z * (((z * (y + 0.0007936500793651)) - 0.0027777777777778) / x)
	elif z <= 0.108:
		tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x
	else:
		tmp = z * (z * ((0.0007936500793651 * (1.0 / x)) + (y / x)))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -13500000.0)
		tmp = Float64(z * Float64(Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778) / x));
	elseif (z <= 0.108)
		tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * y) - 0.0027777777777778))) / x);
	else
		tmp = Float64(z * Float64(z * Float64(Float64(0.0007936500793651 * Float64(1.0 / x)) + Float64(y / x))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -13500000.0)
		tmp = z * (((z * (y + 0.0007936500793651)) - 0.0027777777777778) / x);
	elseif (z <= 0.108)
		tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x;
	else
		tmp = z * (z * ((0.0007936500793651 * (1.0 / x)) + (y / x)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -13500000.0], N[(z * N[(N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.108], N[(N[(0.083333333333333 + N[(z * N[(N[(z * y), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(z * N[(z * N[(N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \left(\color{blue}{\left(\left(0.0007936500793651 \cdot \frac{1}{x}\right) \cdot z + \frac{y}{x} \cdot z\right)} + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      3. associate-*r/78.0%

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

        \[\leadsto z \cdot \left(\left(\frac{\color{blue}{0.0007936500793651}}{x} \cdot z + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      5. associate-*l/78.0%

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

        \[\leadsto z \cdot \left(\left(\color{blue}{0.0007936500793651 \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      7. associate-*l/78.1%

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

        \[\leadsto z \cdot \left(\left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      9. distribute-rgt-out82.9%

        \[\leadsto z \cdot \left(\color{blue}{\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)} + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      10. associate-*r/82.9%

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

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \left(-\frac{\color{blue}{0.0027777777777778}}{x}\right)\right) \]
      12. distribute-neg-frac82.9%

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

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \frac{\color{blue}{-0.0027777777777778}}{x}\right) \]
    8. Simplified82.9%

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

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

    if -1.35e7 < z < 0.107999999999999999

    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. Step-by-step derivation
      1. remove-double-neg99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.107999999999999999 < z

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right)} \]
      2. distribute-rgt-in73.3%

        \[\leadsto z \cdot \left(\color{blue}{\left(\left(0.0007936500793651 \cdot \frac{1}{x}\right) \cdot z + \frac{y}{x} \cdot z\right)} + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      3. associate-*r/73.4%

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

        \[\leadsto z \cdot \left(\left(\frac{\color{blue}{0.0007936500793651}}{x} \cdot z + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      5. associate-*l/73.3%

        \[\leadsto z \cdot \left(\left(\color{blue}{\frac{0.0007936500793651 \cdot z}{x}} + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      6. associate-*r/73.3%

        \[\leadsto z \cdot \left(\left(\color{blue}{0.0007936500793651 \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      7. associate-*l/72.1%

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

        \[\leadsto z \cdot \left(\left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      9. distribute-rgt-out83.2%

        \[\leadsto z \cdot \left(\color{blue}{\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)} + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      10. associate-*r/83.2%

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

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \left(-\frac{\color{blue}{0.0027777777777778}}{x}\right)\right) \]
      12. distribute-neg-frac83.2%

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

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \frac{\color{blue}{-0.0027777777777778}}{x}\right) \]
    8. Simplified83.2%

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

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

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

Alternative 10: 64.6% accurate, 5.6× speedup?

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{0.083333333333333 + z \cdot \left(z \cdot \color{blue}{\left(y \cdot \left(1 + 0.0007936500793651 \cdot \frac{1}{y}\right)\right)} - 0.0027777777777778\right)}{x} \]
    7. Step-by-step derivation
      1. associate-*r/91.2%

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

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

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

    if 9.20000000000000005e76 < x

    1. Initial program 87.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \left(\color{blue}{\left(\left(0.0007936500793651 \cdot \frac{1}{x}\right) \cdot z + \frac{y}{x} \cdot z\right)} + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      3. associate-*r/28.0%

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

        \[\leadsto z \cdot \left(\left(\frac{\color{blue}{0.0007936500793651}}{x} \cdot z + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      5. associate-*l/28.0%

        \[\leadsto z \cdot \left(\left(\color{blue}{\frac{0.0007936500793651 \cdot z}{x}} + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      6. associate-*r/27.9%

        \[\leadsto z \cdot \left(\left(\color{blue}{0.0007936500793651 \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      7. associate-*l/27.0%

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

        \[\leadsto z \cdot \left(\left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      9. distribute-rgt-out28.0%

        \[\leadsto z \cdot \left(\color{blue}{\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)} + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      10. associate-*r/28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \left(-\color{blue}{\frac{0.0027777777777778 \cdot 1}{x}}\right)\right) \]
      11. metadata-eval28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \left(-\frac{\color{blue}{0.0027777777777778}}{x}\right)\right) \]
      12. distribute-neg-frac28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \color{blue}{\frac{-0.0027777777777778}{x}}\right) \]
      13. metadata-eval28.0%

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

      \[\leadsto \color{blue}{z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \frac{-0.0027777777777778}{x}\right)} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt0.0%

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

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \color{blue}{\sqrt{\frac{-0.0027777777777778}{x} \cdot \frac{-0.0027777777777778}{x}}}\right) \]
      3. frac-times28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \sqrt{\color{blue}{\frac{-0.0027777777777778 \cdot -0.0027777777777778}{x \cdot x}}}\right) \]
      4. metadata-eval28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \sqrt{\frac{\color{blue}{7.716049382716173 \cdot 10^{-6}}}{x \cdot x}}\right) \]
      5. metadata-eval28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \sqrt{\frac{\color{blue}{0.0027777777777778 \cdot 0.0027777777777778}}{x \cdot x}}\right) \]
      6. frac-times28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \sqrt{\color{blue}{\frac{0.0027777777777778}{x} \cdot \frac{0.0027777777777778}{x}}}\right) \]
      7. un-div-inv28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \sqrt{\color{blue}{\left(0.0027777777777778 \cdot \frac{1}{x}\right)} \cdot \frac{0.0027777777777778}{x}}\right) \]
      8. un-div-inv28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \sqrt{\left(0.0027777777777778 \cdot \frac{1}{x}\right) \cdot \color{blue}{\left(0.0027777777777778 \cdot \frac{1}{x}\right)}}\right) \]
      9. sqrt-unprod28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \color{blue}{\sqrt{0.0027777777777778 \cdot \frac{1}{x}} \cdot \sqrt{0.0027777777777778 \cdot \frac{1}{x}}}\right) \]
      10. add-sqr-sqrt28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \color{blue}{0.0027777777777778 \cdot \frac{1}{x}}\right) \]
      11. *-commutative28.0%

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

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

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

Alternative 11: 64.4% accurate, 5.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -13500000:\\ \;\;\;\;z \cdot \frac{z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778}{x}\\ \mathbf{elif}\;z \leq 0.108:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot y - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\left(y + 0.0007936500793651\right) \cdot \frac{z}{x}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -13500000.0)
   (* z (/ (- (* z (+ y 0.0007936500793651)) 0.0027777777777778) x))
   (if (<= z 0.108)
     (/ (+ 0.083333333333333 (* z (- (* z y) 0.0027777777777778))) x)
     (* z (* (+ y 0.0007936500793651) (/ z x))))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -13500000.0) {
		tmp = z * (((z * (y + 0.0007936500793651)) - 0.0027777777777778) / x);
	} else if (z <= 0.108) {
		tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x;
	} else {
		tmp = z * ((y + 0.0007936500793651) * (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 (z <= (-13500000.0d0)) then
        tmp = z * (((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0) / x)
    else if (z <= 0.108d0) then
        tmp = (0.083333333333333d0 + (z * ((z * y) - 0.0027777777777778d0))) / x
    else
        tmp = z * ((y + 0.0007936500793651d0) * (z / x))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -13500000.0) {
		tmp = z * (((z * (y + 0.0007936500793651)) - 0.0027777777777778) / x);
	} else if (z <= 0.108) {
		tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x;
	} else {
		tmp = z * ((y + 0.0007936500793651) * (z / x));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -13500000.0:
		tmp = z * (((z * (y + 0.0007936500793651)) - 0.0027777777777778) / x)
	elif z <= 0.108:
		tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x
	else:
		tmp = z * ((y + 0.0007936500793651) * (z / x))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -13500000.0)
		tmp = Float64(z * Float64(Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778) / x));
	elseif (z <= 0.108)
		tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * y) - 0.0027777777777778))) / x);
	else
		tmp = Float64(z * Float64(Float64(y + 0.0007936500793651) * Float64(z / x)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -13500000.0)
		tmp = z * (((z * (y + 0.0007936500793651)) - 0.0027777777777778) / x);
	elseif (z <= 0.108)
		tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x;
	else
		tmp = z * ((y + 0.0007936500793651) * (z / x));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -13500000.0], N[(z * N[(N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.108], N[(N[(0.083333333333333 + N[(z * N[(N[(z * y), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \left(\color{blue}{\left(\left(0.0007936500793651 \cdot \frac{1}{x}\right) \cdot z + \frac{y}{x} \cdot z\right)} + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      3. associate-*r/78.0%

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

        \[\leadsto z \cdot \left(\left(\frac{\color{blue}{0.0007936500793651}}{x} \cdot z + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      5. associate-*l/78.0%

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

        \[\leadsto z \cdot \left(\left(\color{blue}{0.0007936500793651 \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      7. associate-*l/78.1%

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

        \[\leadsto z \cdot \left(\left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      9. distribute-rgt-out82.9%

        \[\leadsto z \cdot \left(\color{blue}{\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)} + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      10. associate-*r/82.9%

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

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \left(-\frac{\color{blue}{0.0027777777777778}}{x}\right)\right) \]
      12. distribute-neg-frac82.9%

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

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \frac{\color{blue}{-0.0027777777777778}}{x}\right) \]
    8. Simplified82.9%

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

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

    if -1.35e7 < z < 0.107999999999999999

    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. Step-by-step derivation
      1. remove-double-neg99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.107999999999999999 < z

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)\right)} \cdot z \]
      7. distribute-rgt-in73.0%

        \[\leadsto \color{blue}{\left(\frac{0.0007936500793651}{x} \cdot z + \frac{y}{x} \cdot z\right)} \cdot z \]
      8. associate-*l/73.0%

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

        \[\leadsto \left(\color{blue}{0.0007936500793651 \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) \cdot z \]
      10. associate-*l/71.8%

        \[\leadsto \left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{\frac{y \cdot z}{x}}\right) \cdot z \]
      11. associate-/l*68.0%

        \[\leadsto \left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) \cdot z \]
      12. distribute-rgt-out82.8%

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

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

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

Alternative 12: 60.6% accurate, 5.8× speedup?

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

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

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

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


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

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \left(\color{blue}{\left(\left(0.0007936500793651 \cdot \frac{1}{x}\right) \cdot z + \frac{y}{x} \cdot z\right)} + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      3. associate-*r/72.0%

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

        \[\leadsto z \cdot \left(\left(\frac{\color{blue}{0.0007936500793651}}{x} \cdot z + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      5. associate-*l/72.0%

        \[\leadsto z \cdot \left(\left(\color{blue}{\frac{0.0007936500793651 \cdot z}{x}} + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      6. associate-*r/72.1%

        \[\leadsto z \cdot \left(\left(\color{blue}{0.0007936500793651 \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      7. associate-*l/73.4%

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

        \[\leadsto z \cdot \left(\left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      9. distribute-rgt-out77.8%

        \[\leadsto z \cdot \left(\color{blue}{\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)} + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      10. associate-*r/77.8%

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

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \left(-\frac{\color{blue}{0.0027777777777778}}{x}\right)\right) \]
      12. distribute-neg-frac77.8%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \color{blue}{\frac{-0.0027777777777778}{x}}\right) \]
      13. metadata-eval77.8%

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

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

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

    if -9.0000000000000006e-80 < z < 1.00000000000000008e-5

    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. Step-by-step derivation
      1. remove-double-neg99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000008e-5 < z

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)\right)} \cdot z \]
      7. distribute-rgt-in73.0%

        \[\leadsto \color{blue}{\left(\frac{0.0007936500793651}{x} \cdot z + \frac{y}{x} \cdot z\right)} \cdot z \]
      8. associate-*l/73.0%

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

        \[\leadsto \left(\color{blue}{0.0007936500793651 \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) \cdot z \]
      10. associate-*l/71.8%

        \[\leadsto \left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{\frac{y \cdot z}{x}}\right) \cdot z \]
      11. associate-/l*68.0%

        \[\leadsto \left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) \cdot z \]
      12. distribute-rgt-out82.8%

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

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

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

Alternative 13: 64.6% accurate, 6.1× speedup?

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999991e76 < x

    1. Initial program 87.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \left(\color{blue}{\left(\left(0.0007936500793651 \cdot \frac{1}{x}\right) \cdot z + \frac{y}{x} \cdot z\right)} + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      3. associate-*r/28.0%

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

        \[\leadsto z \cdot \left(\left(\frac{\color{blue}{0.0007936500793651}}{x} \cdot z + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      5. associate-*l/28.0%

        \[\leadsto z \cdot \left(\left(\color{blue}{\frac{0.0007936500793651 \cdot z}{x}} + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      6. associate-*r/27.9%

        \[\leadsto z \cdot \left(\left(\color{blue}{0.0007936500793651 \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      7. associate-*l/27.0%

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

        \[\leadsto z \cdot \left(\left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      9. distribute-rgt-out28.0%

        \[\leadsto z \cdot \left(\color{blue}{\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)} + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      10. associate-*r/28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \left(-\color{blue}{\frac{0.0027777777777778 \cdot 1}{x}}\right)\right) \]
      11. metadata-eval28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \left(-\frac{\color{blue}{0.0027777777777778}}{x}\right)\right) \]
      12. distribute-neg-frac28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \color{blue}{\frac{-0.0027777777777778}{x}}\right) \]
      13. metadata-eval28.0%

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

      \[\leadsto \color{blue}{z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \frac{-0.0027777777777778}{x}\right)} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt0.0%

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

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \color{blue}{\sqrt{\frac{-0.0027777777777778}{x} \cdot \frac{-0.0027777777777778}{x}}}\right) \]
      3. frac-times28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \sqrt{\color{blue}{\frac{-0.0027777777777778 \cdot -0.0027777777777778}{x \cdot x}}}\right) \]
      4. metadata-eval28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \sqrt{\frac{\color{blue}{7.716049382716173 \cdot 10^{-6}}}{x \cdot x}}\right) \]
      5. metadata-eval28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \sqrt{\frac{\color{blue}{0.0027777777777778 \cdot 0.0027777777777778}}{x \cdot x}}\right) \]
      6. frac-times28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \sqrt{\color{blue}{\frac{0.0027777777777778}{x} \cdot \frac{0.0027777777777778}{x}}}\right) \]
      7. un-div-inv28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \sqrt{\color{blue}{\left(0.0027777777777778 \cdot \frac{1}{x}\right)} \cdot \frac{0.0027777777777778}{x}}\right) \]
      8. un-div-inv28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \sqrt{\left(0.0027777777777778 \cdot \frac{1}{x}\right) \cdot \color{blue}{\left(0.0027777777777778 \cdot \frac{1}{x}\right)}}\right) \]
      9. sqrt-unprod28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \color{blue}{\sqrt{0.0027777777777778 \cdot \frac{1}{x}} \cdot \sqrt{0.0027777777777778 \cdot \frac{1}{x}}}\right) \]
      10. add-sqr-sqrt28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \color{blue}{0.0027777777777778 \cdot \frac{1}{x}}\right) \]
      11. *-commutative28.0%

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

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

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

Alternative 14: 60.7% accurate, 6.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.0000000000000006e-80 or 3.1e-6 < z

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \cdot z\right) \cdot z} \]
      6. *-commutative79.6%

        \[\leadsto \color{blue}{\left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)\right)} \cdot z \]
      7. distribute-rgt-in72.3%

        \[\leadsto \color{blue}{\left(\frac{0.0007936500793651}{x} \cdot z + \frac{y}{x} \cdot z\right)} \cdot z \]
      8. associate-*l/72.3%

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

        \[\leadsto \left(\color{blue}{0.0007936500793651 \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) \cdot z \]
      10. associate-*l/72.2%

        \[\leadsto \left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{\frac{y \cdot z}{x}}\right) \cdot z \]
      11. associate-/l*67.5%

        \[\leadsto \left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) \cdot z \]
      12. distribute-rgt-out80.2%

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

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

    if -9.0000000000000006e-80 < z < 3.1e-6

    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. Step-by-step derivation
      1. remove-double-neg99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{0.083333333333333 + \color{blue}{-0.0027777777777778 \cdot z}}{x} \]
    7. Step-by-step derivation
      1. *-commutative40.3%

        \[\leadsto \frac{0.083333333333333 + \color{blue}{z \cdot -0.0027777777777778}}{x} \]
    8. Simplified40.3%

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

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

Alternative 15: 60.6% accurate, 6.5× speedup?

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

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

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

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


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

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \left(\color{blue}{\left(\left(0.0007936500793651 \cdot \frac{1}{x}\right) \cdot z + \frac{y}{x} \cdot z\right)} + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      3. associate-*r/72.0%

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

        \[\leadsto z \cdot \left(\left(\frac{\color{blue}{0.0007936500793651}}{x} \cdot z + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      5. associate-*l/72.0%

        \[\leadsto z \cdot \left(\left(\color{blue}{\frac{0.0007936500793651 \cdot z}{x}} + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      6. associate-*r/72.1%

        \[\leadsto z \cdot \left(\left(\color{blue}{0.0007936500793651 \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      7. associate-*l/73.4%

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

        \[\leadsto z \cdot \left(\left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      9. distribute-rgt-out77.8%

        \[\leadsto z \cdot \left(\color{blue}{\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)} + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      10. associate-*r/77.8%

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

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \left(-\frac{\color{blue}{0.0027777777777778}}{x}\right)\right) \]
      12. distribute-neg-frac77.8%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \color{blue}{\frac{-0.0027777777777778}{x}}\right) \]
      13. metadata-eval77.8%

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

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

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

    if -3.79999999999999967e-80 < z < 9.5000000000000005e-6

    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. Step-by-step derivation
      1. remove-double-neg99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{0.083333333333333 + \color{blue}{-0.0027777777777778 \cdot z}}{x} \]
    7. Step-by-step derivation
      1. *-commutative40.3%

        \[\leadsto \frac{0.083333333333333 + \color{blue}{z \cdot -0.0027777777777778}}{x} \]
    8. Simplified40.3%

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

    if 9.5000000000000005e-6 < z

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)\right)} \cdot z \]
      7. distribute-rgt-in73.0%

        \[\leadsto \color{blue}{\left(\frac{0.0007936500793651}{x} \cdot z + \frac{y}{x} \cdot z\right)} \cdot z \]
      8. associate-*l/73.0%

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

        \[\leadsto \left(\color{blue}{0.0007936500793651 \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) \cdot z \]
      10. associate-*l/71.8%

        \[\leadsto \left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{\frac{y \cdot z}{x}}\right) \cdot z \]
      11. associate-/l*68.0%

        \[\leadsto \left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) \cdot z \]
      12. distribute-rgt-out82.8%

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

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

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

Alternative 16: 64.6% accurate, 6.8× speedup?

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.9999999999999996e76 < x

    1. Initial program 87.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \left(\color{blue}{\left(\left(0.0007936500793651 \cdot \frac{1}{x}\right) \cdot z + \frac{y}{x} \cdot z\right)} + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      3. associate-*r/28.0%

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

        \[\leadsto z \cdot \left(\left(\frac{\color{blue}{0.0007936500793651}}{x} \cdot z + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      5. associate-*l/28.0%

        \[\leadsto z \cdot \left(\left(\color{blue}{\frac{0.0007936500793651 \cdot z}{x}} + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      6. associate-*r/27.9%

        \[\leadsto z \cdot \left(\left(\color{blue}{0.0007936500793651 \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      7. associate-*l/27.0%

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

        \[\leadsto z \cdot \left(\left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      9. distribute-rgt-out28.0%

        \[\leadsto z \cdot \left(\color{blue}{\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)} + \left(-0.0027777777777778 \cdot \frac{1}{x}\right)\right) \]
      10. associate-*r/28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \left(-\color{blue}{\frac{0.0027777777777778 \cdot 1}{x}}\right)\right) \]
      11. metadata-eval28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \left(-\frac{\color{blue}{0.0027777777777778}}{x}\right)\right) \]
      12. distribute-neg-frac28.0%

        \[\leadsto z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \color{blue}{\frac{-0.0027777777777778}{x}}\right) \]
      13. metadata-eval28.0%

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

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

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

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

Alternative 17: 29.2% accurate, 8.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -30 \lor \neg \left(z \leq 1.9 \cdot 10^{+71}\right):\\
\;\;\;\;-0.0027777777777778 \cdot \frac{z}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -30 or 1.9e71 < z

    1. Initial program 90.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. Step-by-step derivation
      1. remove-double-neg90.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -30 < z < 1.9e71

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 29.1% accurate, 17.6× speedup?

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

\\
\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}
\end{array}
Derivation
  1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{0.083333333333333 + \color{blue}{-0.0027777777777778 \cdot z}}{x} \]
  7. Step-by-step derivation
    1. *-commutative26.1%

      \[\leadsto \frac{0.083333333333333 + \color{blue}{z \cdot -0.0027777777777778}}{x} \]
  8. Simplified26.1%

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

Alternative 19: 23.7% accurate, 41.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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