
(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:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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}
(FPCore (x y z)
:precision binary64
(if (<= x 620000000.0)
(+
(fma (+ x -0.5) (log x) (- 0.91893853320467 x))
(/
(fma
z
(fma (+ y 0.0007936500793651) z -0.0027777777777778)
0.083333333333333)
x))
(+
(* x (+ (log x) -1.0))
(+
(/ 0.083333333333333 x)
(fma
-0.0027777777777778
(/ z x)
(* (+ y 0.0007936500793651) (* z (/ z x))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 620000000.0) {
tmp = fma((x + -0.5), log(x), (0.91893853320467 - x)) + (fma(z, fma((y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x);
} else {
tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 / x) + fma(-0.0027777777777778, (z / x), ((y + 0.0007936500793651) * (z * (z / x)))));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 620000000.0) tmp = Float64(fma(Float64(x + -0.5), log(x), Float64(0.91893853320467 - x)) + Float64(fma(z, fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 / x) + fma(-0.0027777777777778, Float64(z / x), Float64(Float64(y + 0.0007936500793651) * Float64(z * Float64(z / x)))))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 620000000.0], N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(-0.0027777777777778 * N[(z / x), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 620000000:\\
\;\;\;\;\mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(\frac{0.083333333333333}{x} + \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\right)\right)\\
\end{array}
\end{array}
if x < 6.2e8Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
unsub-neg99.7%
*-commutative99.7%
fma-def99.7%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
if 6.2e8 < x Initial program 91.1%
Taylor expanded in z around inf 91.1%
associate-+r+91.1%
+-commutative91.1%
associate-+l+91.1%
associate-*r/91.1%
metadata-eval91.1%
fma-def91.1%
associate-/l*92.7%
+-commutative92.7%
associate-/r/92.7%
+-commutative92.7%
Simplified92.7%
unpow292.7%
*-un-lft-identity92.7%
times-frac99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 99.7%
sub-neg99.7%
mul-1-neg99.7%
log-rec99.7%
remove-double-neg99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= x 1e+17)
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(+
(* x (+ (log x) -1.0))
(+
(/ 0.083333333333333 x)
(fma
-0.0027777777777778
(/ z x)
(* (+ y 0.0007936500793651) (* z (/ z x))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1e+17) {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 / x) + fma(-0.0027777777777778, (z / x), ((y + 0.0007936500793651) * (z * (z / x)))));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1e+17) tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 / x) + fma(-0.0027777777777778, Float64(z / x), Float64(Float64(y + 0.0007936500793651) * Float64(z * Float64(z / x)))))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1e+17], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(-0.0027777777777778 * N[(z / x), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 10^{+17}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(\frac{0.083333333333333}{x} + \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\right)\right)\\
\end{array}
\end{array}
if x < 1e17Initial program 99.7%
if 1e17 < x Initial program 91.0%
Taylor expanded in z around inf 91.0%
associate-+r+91.0%
+-commutative91.0%
associate-+l+91.0%
associate-*r/91.0%
metadata-eval91.0%
fma-def91.0%
associate-/l*92.6%
+-commutative92.6%
associate-/r/92.6%
+-commutative92.6%
Simplified92.6%
unpow292.6%
*-un-lft-identity92.6%
times-frac99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 99.7%
sub-neg99.7%
mul-1-neg99.7%
log-rec99.7%
remove-double-neg99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= x 2e+27)
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(+ (* x (+ (log x) -1.0)) (* z (/ z (/ x (+ y 0.0007936500793651)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 2e+27) {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = (x * (log(x) + -1.0)) + (z * (z / (x / (y + 0.0007936500793651))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 2d+27) then
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
else
tmp = (x * (log(x) + (-1.0d0))) + (z * (z / (x / (y + 0.0007936500793651d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 2e+27) {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = (x * (Math.log(x) + -1.0)) + (z * (z / (x / (y + 0.0007936500793651))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 2e+27: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) else: tmp = (x * (math.log(x) + -1.0)) + (z * (z / (x / (y + 0.0007936500793651)))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 2e+27) tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(z * Float64(z / Float64(x / Float64(y + 0.0007936500793651))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 2e+27) tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = (x * (log(x) + -1.0)) + (z * (z / (x / (y + 0.0007936500793651)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 2e+27], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z / N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2 \cdot 10^{+27}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + z \cdot \frac{z}{\frac{x}{y + 0.0007936500793651}}\\
\end{array}
\end{array}
if x < 2e27Initial program 99.7%
if 2e27 < x Initial program 90.7%
Taylor expanded in x around inf 90.8%
sub-neg99.7%
mul-1-neg99.7%
log-rec99.7%
remove-double-neg99.7%
metadata-eval99.7%
Simplified90.8%
Taylor expanded in z around inf 90.8%
associate-/l*92.4%
Simplified92.4%
unpow292.4%
*-un-lft-identity92.4%
times-frac99.7%
Applied egg-rr99.7%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (or (<= z -300000000000.0) (not (<= z 5.2e-6)))
(+ t_0 (* z (/ z (/ x (+ y 0.0007936500793651)))))
(+
t_0
(/ (+ 0.083333333333333 (* z (- (* z y) 0.0027777777777778))) x)))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if ((z <= -300000000000.0) || !(z <= 5.2e-6)) {
tmp = t_0 + (z * (z / (x / (y + 0.0007936500793651))));
} else {
tmp = t_0 + ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (log(x) + (-1.0d0))
if ((z <= (-300000000000.0d0)) .or. (.not. (z <= 5.2d-6))) then
tmp = t_0 + (z * (z / (x / (y + 0.0007936500793651d0))))
else
tmp = t_0 + ((0.083333333333333d0 + (z * ((z * y) - 0.0027777777777778d0))) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (Math.log(x) + -1.0);
double tmp;
if ((z <= -300000000000.0) || !(z <= 5.2e-6)) {
tmp = t_0 + (z * (z / (x / (y + 0.0007936500793651))));
} else {
tmp = t_0 + ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x);
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if (z <= -300000000000.0) or not (z <= 5.2e-6): tmp = t_0 + (z * (z / (x / (y + 0.0007936500793651)))) else: tmp = t_0 + ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if ((z <= -300000000000.0) || !(z <= 5.2e-6)) tmp = Float64(t_0 + Float64(z * Float64(z / Float64(x / Float64(y + 0.0007936500793651))))); else tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * y) - 0.0027777777777778))) / x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if ((z <= -300000000000.0) || ~((z <= 5.2e-6))) tmp = t_0 + (z * (z / (x / (y + 0.0007936500793651)))); else tmp = t_0 + ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -300000000000.0], N[Not[LessEqual[z, 5.2e-6]], $MachinePrecision]], N[(t$95$0 + N[(z * N[(z / N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(z * y), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;z \leq -300000000000 \lor \neg \left(z \leq 5.2 \cdot 10^{-6}\right):\\
\;\;\;\;t_0 + z \cdot \frac{z}{\frac{x}{y + 0.0007936500793651}}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot y - 0.0027777777777778\right)}{x}\\
\end{array}
\end{array}
if z < -3e11 or 5.20000000000000019e-6 < z Initial program 91.8%
Taylor expanded in x around inf 91.3%
sub-neg83.5%
mul-1-neg83.5%
log-rec83.5%
remove-double-neg83.5%
metadata-eval83.5%
Simplified91.3%
Taylor expanded in z around inf 91.2%
associate-/l*92.7%
Simplified92.7%
unpow292.7%
*-un-lft-identity92.7%
times-frac99.1%
Applied egg-rr99.1%
if -3e11 < z < 5.20000000000000019e-6Initial program 99.5%
Taylor expanded in x around inf 96.6%
sub-neg96.6%
mul-1-neg96.6%
log-rec96.6%
remove-double-neg96.6%
metadata-eval96.6%
Simplified96.6%
Taylor expanded in y around inf 96.4%
*-commutative96.4%
Simplified96.4%
Final simplification97.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (<= x 2e+26)
(+
t_0
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(+ t_0 (* z (/ z (/ x (+ y 0.0007936500793651))))))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if (x <= 2e+26) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + (z * (z / (x / (y + 0.0007936500793651))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (log(x) + (-1.0d0))
if (x <= 2d+26) then
tmp = t_0 + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
else
tmp = t_0 + (z * (z / (x / (y + 0.0007936500793651d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (Math.log(x) + -1.0);
double tmp;
if (x <= 2e+26) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + (z * (z / (x / (y + 0.0007936500793651))));
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if x <= 2e+26: tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) else: tmp = t_0 + (z * (z / (x / (y + 0.0007936500793651)))) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if (x <= 2e+26) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x)); else tmp = Float64(t_0 + Float64(z * Float64(z / Float64(x / Float64(y + 0.0007936500793651))))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if (x <= 2e+26) tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = t_0 + (z * (z / (x / (y + 0.0007936500793651)))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 2e+26], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(z * N[(z / N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;x \leq 2 \cdot 10^{+26}:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + z \cdot \frac{z}{\frac{x}{y + 0.0007936500793651}}\\
\end{array}
\end{array}
if x < 2.0000000000000001e26Initial program 99.7%
Taylor expanded in x around inf 96.5%
sub-neg82.7%
mul-1-neg82.7%
log-rec82.7%
remove-double-neg82.7%
metadata-eval82.7%
Simplified96.5%
if 2.0000000000000001e26 < x Initial program 90.7%
Taylor expanded in x around inf 90.8%
sub-neg99.7%
mul-1-neg99.7%
log-rec99.7%
remove-double-neg99.7%
metadata-eval99.7%
Simplified90.8%
Taylor expanded in z around inf 90.8%
associate-/l*92.4%
Simplified92.4%
unpow292.4%
*-un-lft-identity92.4%
times-frac99.7%
Applied egg-rr99.7%
Final simplification97.9%
(FPCore (x y z)
:precision binary64
(if (<= x 0.13)
(+
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)
(+ 0.91893853320467 (* -0.5 (log x))))
(+ (* x (+ (log x) -1.0)) (* z (/ z (/ x (+ y 0.0007936500793651)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.13) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (-0.5 * log(x)));
} else {
tmp = (x * (log(x) + -1.0)) + (z * (z / (x / (y + 0.0007936500793651))));
}
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 <= 0.13d0) then
tmp = ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) + (0.91893853320467d0 + ((-0.5d0) * log(x)))
else
tmp = (x * (log(x) + (-1.0d0))) + (z * (z / (x / (y + 0.0007936500793651d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 0.13) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (-0.5 * Math.log(x)));
} else {
tmp = (x * (Math.log(x) + -1.0)) + (z * (z / (x / (y + 0.0007936500793651))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 0.13: tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (-0.5 * math.log(x))) else: tmp = (x * (math.log(x) + -1.0)) + (z * (z / (x / (y + 0.0007936500793651)))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 0.13) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) + Float64(0.91893853320467 + Float64(-0.5 * log(x)))); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(z * Float64(z / Float64(x / Float64(y + 0.0007936500793651))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 0.13) tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (-0.5 * log(x))); else tmp = (x * (log(x) + -1.0)) + (z * (z / (x / (y + 0.0007936500793651)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 0.13], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 + N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z / N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.13:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + -0.5 \cdot \log x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + z \cdot \frac{z}{\frac{x}{y + 0.0007936500793651}}\\
\end{array}
\end{array}
if x < 0.13Initial program 99.7%
Taylor expanded in x around 0 99.5%
if 0.13 < x Initial program 91.5%
Taylor expanded in x around inf 89.6%
sub-neg97.8%
mul-1-neg97.8%
log-rec97.8%
remove-double-neg97.8%
metadata-eval97.8%
Simplified89.6%
Taylor expanded in z around inf 89.6%
associate-/l*91.1%
Simplified91.1%
unpow291.1%
*-un-lft-identity91.1%
times-frac97.7%
Applied egg-rr97.7%
Final simplification98.6%
(FPCore (x y z)
:precision binary64
(if (or (<= z -7.2e-5) (not (<= z 2.4e-67)))
(+ (* x (+ (log x) -1.0)) (* z (/ z (/ x (+ y 0.0007936500793651)))))
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/ 1.0 (* x 12.000000000000048)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -7.2e-5) || !(z <= 2.4e-67)) {
tmp = (x * (log(x) + -1.0)) + (z * (z / (x / (y + 0.0007936500793651))));
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (1.0 / (x * 12.000000000000048));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-7.2d-5)) .or. (.not. (z <= 2.4d-67))) then
tmp = (x * (log(x) + (-1.0d0))) + (z * (z / (x / (y + 0.0007936500793651d0))))
else
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (1.0d0 / (x * 12.000000000000048d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -7.2e-5) || !(z <= 2.4e-67)) {
tmp = (x * (Math.log(x) + -1.0)) + (z * (z / (x / (y + 0.0007936500793651))));
} else {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (1.0 / (x * 12.000000000000048));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -7.2e-5) or not (z <= 2.4e-67): tmp = (x * (math.log(x) + -1.0)) + (z * (z / (x / (y + 0.0007936500793651)))) else: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (1.0 / (x * 12.000000000000048)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -7.2e-5) || !(z <= 2.4e-67)) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(z * Float64(z / Float64(x / Float64(y + 0.0007936500793651))))); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(1.0 / Float64(x * 12.000000000000048))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -7.2e-5) || ~((z <= 2.4e-67))) tmp = (x * (log(x) + -1.0)) + (z * (z / (x / (y + 0.0007936500793651)))); else tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (1.0 / (x * 12.000000000000048)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -7.2e-5], N[Not[LessEqual[z, 2.4e-67]], $MachinePrecision]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z / N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{-5} \lor \neg \left(z \leq 2.4 \cdot 10^{-67}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + z \cdot \frac{z}{\frac{x}{y + 0.0007936500793651}}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{1}{x \cdot 12.000000000000048}\\
\end{array}
\end{array}
if z < -7.20000000000000018e-5 or 2.4e-67 < z Initial program 92.5%
Taylor expanded in x around inf 91.6%
sub-neg84.4%
mul-1-neg84.4%
log-rec84.4%
remove-double-neg84.4%
metadata-eval84.4%
Simplified91.6%
Taylor expanded in z around inf 90.6%
associate-/l*91.9%
Simplified91.9%
unpow291.9%
*-un-lft-identity91.9%
times-frac97.8%
Applied egg-rr97.8%
if -7.20000000000000018e-5 < z < 2.4e-67Initial program 99.5%
Taylor expanded in z around 0 93.6%
clear-num93.6%
inv-pow93.6%
div-inv93.7%
metadata-eval93.7%
Applied egg-rr93.7%
unpow-193.7%
Simplified93.7%
Final simplification95.9%
(FPCore (x y z) :precision binary64 (+ (* x (+ (log x) -1.0)) (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x)))
double code(double x, double y, double z) {
return (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x)
end function
public static double code(double x, double y, double z) {
return (x * (Math.log(x) + -1.0)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
}
def code(x, y, z): return (x * (math.log(x) + -1.0)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x)
function code(x, y, z) return Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x)) end
function tmp = code(x, y, z) tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x); end
code[x_, y_, z_] := N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}
\end{array}
Initial program 95.7%
Taylor expanded in x around inf 94.0%
sub-neg90.2%
mul-1-neg90.2%
log-rec90.2%
remove-double-neg90.2%
metadata-eval90.2%
Simplified94.0%
Taylor expanded in z around 0 61.1%
Final simplification61.1%
(FPCore (x y z) :precision binary64 (if (<= x 5.9e-8) (+ (/ 0.083333333333333 x) (+ 0.91893853320467 (* -0.5 (log x)))) (* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= 5.9e-8) {
tmp = (0.083333333333333 / x) + (0.91893853320467 + (-0.5 * log(x)));
} else {
tmp = x * (log(x) + -1.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 5.9d-8) then
tmp = (0.083333333333333d0 / x) + (0.91893853320467d0 + ((-0.5d0) * log(x)))
else
tmp = x * (log(x) + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 5.9e-8) {
tmp = (0.083333333333333 / x) + (0.91893853320467 + (-0.5 * Math.log(x)));
} else {
tmp = x * (Math.log(x) + -1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 5.9e-8: tmp = (0.083333333333333 / x) + (0.91893853320467 + (-0.5 * math.log(x))) else: tmp = x * (math.log(x) + -1.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 5.9e-8) tmp = Float64(Float64(0.083333333333333 / x) + Float64(0.91893853320467 + Float64(-0.5 * log(x)))); else tmp = Float64(x * Float64(log(x) + -1.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 5.9e-8) tmp = (0.083333333333333 / x) + (0.91893853320467 + (-0.5 * log(x))); else tmp = x * (log(x) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 5.9e-8], N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(0.91893853320467 + N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5.9 \cdot 10^{-8}:\\
\;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + -0.5 \cdot \log x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right)\\
\end{array}
\end{array}
if x < 5.8999999999999999e-8Initial program 99.7%
Taylor expanded in z around 0 38.2%
Taylor expanded in x around 0 38.2%
if 5.8999999999999999e-8 < x Initial program 91.7%
sub-neg91.7%
associate-+l+91.7%
fma-def91.8%
sub-neg91.8%
metadata-eval91.8%
+-commutative91.8%
unsub-neg91.8%
*-commutative91.8%
fma-def91.8%
fma-neg91.8%
metadata-eval91.8%
Simplified91.8%
Taylor expanded in z around 0 72.1%
Taylor expanded in x around inf 70.4%
sub-neg70.4%
mul-1-neg70.4%
log-rec70.4%
remove-double-neg70.4%
metadata-eval70.4%
Simplified70.4%
Final simplification54.0%
(FPCore (x y z) :precision binary64 (+ (/ 0.083333333333333 x) (+ 0.91893853320467 (- (* x (log x)) x))))
double code(double x, double y, double z) {
return (0.083333333333333 / x) + (0.91893853320467 + ((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.083333333333333d0 / x) + (0.91893853320467d0 + ((x * log(x)) - x))
end function
public static double code(double x, double y, double z) {
return (0.083333333333333 / x) + (0.91893853320467 + ((x * Math.log(x)) - x));
}
def code(x, y, z): return (0.083333333333333 / x) + (0.91893853320467 + ((x * math.log(x)) - x))
function code(x, y, z) return Float64(Float64(0.083333333333333 / x) + Float64(0.91893853320467 + Float64(Float64(x * log(x)) - x))) end
function tmp = code(x, y, z) tmp = (0.083333333333333 / x) + (0.91893853320467 + ((x * log(x)) - x)); end
code[x_, y_, z_] := N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333}{x} + \left(0.91893853320467 + \left(x \cdot \log x - x\right)\right)
\end{array}
Initial program 95.7%
Taylor expanded in z around 0 54.9%
Taylor expanded in x around inf 53.5%
mul-1-neg53.5%
distribute-rgt-neg-in53.5%
log-rec53.5%
remove-double-neg53.5%
Simplified53.5%
Final simplification53.5%
(FPCore (x y z) :precision binary64 (* x (+ (log x) -1.0)))
double code(double x, double y, double z) {
return x * (log(x) + -1.0);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x * (log(x) + (-1.0d0))
end function
public static double code(double x, double y, double z) {
return x * (Math.log(x) + -1.0);
}
def code(x, y, z): return x * (math.log(x) + -1.0)
function code(x, y, z) return Float64(x * Float64(log(x) + -1.0)) end
function tmp = code(x, y, z) tmp = x * (log(x) + -1.0); end
code[x_, y_, z_] := N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\log x + -1\right)
\end{array}
Initial program 95.7%
sub-neg95.7%
associate-+l+95.7%
fma-def95.8%
sub-neg95.8%
metadata-eval95.8%
+-commutative95.8%
unsub-neg95.8%
*-commutative95.8%
fma-def95.8%
fma-neg95.8%
metadata-eval95.8%
Simplified95.8%
Taylor expanded in z around 0 54.9%
Taylor expanded in x around inf 35.4%
sub-neg35.4%
mul-1-neg35.4%
log-rec35.4%
remove-double-neg35.4%
metadata-eval35.4%
Simplified35.4%
Final simplification35.4%
(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}
herbie shell --seed 2024010
(FPCore (x y z)
:name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
:precision binary64
:herbie-target
(+ (+ (+ (* (- 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)))