
(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 13 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 (+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (+ (* z (/ (+ 0.0007936500793651 y) (/ x z))) (* 0.083333333333333 (/ 1.0 x)))))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((z * ((0.0007936500793651 + y) / (x / z))) + (0.083333333333333 * (1.0 / x)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((z * ((0.0007936500793651d0 + y) / (x / z))) + (0.083333333333333d0 * (1.0d0 / x)))
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((z * ((0.0007936500793651 + y) / (x / z))) + (0.083333333333333 * (1.0 / x)));
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((z * ((0.0007936500793651 + y) / (x / z))) + (0.083333333333333 * (1.0 / x)))
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(z * Float64(Float64(0.0007936500793651 + y) / Float64(x / z))) + Float64(0.083333333333333 * Float64(1.0 / x)))) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((z * ((0.0007936500793651 + y) / (x / z))) + (0.083333333333333 * (1.0 / 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[(z * N[(N[(0.0007936500793651 + y), $MachinePrecision] / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \frac{0.0007936500793651 + y}{\frac{x}{z}} + 0.083333333333333 \cdot \frac{1}{x}\right)
\end{array}
Initial program 92.4%
Taylor expanded in z around 0 93.2%
Taylor expanded in x around 0 92.4%
associate-/l*97.9%
fma-neg97.9%
metadata-eval97.9%
Simplified97.9%
Taylor expanded in z around inf 97.6%
*-commutative97.6%
associate-/l*99.0%
Simplified99.0%
clear-num99.0%
un-div-inv99.1%
Applied egg-rr99.1%
Final simplification99.1%
(FPCore (x y z)
:precision binary64
(if (or (<= z -8.5e-43) (not (<= z 2000000.0)))
(* x (+ (+ (log x) -1.0) (/ 0.083333333333333 (* x x))))
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(* 0.083333333333333 (/ 1.0 x)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -8.5e-43) || !(z <= 2000000.0)) {
tmp = x * ((log(x) + -1.0) + (0.083333333333333 / (x * x)));
} else {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 * (1.0 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-8.5d-43)) .or. (.not. (z <= 2000000.0d0))) then
tmp = x * ((log(x) + (-1.0d0)) + (0.083333333333333d0 / (x * x)))
else
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (0.083333333333333d0 * (1.0d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -8.5e-43) || !(z <= 2000000.0)) {
tmp = x * ((Math.log(x) + -1.0) + (0.083333333333333 / (x * x)));
} else {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 * (1.0 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -8.5e-43) or not (z <= 2000000.0): tmp = x * ((math.log(x) + -1.0) + (0.083333333333333 / (x * x))) else: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 * (1.0 / x)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -8.5e-43) || !(z <= 2000000.0)) tmp = Float64(x * Float64(Float64(log(x) + -1.0) + Float64(0.083333333333333 / Float64(x * x)))); else tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(0.083333333333333 * Float64(1.0 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -8.5e-43) || ~((z <= 2000000.0))) tmp = x * ((log(x) + -1.0) + (0.083333333333333 / (x * x))); else tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 * (1.0 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -8.5e-43], N[Not[LessEqual[z, 2000000.0]], $MachinePrecision]], N[(x * N[(N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision] + N[(0.083333333333333 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{-43} \lor \neg \left(z \leq 2000000\right):\\
\;\;\;\;x \cdot \left(\left(\log x + -1\right) + \frac{0.083333333333333}{x \cdot x}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + 0.083333333333333 \cdot \frac{1}{x}\\
\end{array}
\end{array}
if z < -8.50000000000000056e-43 or 2e6 < z Initial program 87.1%
Taylor expanded in z around 0 22.5%
Taylor expanded in x around inf 22.6%
sub-neg22.6%
mul-1-neg22.6%
log-rec22.6%
remove-double-neg22.6%
metadata-eval22.6%
+-commutative22.6%
Simplified22.6%
Taylor expanded in x around inf 37.1%
+-commutative37.1%
mul-1-neg37.1%
log-rec37.1%
remove-double-neg37.1%
associate--l+37.1%
sub-neg37.1%
metadata-eval37.1%
associate-*r/37.1%
metadata-eval37.1%
+-commutative37.1%
Simplified37.1%
unpow237.1%
Applied egg-rr37.1%
if -8.50000000000000056e-43 < z < 2e6Initial program 99.5%
Taylor expanded in z around 0 93.1%
div-inv46.3%
*-commutative46.3%
Applied egg-rr93.2%
Final simplification61.2%
(FPCore (x y z)
:precision binary64
(if (or (<= z -9e-43) (not (<= z 1850000.0)))
(* x (+ (+ (log x) -1.0) (/ 0.083333333333333 (* x x))))
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/ 1.0 (* x 12.000000000000048)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -9e-43) || !(z <= 1850000.0)) {
tmp = x * ((log(x) + -1.0) + (0.083333333333333 / (x * x)));
} else {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (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 <= (-9d-43)) .or. (.not. (z <= 1850000.0d0))) then
tmp = x * ((log(x) + (-1.0d0)) + (0.083333333333333d0 / (x * x)))
else
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (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 <= -9e-43) || !(z <= 1850000.0)) {
tmp = x * ((Math.log(x) + -1.0) + (0.083333333333333 / (x * x)));
} else {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (1.0 / (x * 12.000000000000048));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -9e-43) or not (z <= 1850000.0): tmp = x * ((math.log(x) + -1.0) + (0.083333333333333 / (x * x))) else: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (1.0 / (x * 12.000000000000048)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -9e-43) || !(z <= 1850000.0)) tmp = Float64(x * Float64(Float64(log(x) + -1.0) + Float64(0.083333333333333 / Float64(x * x)))); else tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(1.0 / Float64(x * 12.000000000000048))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -9e-43) || ~((z <= 1850000.0))) tmp = x * ((log(x) + -1.0) + (0.083333333333333 / (x * x))); else tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (1.0 / (x * 12.000000000000048)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -9e-43], N[Not[LessEqual[z, 1850000.0]], $MachinePrecision]], N[(x * N[(N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision] + N[(0.083333333333333 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{-43} \lor \neg \left(z \leq 1850000\right):\\
\;\;\;\;x \cdot \left(\left(\log x + -1\right) + \frac{0.083333333333333}{x \cdot x}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{x \cdot 12.000000000000048}\\
\end{array}
\end{array}
if z < -9.0000000000000005e-43 or 1.85e6 < z Initial program 87.1%
Taylor expanded in z around 0 22.5%
Taylor expanded in x around inf 22.6%
sub-neg22.6%
mul-1-neg22.6%
log-rec22.6%
remove-double-neg22.6%
metadata-eval22.6%
+-commutative22.6%
Simplified22.6%
Taylor expanded in x around inf 37.1%
+-commutative37.1%
mul-1-neg37.1%
log-rec37.1%
remove-double-neg37.1%
associate--l+37.1%
sub-neg37.1%
metadata-eval37.1%
associate-*r/37.1%
metadata-eval37.1%
+-commutative37.1%
Simplified37.1%
unpow237.1%
Applied egg-rr37.1%
if -9.0000000000000005e-43 < z < 1.85e6Initial program 99.5%
Taylor expanded in z around 0 93.1%
div-inv46.3%
*-commutative46.3%
Applied egg-rr93.2%
associate-/r/93.1%
div-inv93.2%
metadata-eval93.2%
Applied egg-rr93.2%
Final simplification61.2%
(FPCore (x y z) :precision binary64 (+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (+ (* 0.083333333333333 (/ 1.0 x)) (* z (* (+ 0.0007936500793651 y) (/ z x))))))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 * (1.0 / x)) + (z * ((0.0007936500793651 + y) * (z / x))));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((0.083333333333333d0 * (1.0d0 / x)) + (z * ((0.0007936500793651d0 + y) * (z / x))))
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 * (1.0 / x)) + (z * ((0.0007936500793651 + y) * (z / x))));
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 * (1.0 / x)) + (z * ((0.0007936500793651 + y) * (z / x))))
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(z * Float64(Float64(0.0007936500793651 + y) * Float64(z / x))))) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 * (1.0 / x)) + (z * ((0.0007936500793651 + y) * (z / x)))); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(0.083333333333333 \cdot \frac{1}{x} + z \cdot \left(\left(0.0007936500793651 + y\right) \cdot \frac{z}{x}\right)\right)
\end{array}
Initial program 92.4%
Taylor expanded in z around 0 93.2%
Taylor expanded in x around 0 92.4%
associate-/l*97.9%
fma-neg97.9%
metadata-eval97.9%
Simplified97.9%
Taylor expanded in z around inf 97.6%
*-commutative97.6%
associate-/l*99.0%
Simplified99.0%
Final simplification99.0%
(FPCore (x y z)
:precision binary64
(if (or (<= z -8e-43) (not (<= z 1500000.0)))
(* x (+ (+ (log x) -1.0) (/ 0.083333333333333 (* x x))))
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -8e-43) || !(z <= 1500000.0)) {
tmp = x * ((log(x) + -1.0) + (0.083333333333333 / (x * x)));
} else {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-8d-43)) .or. (.not. (z <= 1500000.0d0))) then
tmp = x * ((log(x) + (-1.0d0)) + (0.083333333333333d0 / (x * x)))
else
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -8e-43) || !(z <= 1500000.0)) {
tmp = x * ((Math.log(x) + -1.0) + (0.083333333333333 / (x * x)));
} else {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -8e-43) or not (z <= 1500000.0): tmp = x * ((math.log(x) + -1.0) + (0.083333333333333 / (x * x))) else: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -8e-43) || !(z <= 1500000.0)) tmp = Float64(x * Float64(Float64(log(x) + -1.0) + Float64(0.083333333333333 / Float64(x * x)))); else tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -8e-43) || ~((z <= 1500000.0))) tmp = x * ((log(x) + -1.0) + (0.083333333333333 / (x * x))); else tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -8e-43], N[Not[LessEqual[z, 1500000.0]], $MachinePrecision]], N[(x * N[(N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision] + N[(0.083333333333333 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{-43} \lor \neg \left(z \leq 1500000\right):\\
\;\;\;\;x \cdot \left(\left(\log x + -1\right) + \frac{0.083333333333333}{x \cdot x}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -8.00000000000000062e-43 or 1.5e6 < z Initial program 87.1%
Taylor expanded in z around 0 22.5%
Taylor expanded in x around inf 22.6%
sub-neg22.6%
mul-1-neg22.6%
log-rec22.6%
remove-double-neg22.6%
metadata-eval22.6%
+-commutative22.6%
Simplified22.6%
Taylor expanded in x around inf 37.1%
+-commutative37.1%
mul-1-neg37.1%
log-rec37.1%
remove-double-neg37.1%
associate--l+37.1%
sub-neg37.1%
metadata-eval37.1%
associate-*r/37.1%
metadata-eval37.1%
+-commutative37.1%
Simplified37.1%
unpow237.1%
Applied egg-rr37.1%
if -8.00000000000000062e-43 < z < 1.5e6Initial program 99.5%
Taylor expanded in z around 0 93.1%
Final simplification61.2%
(FPCore (x y z)
:precision binary64
(if (or (<= z -9e-43) (not (<= z 1820000.0)))
(* x (+ (+ (log x) -1.0) (/ 0.083333333333333 (* x x))))
(+
(- (+ 0.91893853320467 (* (log x) (+ x -0.5))) x)
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -9e-43) || !(z <= 1820000.0)) {
tmp = x * ((log(x) + -1.0) + (0.083333333333333 / (x * x)));
} else {
tmp = ((0.91893853320467 + (log(x) * (x + -0.5))) - x) + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-9d-43)) .or. (.not. (z <= 1820000.0d0))) then
tmp = x * ((log(x) + (-1.0d0)) + (0.083333333333333d0 / (x * x)))
else
tmp = ((0.91893853320467d0 + (log(x) * (x + (-0.5d0)))) - x) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -9e-43) || !(z <= 1820000.0)) {
tmp = x * ((Math.log(x) + -1.0) + (0.083333333333333 / (x * x)));
} else {
tmp = ((0.91893853320467 + (Math.log(x) * (x + -0.5))) - x) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -9e-43) or not (z <= 1820000.0): tmp = x * ((math.log(x) + -1.0) + (0.083333333333333 / (x * x))) else: tmp = ((0.91893853320467 + (math.log(x) * (x + -0.5))) - x) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -9e-43) || !(z <= 1820000.0)) tmp = Float64(x * Float64(Float64(log(x) + -1.0) + Float64(0.083333333333333 / Float64(x * x)))); else tmp = Float64(Float64(Float64(0.91893853320467 + Float64(log(x) * Float64(x + -0.5))) - x) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -9e-43) || ~((z <= 1820000.0))) tmp = x * ((log(x) + -1.0) + (0.083333333333333 / (x * x))); else tmp = ((0.91893853320467 + (log(x) * (x + -0.5))) - x) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -9e-43], N[Not[LessEqual[z, 1820000.0]], $MachinePrecision]], N[(x * N[(N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision] + N[(0.083333333333333 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{-43} \lor \neg \left(z \leq 1820000\right):\\
\;\;\;\;x \cdot \left(\left(\log x + -1\right) + \frac{0.083333333333333}{x \cdot x}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(0.91893853320467 + \log x \cdot \left(x + -0.5\right)\right) - x\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -9.0000000000000005e-43 or 1.82e6 < z Initial program 87.1%
Taylor expanded in z around 0 22.5%
Taylor expanded in x around inf 22.6%
sub-neg22.6%
mul-1-neg22.6%
log-rec22.6%
remove-double-neg22.6%
metadata-eval22.6%
+-commutative22.6%
Simplified22.6%
Taylor expanded in x around inf 37.1%
+-commutative37.1%
mul-1-neg37.1%
log-rec37.1%
remove-double-neg37.1%
associate--l+37.1%
sub-neg37.1%
metadata-eval37.1%
associate-*r/37.1%
metadata-eval37.1%
+-commutative37.1%
Simplified37.1%
unpow237.1%
Applied egg-rr37.1%
if -9.0000000000000005e-43 < z < 1.82e6Initial program 99.5%
Taylor expanded in z around 0 93.1%
sub-neg93.1%
associate-+l+93.1%
+-commutative93.1%
sub-neg93.1%
associate-+r-93.1%
sub-neg93.1%
metadata-eval93.1%
*-commutative93.1%
Applied egg-rr93.1%
Final simplification61.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (log x) -1.0)))
(if (or (<= z -8.6e-43) (not (<= z 6.6e+40)))
(* x (+ t_0 (/ 0.083333333333333 (* x x))))
(+ (* x t_0) (/ 0.083333333333333 x)))))
double code(double x, double y, double z) {
double t_0 = log(x) + -1.0;
double tmp;
if ((z <= -8.6e-43) || !(z <= 6.6e+40)) {
tmp = x * (t_0 + (0.083333333333333 / (x * x)));
} else {
tmp = (x * t_0) + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = log(x) + (-1.0d0)
if ((z <= (-8.6d-43)) .or. (.not. (z <= 6.6d+40))) then
tmp = x * (t_0 + (0.083333333333333d0 / (x * x)))
else
tmp = (x * t_0) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = Math.log(x) + -1.0;
double tmp;
if ((z <= -8.6e-43) || !(z <= 6.6e+40)) {
tmp = x * (t_0 + (0.083333333333333 / (x * x)));
} else {
tmp = (x * t_0) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): t_0 = math.log(x) + -1.0 tmp = 0 if (z <= -8.6e-43) or not (z <= 6.6e+40): tmp = x * (t_0 + (0.083333333333333 / (x * x))) else: tmp = (x * t_0) + (0.083333333333333 / x) return tmp
function code(x, y, z) t_0 = Float64(log(x) + -1.0) tmp = 0.0 if ((z <= -8.6e-43) || !(z <= 6.6e+40)) tmp = Float64(x * Float64(t_0 + Float64(0.083333333333333 / Float64(x * x)))); else tmp = Float64(Float64(x * t_0) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = log(x) + -1.0; tmp = 0.0; if ((z <= -8.6e-43) || ~((z <= 6.6e+40))) tmp = x * (t_0 + (0.083333333333333 / (x * x))); else tmp = (x * t_0) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]}, If[Or[LessEqual[z, -8.6e-43], N[Not[LessEqual[z, 6.6e+40]], $MachinePrecision]], N[(x * N[(t$95$0 + N[(0.083333333333333 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * t$95$0), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log x + -1\\
\mathbf{if}\;z \leq -8.6 \cdot 10^{-43} \lor \neg \left(z \leq 6.6 \cdot 10^{+40}\right):\\
\;\;\;\;x \cdot \left(t\_0 + \frac{0.083333333333333}{x \cdot x}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\_0 + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -8.59999999999999927e-43 or 6.5999999999999997e40 < z Initial program 86.4%
Taylor expanded in z around 0 19.3%
Taylor expanded in x around inf 19.4%
sub-neg19.4%
mul-1-neg19.4%
log-rec19.4%
remove-double-neg19.4%
metadata-eval19.4%
+-commutative19.4%
Simplified19.4%
Taylor expanded in x around inf 34.7%
+-commutative34.7%
mul-1-neg34.7%
log-rec34.7%
remove-double-neg34.7%
associate--l+34.7%
sub-neg34.7%
metadata-eval34.7%
associate-*r/34.7%
metadata-eval34.7%
+-commutative34.7%
Simplified34.7%
unpow234.7%
Applied egg-rr34.7%
if -8.59999999999999927e-43 < z < 6.5999999999999997e40Initial program 99.5%
Taylor expanded in z around 0 92.7%
Taylor expanded in x around inf 91.5%
sub-neg91.5%
mul-1-neg91.5%
log-rec91.5%
remove-double-neg91.5%
metadata-eval91.5%
+-commutative91.5%
Simplified91.5%
Final simplification60.7%
(FPCore (x y z) :precision binary64 (+ (+ (* 0.083333333333333 (/ 1.0 x)) (* z (* (+ 0.0007936500793651 y) (/ z x)))) (* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
return ((0.083333333333333 * (1.0 / x)) + (z * ((0.0007936500793651 + y) * (z / x)))) + (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 = ((0.083333333333333d0 * (1.0d0 / x)) + (z * ((0.0007936500793651d0 + y) * (z / x)))) + (x * (log(x) + (-1.0d0)))
end function
public static double code(double x, double y, double z) {
return ((0.083333333333333 * (1.0 / x)) + (z * ((0.0007936500793651 + y) * (z / x)))) + (x * (Math.log(x) + -1.0));
}
def code(x, y, z): return ((0.083333333333333 * (1.0 / x)) + (z * ((0.0007936500793651 + y) * (z / x)))) + (x * (math.log(x) + -1.0))
function code(x, y, z) return Float64(Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(z * Float64(Float64(0.0007936500793651 + y) * Float64(z / x)))) + Float64(x * Float64(log(x) + -1.0))) end
function tmp = code(x, y, z) tmp = ((0.083333333333333 * (1.0 / x)) + (z * ((0.0007936500793651 + y) * (z / x)))) + (x * (log(x) + -1.0)); end
code[x_, y_, z_] := N[(N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(0.083333333333333 \cdot \frac{1}{x} + z \cdot \left(\left(0.0007936500793651 + y\right) \cdot \frac{z}{x}\right)\right) + x \cdot \left(\log x + -1\right)
\end{array}
Initial program 92.4%
Taylor expanded in z around 0 93.2%
Taylor expanded in x around 0 92.4%
associate-/l*97.9%
fma-neg97.9%
metadata-eval97.9%
Simplified97.9%
Taylor expanded in z around inf 97.6%
*-commutative97.6%
associate-/l*99.0%
Simplified99.0%
Taylor expanded in x around inf 98.6%
sub-neg52.4%
mul-1-neg52.4%
log-rec52.4%
remove-double-neg52.4%
metadata-eval52.4%
+-commutative52.4%
Simplified98.6%
Final simplification98.6%
(FPCore (x y z)
:precision binary64
(+
(* x (+ (log x) -1.0))
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x)))
double code(double x, double y, double z) {
return (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x)
end function
public static double code(double x, double y, double z) {
return (x * (Math.log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
}
def code(x, y, z): return (x * (math.log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x)
function code(x, y, z) return Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x)) end
function tmp = code(x, y, z) tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x); end
code[x_, y_, z_] := N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}
\end{array}
Initial program 92.4%
Taylor expanded in x around inf 91.9%
sub-neg52.4%
mul-1-neg52.4%
log-rec52.4%
remove-double-neg52.4%
metadata-eval52.4%
+-commutative52.4%
Simplified91.9%
Final simplification91.9%
(FPCore (x y z) :precision binary64 (if (<= x 2.8) (* 0.083333333333333 (/ 1.0 x)) (* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= 2.8) {
tmp = 0.083333333333333 * (1.0 / 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 <= 2.8d0) then
tmp = 0.083333333333333d0 * (1.0d0 / 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 <= 2.8) {
tmp = 0.083333333333333 * (1.0 / x);
} else {
tmp = x * (Math.log(x) + -1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 2.8: tmp = 0.083333333333333 * (1.0 / x) else: tmp = x * (math.log(x) + -1.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 2.8) tmp = Float64(0.083333333333333 * Float64(1.0 / 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 <= 2.8) tmp = 0.083333333333333 * (1.0 / x); else tmp = x * (log(x) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 2.8], N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.8:\\
\;\;\;\;0.083333333333333 \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right)\\
\end{array}
\end{array}
if x < 2.7999999999999998Initial program 99.7%
Taylor expanded in z around 0 44.6%
Taylor expanded in x around inf 44.2%
sub-neg44.2%
mul-1-neg44.2%
log-rec44.2%
remove-double-neg44.2%
metadata-eval44.2%
+-commutative44.2%
Simplified44.2%
Taylor expanded in x around 0 44.2%
div-inv44.2%
*-commutative44.2%
Applied egg-rr44.2%
if 2.7999999999999998 < x Initial program 86.0%
Taylor expanded in z around 0 60.1%
Taylor expanded in x around inf 59.6%
sub-neg59.6%
mul-1-neg59.6%
log-rec59.6%
remove-double-neg59.6%
metadata-eval59.6%
+-commutative59.6%
Simplified59.6%
Taylor expanded in x around inf 59.6%
+-commutative59.6%
mul-1-neg59.6%
log-rec59.6%
remove-double-neg59.6%
associate--l+59.6%
sub-neg59.6%
metadata-eval59.6%
associate-*r/59.6%
metadata-eval59.6%
+-commutative59.6%
Simplified59.6%
Taylor expanded in x around inf 59.6%
sub-neg59.6%
metadata-eval59.6%
mul-1-neg59.6%
log-rec59.6%
remove-double-neg59.6%
*-lft-identity59.6%
*-lft-identity59.6%
+-commutative59.6%
Simplified59.6%
Final simplification52.4%
(FPCore (x y z) :precision binary64 (+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
return (x * (log(x) + -1.0)) + (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 * (log(x) + (-1.0d0))) + (0.083333333333333d0 / x)
end function
public static double code(double x, double y, double z) {
return (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
}
def code(x, y, z): return (x * (math.log(x) + -1.0)) + (0.083333333333333 / x)
function code(x, y, z) return Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x)) end
function tmp = code(x, y, z) tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x); end
code[x_, y_, z_] := N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}
\end{array}
Initial program 92.4%
Taylor expanded in z around 0 52.8%
Taylor expanded in x around inf 52.4%
sub-neg52.4%
mul-1-neg52.4%
log-rec52.4%
remove-double-neg52.4%
metadata-eval52.4%
+-commutative52.4%
Simplified52.4%
Final simplification52.4%
(FPCore (x y z) :precision binary64 (* 0.083333333333333 (/ 1.0 x)))
double code(double x, double y, double z) {
return 0.083333333333333 * (1.0 / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 0.083333333333333d0 * (1.0d0 / x)
end function
public static double code(double x, double y, double z) {
return 0.083333333333333 * (1.0 / x);
}
def code(x, y, z): return 0.083333333333333 * (1.0 / x)
function code(x, y, z) return Float64(0.083333333333333 * Float64(1.0 / x)) end
function tmp = code(x, y, z) tmp = 0.083333333333333 * (1.0 / x); end
code[x_, y_, z_] := N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.083333333333333 \cdot \frac{1}{x}
\end{array}
Initial program 92.4%
Taylor expanded in z around 0 52.8%
Taylor expanded in x around inf 52.4%
sub-neg52.4%
mul-1-neg52.4%
log-rec52.4%
remove-double-neg52.4%
metadata-eval52.4%
+-commutative52.4%
Simplified52.4%
Taylor expanded in x around 0 22.2%
div-inv22.2%
*-commutative22.2%
Applied egg-rr22.2%
Final simplification22.2%
(FPCore (x y z) :precision binary64 (/ 0.083333333333333 x))
double code(double x, double y, double z) {
return 0.083333333333333 / x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 0.083333333333333d0 / x
end function
public static double code(double x, double y, double z) {
return 0.083333333333333 / x;
}
def code(x, y, z): return 0.083333333333333 / x
function code(x, y, z) return Float64(0.083333333333333 / x) end
function tmp = code(x, y, z) tmp = 0.083333333333333 / x; end
code[x_, y_, z_] := N[(0.083333333333333 / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333}{x}
\end{array}
Initial program 92.4%
Taylor expanded in z around 0 52.8%
Taylor expanded in x around inf 52.4%
sub-neg52.4%
mul-1-neg52.4%
log-rec52.4%
remove-double-neg52.4%
metadata-eval52.4%
+-commutative52.4%
Simplified52.4%
Taylor expanded in x around 0 22.2%
Final simplification22.2%
(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 2024096
(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)))