Skip to content

Commit 0bf5b2f

Browse files
author
ripley
committed
avoid -Wfloat-conversion warning (seen with snaitizers)
git-svn-id: https://svn.r-project.org/R/trunk@88191 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 1d670b1 commit 0bf5b2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nmath/bd0.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ attribute_hidden double bd0(double x, double np)
5252
if (fabs(x-np) < 0.1*(x+np)) {
5353
double d = x - np,
5454
v = d/(x+np);
55-
if(d && !v) { // v has underflown to 0 (as x+np = inf)
55+
if((d != 0.0) && (v == 0.0)) { // v has underflown to 0 (as x+np = inf)
5656
double
5757
x_ = ldexp(x, -2),
5858
n_ = ldexp(np,-2);

0 commit comments

Comments
 (0)