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 31... Line 31...
31
#ifdef IEEE_754
31
#ifdef IEEE_754
32
    /* NaNs propagated correctly */
32
    /* NaNs propagated correctly */
33
    if (ISNAN(x) || ISNAN(location) || ISNAN(scale))
33
    if (ISNAN(x) || ISNAN(location) || ISNAN(scale))
34
	return x + location + scale;
34
	return x + location + scale;
35
#endif
35
#endif
36
    if (scale <= 0) ML_ERR_return_NAN;
36
    if (scale <= 0) ML_WARN_return_NAN;
37
 
37
 
38
    y = (x - location) / scale;
38
    y = (x - location) / scale;
39
    return give_log ?
39
    return give_log ?
40
	- log(M_PI * scale * (1. + y * y)) :
40
	- log(M_PI * scale * (1. + y * y)) :
41
	1. / (M_PI * scale * (1. + y * y));
41
	1. / (M_PI * scale * (1. + y * y));