The R Project SVN R

Rev

Rev 68947 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 68947 Rev 77685
Line 29... Line 29...
29
{
29
{
30
#ifdef IEEE_754
30
#ifdef IEEE_754
31
    /* NaNs propagated correctly */
31
    /* NaNs propagated correctly */
32
    if (ISNAN(x) || ISNAN(scale)) return x + scale;
32
    if (ISNAN(x) || ISNAN(scale)) return x + scale;
33
#endif
33
#endif
34
    if (scale <= 0.0) ML_ERR_return_NAN;
34
    if (scale <= 0.0) ML_WARN_return_NAN;
35
 
35
 
36
    if (x < 0.)
36
    if (x < 0.)
37
	return R_D__0;
37
	return R_D__0;
38
    return (give_log ?
38
    return (give_log ?
39
	    (-x / scale) - log(scale) :
39
	    (-x / scale) - log(scale) :