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

Percentage Accurate: 94.1% → 98.6%
Time: 21.9s
Alternatives: 18
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 94.1% 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: 98.6% accurate, 1.0× speedup?

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

\\
\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \frac{-0.0027777777777778}{x}\right) + \log x \cdot \left(x - 0.5\right)\right)\right)\right) - x
\end{array}
Derivation
  1. Initial program 93.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. sub-neg93.2%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
  3. Simplified93.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 0 96.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} \]
  6. Step-by-step derivation
    1. pow196.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 82.0% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;x \leq 1.08 \cdot 10^{+108}:\\
\;\;\;\;\left(x \cdot y\right) \cdot \left(\frac{\log x}{y} + \frac{-1}{y}\right)\\

\mathbf{elif}\;x \leq 2.1 \cdot 10^{+123}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{y}{x}\\

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


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

    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. sub-neg99.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{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 y around inf 64.3%

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

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

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

        \[\leadsto \frac{\color{blue}{0.083333333333333 \cdot \left(\frac{1}{y} \cdot y\right)} + \left(\frac{z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{y} + {z}^{2}\right) \cdot y}{x} \]
      3. lft-mult-inverse78.9%

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

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

        \[\leadsto \frac{0.083333333333333 + \color{blue}{\left({z}^{2} + \frac{z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{y}\right)} \cdot y}{x} \]
      6. unpow278.9%

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

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

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

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

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

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

    if 1.0500000000000001e24 < x < 1.0800000000000001e108

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
    3. Simplified93.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 y around inf 80.8%

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

      \[\leadsto \color{blue}{x \cdot \left(y \cdot \left(-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{y} - \frac{1}{y}\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*76.4%

        \[\leadsto \color{blue}{\left(x \cdot y\right) \cdot \left(-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{y} - \frac{1}{y}\right)} \]
      2. sub-neg76.4%

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

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

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

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

        \[\leadsto \left(x \cdot y\right) \cdot \left(\frac{\color{blue}{\log x}}{y} + \left(-\frac{1}{y}\right)\right) \]
      7. distribute-neg-frac76.4%

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

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

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

    if 1.0800000000000001e108 < x < 2.09999999999999994e123

    1. Initial program 58.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
    3. Simplified58.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 z around inf 69.1%

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

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

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

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

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

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

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

    if 2.09999999999999994e123 < x

    1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 y around inf 48.6%

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

      \[\leadsto \color{blue}{x \cdot \left(y \cdot \left(-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{y} - \frac{1}{y}\right)\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification88.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.05 \cdot 10^{+24}:\\ \;\;\;\;\frac{0.083333333333333 + y \cdot \left(z \cdot \left(z + \frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{y}\right)\right)}{x}\\ \mathbf{elif}\;x \leq 1.08 \cdot 10^{+108}:\\ \;\;\;\;\left(x \cdot y\right) \cdot \left(\frac{\log x}{y} + \frac{-1}{y}\right)\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{+123}:\\ \;\;\;\;\left(z \cdot z\right) \cdot \frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot \left(\frac{-1}{y} - \frac{\log \left(\frac{1}{x}\right)}{y}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 94.9% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 96.6%

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

        \[\leadsto \color{blue}{\left(\left(x - 0.5\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. sub-neg96.6%

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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} \]
      3. metadata-eval96.6%

        \[\leadsto \left(\left(x + \color{blue}{-0.5}\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} \]
      4. sub-neg96.6%

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

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

      \[\leadsto \color{blue}{\left(\left(x + -0.5\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} \]

    if 7.9999999999999999e203 < x

    1. Initial program 78.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. sub-neg78.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
    3. Simplified78.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 y around inf 45.6%

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

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

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

Alternative 4: 94.9% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 96.6%

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

    if 4.5000000000000003e203 < x

    1. Initial program 78.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. sub-neg78.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
    3. Simplified78.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 y around inf 45.6%

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

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

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

Alternative 5: 97.8% accurate, 1.0× speedup?

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

\\
\left(0.91893853320467 + \left(0.083333333333333 \cdot \frac{1}{x} + \left(\log x \cdot \left(x - 0.5\right) + z \cdot \frac{z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778}{x}\right)\right)\right) - x
\end{array}
Derivation
  1. Initial program 93.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. sub-neg93.2%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
  3. Simplified93.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 0 96.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} \]
  6. Taylor expanded in x around 0 98.5%

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

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

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

Alternative 6: 56.6% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;x \leq 1.08 \cdot 10^{+108} \lor \neg \left(x \leq 3.1 \cdot 10^{+123}\right):\\
\;\;\;\;\left(x \cdot y\right) \cdot \left(\frac{\log x}{y} + \frac{-1}{y}\right)\\

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


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

    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. sub-neg99.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{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 z around inf 57.6%

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

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

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

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

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

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

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

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

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

    if 3.5e22 < x < 1.0800000000000001e108 or 3.10000000000000006e123 < x

    1. Initial program 88.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. sub-neg88.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
    3. Simplified88.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 y around inf 57.5%

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

      \[\leadsto \color{blue}{x \cdot \left(y \cdot \left(-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{y} - \frac{1}{y}\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*66.9%

        \[\leadsto \color{blue}{\left(x \cdot y\right) \cdot \left(-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{y} - \frac{1}{y}\right)} \]
      2. sub-neg66.9%

        \[\leadsto \left(x \cdot y\right) \cdot \color{blue}{\left(-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{y} + \left(-\frac{1}{y}\right)\right)} \]
      3. mul-1-neg66.9%

        \[\leadsto \left(x \cdot y\right) \cdot \left(\color{blue}{\left(-\frac{\log \left(\frac{1}{x}\right)}{y}\right)} + \left(-\frac{1}{y}\right)\right) \]
      4. distribute-frac-neg66.9%

        \[\leadsto \left(x \cdot y\right) \cdot \left(\color{blue}{\frac{-\log \left(\frac{1}{x}\right)}{y}} + \left(-\frac{1}{y}\right)\right) \]
      5. log-rec66.9%

        \[\leadsto \left(x \cdot y\right) \cdot \left(\frac{-\color{blue}{\left(-\log x\right)}}{y} + \left(-\frac{1}{y}\right)\right) \]
      6. remove-double-neg66.9%

        \[\leadsto \left(x \cdot y\right) \cdot \left(\frac{\color{blue}{\log x}}{y} + \left(-\frac{1}{y}\right)\right) \]
      7. distribute-neg-frac66.9%

        \[\leadsto \left(x \cdot y\right) \cdot \left(\frac{\log x}{y} + \color{blue}{\frac{-1}{y}}\right) \]
      8. metadata-eval66.9%

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

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

    if 1.0800000000000001e108 < x < 3.10000000000000006e123

    1. Initial program 58.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
    3. Simplified58.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 z around inf 69.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 3.5 \cdot 10^{+22}:\\ \;\;\;\;\frac{{z}^{2} \cdot \left(y \cdot \left(1 + \frac{0.0007936500793651}{y}\right)\right)}{x}\\ \mathbf{elif}\;x \leq 1.08 \cdot 10^{+108} \lor \neg \left(x \leq 3.1 \cdot 10^{+123}\right):\\ \;\;\;\;\left(x \cdot y\right) \cdot \left(\frac{\log x}{y} + \frac{-1}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot z\right) \cdot \frac{y}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 56.6% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;x \leq 2.8 \cdot 10^{+108} \lor \neg \left(x \leq 2.1 \cdot 10^{+123}\right):\\
\;\;\;\;\left(x \cdot y\right) \cdot \left(\frac{\log x}{y} + \frac{-1}{y}\right)\\

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


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

    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. sub-neg99.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{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 z around inf 57.6%

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

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

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

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

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

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

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

    if 1.2999999999999999e24 < x < 2.7999999999999998e108 or 2.09999999999999994e123 < x

    1. Initial program 88.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. sub-neg88.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
    3. Simplified88.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 y around inf 57.5%

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

      \[\leadsto \color{blue}{x \cdot \left(y \cdot \left(-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{y} - \frac{1}{y}\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*66.9%

        \[\leadsto \color{blue}{\left(x \cdot y\right) \cdot \left(-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{y} - \frac{1}{y}\right)} \]
      2. sub-neg66.9%

        \[\leadsto \left(x \cdot y\right) \cdot \color{blue}{\left(-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{y} + \left(-\frac{1}{y}\right)\right)} \]
      3. mul-1-neg66.9%

        \[\leadsto \left(x \cdot y\right) \cdot \left(\color{blue}{\left(-\frac{\log \left(\frac{1}{x}\right)}{y}\right)} + \left(-\frac{1}{y}\right)\right) \]
      4. distribute-frac-neg66.9%

        \[\leadsto \left(x \cdot y\right) \cdot \left(\color{blue}{\frac{-\log \left(\frac{1}{x}\right)}{y}} + \left(-\frac{1}{y}\right)\right) \]
      5. log-rec66.9%

        \[\leadsto \left(x \cdot y\right) \cdot \left(\frac{-\color{blue}{\left(-\log x\right)}}{y} + \left(-\frac{1}{y}\right)\right) \]
      6. remove-double-neg66.9%

        \[\leadsto \left(x \cdot y\right) \cdot \left(\frac{\color{blue}{\log x}}{y} + \left(-\frac{1}{y}\right)\right) \]
      7. distribute-neg-frac66.9%

        \[\leadsto \left(x \cdot y\right) \cdot \left(\frac{\log x}{y} + \color{blue}{\frac{-1}{y}}\right) \]
      8. metadata-eval66.9%

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

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

    if 2.7999999999999998e108 < x < 2.09999999999999994e123

    1. Initial program 58.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
    3. Simplified58.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 z around inf 69.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.3 \cdot 10^{+24}:\\ \;\;\;\;\frac{\left(0.0007936500793651 + y\right) \cdot \left(z \cdot z\right)}{x}\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{+108} \lor \neg \left(x \leq 2.1 \cdot 10^{+123}\right):\\ \;\;\;\;\left(x \cdot y\right) \cdot \left(\frac{\log x}{y} + \frac{-1}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot z\right) \cdot \frac{y}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 54.0% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;x \leq 6.5 \cdot 10^{+107} \lor \neg \left(x \leq 2.1 \cdot 10^{+123}\right):\\
\;\;\;\;y \cdot \left(x \cdot \left(\frac{\log x}{y} + \frac{-1}{y}\right)\right)\\

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


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

    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. sub-neg99.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{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 z around inf 57.6%

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

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

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

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

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

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

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

    if 5.19999999999999983e23 < x < 6.5000000000000006e107 or 2.09999999999999994e123 < x

    1. Initial program 88.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. sub-neg88.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
    3. Simplified88.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 y around inf 57.5%

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

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

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

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

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

        \[\leadsto y \cdot \left(x \cdot \left(\frac{-\color{blue}{\left(-\log x\right)}}{y} + \left(-\frac{1}{y}\right)\right)\right) \]
      5. remove-double-neg59.1%

        \[\leadsto y \cdot \left(x \cdot \left(\frac{\color{blue}{\log x}}{y} + \left(-\frac{1}{y}\right)\right)\right) \]
      6. distribute-neg-frac59.1%

        \[\leadsto y \cdot \left(x \cdot \left(\frac{\log x}{y} + \color{blue}{\frac{-1}{y}}\right)\right) \]
      7. metadata-eval59.1%

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

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

    if 6.5000000000000006e107 < x < 2.09999999999999994e123

    1. Initial program 58.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
    3. Simplified58.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 z around inf 69.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 5.2 \cdot 10^{+23}:\\ \;\;\;\;\frac{\left(0.0007936500793651 + y\right) \cdot \left(z \cdot z\right)}{x}\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{+107} \lor \neg \left(x \leq 2.1 \cdot 10^{+123}\right):\\ \;\;\;\;y \cdot \left(x \cdot \left(\frac{\log x}{y} + \frac{-1}{y}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot z\right) \cdot \frac{y}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 97.8% accurate, 1.0× speedup?

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

\\
\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \frac{-0.0027777777777778}{x}\right) + x \cdot \log x\right)\right)\right) - x
\end{array}
Derivation
  1. Initial program 93.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. sub-neg93.2%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
  3. Simplified93.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 0 96.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} \]
  6. Step-by-step derivation
    1. pow196.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 94.1% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 96.6%

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

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

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

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

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

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

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

      \[\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 7.9999999999999999e203 < x

    1. Initial program 78.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. sub-neg78.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
    3. Simplified78.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 y around inf 45.6%

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

      \[\leadsto \color{blue}{x \cdot \left(y \cdot \left(-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{y} - \frac{1}{y}\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification94.5%

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

Alternative 11: 83.6% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 83.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
    3. Simplified83.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 76.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3e9 < z < 4.0000000000000001e27

    1. Initial program 99.5%

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

        \[\leadsto \color{blue}{\left(\left(x - 0.5\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. sub-neg99.5%

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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} \]
      3. metadata-eval99.5%

        \[\leadsto \left(\left(x + \color{blue}{-0.5}\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} \]
      4. sub-neg99.5%

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

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

      \[\leadsto \color{blue}{\left(\left(x + -0.5\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} \]
    5. Taylor expanded in z around 0 93.3%

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

    if 4.0000000000000001e27 < z

    1. Initial program 88.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
    3. Simplified88.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 z around inf 77.4%

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

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

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

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

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

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

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

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

Alternative 12: 83.6% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 83.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
    3. Simplified83.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 76.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.4e12 < z < 1.4500000000000001e27

    1. Initial program 99.5%

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

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

    if 1.4500000000000001e27 < z

    1. Initial program 88.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
    3. Simplified88.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 z around inf 77.4%

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

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

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

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

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

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

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

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

Alternative 13: 42.5% accurate, 1.1× speedup?

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

\\
\left(0.0007936500793651 + y\right) \cdot \frac{{z}^{2}}{x}
\end{array}
Derivation
  1. Initial program 93.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. sub-neg93.2%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
  3. Simplified93.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 40.1%

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

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

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

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

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

    \[\leadsto \color{blue}{0.0007936500793651 \cdot \frac{{z}^{2}}{x} + \frac{y \cdot {z}^{2}}{x}} \]
  10. Step-by-step derivation
    1. associate-/l*26.2%

      \[\leadsto 0.0007936500793651 \cdot \frac{{z}^{2}}{x} + \color{blue}{y \cdot \frac{{z}^{2}}{x}} \]
    2. distribute-rgt-out40.5%

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

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

    \[\leadsto \left(0.0007936500793651 + y\right) \cdot \frac{{z}^{2}}{x} \]
  13. Add Preprocessing

Alternative 14: 41.4% accurate, 6.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.00000000000000038e-4 or 8.00000000000000038e-4 < y

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
    3. Simplified92.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 z around inf 48.4%

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

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

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

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

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

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

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

    if -8.00000000000000038e-4 < y < 8.00000000000000038e-4

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
    3. Simplified94.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 32.7%

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

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

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

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

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

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

      \[\leadsto \left(z \cdot z\right) \cdot \color{blue}{\frac{0.0007936500793651}{x}} \]
    11. Step-by-step derivation
      1. div-inv32.6%

        \[\leadsto \left(z \cdot z\right) \cdot \color{blue}{\left(0.0007936500793651 \cdot \frac{1}{x}\right)} \]
      2. *-commutative32.6%

        \[\leadsto \left(z \cdot z\right) \cdot \color{blue}{\left(\frac{1}{x} \cdot 0.0007936500793651\right)} \]
    12. Applied egg-rr32.6%

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

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

Alternative 15: 41.4% accurate, 7.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.00000000000000038e-4 or 8.00000000000000038e-4 < y

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
    3. Simplified92.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 z around inf 48.4%

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

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

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

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

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

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

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

    if -8.00000000000000038e-4 < y < 8.00000000000000038e-4

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
    3. Simplified94.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 32.7%

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

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

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

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

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

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

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

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

Alternative 16: 41.4% accurate, 11.2× speedup?

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

\\
\left(z \cdot z\right) \cdot \left(\left(0.0007936500793651 + y\right) \cdot \frac{1}{x}\right)
\end{array}
Derivation
  1. Initial program 93.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. sub-neg93.2%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
  3. Simplified93.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 40.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left(z \cdot z\right) \cdot \left(\left(0.0007936500793651 + y\right) \cdot \frac{1}{x}\right) \]
  14. Add Preprocessing

Alternative 17: 41.4% accurate, 13.7× speedup?

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

\\
\left(z \cdot z\right) \cdot \frac{0.0007936500793651 + y}{x}
\end{array}
Derivation
  1. Initial program 93.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. sub-neg93.2%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
  3. Simplified93.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 40.1%

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

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

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

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

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

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

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

Alternative 18: 26.2% accurate, 17.6× speedup?

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

\\
\left(z \cdot z\right) \cdot \frac{0.0007936500793651}{x}
\end{array}
Derivation
  1. Initial program 93.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. sub-neg93.2%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]
  3. Simplified93.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 40.1%

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

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

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

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

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

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

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

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

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

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