Displaying 3 results from an estimated 3 matches for "domain_error".
1997 Apr 15
1
R-alpha: Bug & Patch in dbeta.c (0.50 - PreR 7)
dbeta(1, a,b) would return 1 instead of 0.
Here is the patch for ..../src/math/dbeta.c :
--- dbeta.c~ Sun Nov 24 23:43:10 1996
+++ dbeta.c Tue Apr 15 21:25:30 1997
@@ -23,9 +23,7 @@
{
if (a <= 0.0 || b <= 0.0)
DOMAIN_ERROR;
- if (x <= 0)
+ if (x <= 0 || x >= 1.0)
return 0.0;
- if (x >= 1.0)
- return 1.0;
return MATH_CHECK(pow(x, a - 1) * pow(1.0 - x, b - 1.0) / beta(a, b));
}
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-devel mailing list -- Read http://www.ci.tu...
1998 Apr 03
1
R-beta: Bug in dhyper (and phyper) (fwd)
Last night I sent the bug report below to r-help. I have since then looked
at dhyper.c and found:
if (NR < 0 || NB < 0 || n <= 0 || n > N)
DOMAIN_ERROR;
I changed 'n <= 0' to 'n < 0' and then dhyper worked as I wanted. Am I
introducing some potentially dangerous behaviour by this change?
Goran
----------------------------------------------------------------------
I think I have found a bug in the function dhyper (R-0.61.2):...
1997 May 11
2
R-alpha: Logarithmic scales
Here are another three problems with logarithmic scales:
1) segments() does not work with logarithmic scales. I suggest to change
lines 962-973 in "plot.c":
for (i = 0; i < n; i++) {
if (FINITE(xt(x0[i%nx0])) && FINITE(yt(y0[i%ny0]))
&& FINITE(xt(x1[i%nx1])) && FINITE(yt(y1[i%ny1]))) {
GP->col = INTEGER(col)[i % ncol];