Skip to content

Commit c6cfe19

Browse files
committed
reduced to sqrtl
1 parent 17160aa commit c6cfe19

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/gsumm.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@ static int *oo = NULL;
2121
static int *ff = NULL;
2222
static int isunsorted = 0;
2323

24-
// from R's src/cov.c (for variance / sd)
25-
#ifdef HAVE_LONG_DOUBLE
26-
# define SQRTL sqrtl
27-
#else
28-
# define SQRTL sqrt
29-
#endif
30-
3124
static int nbit(int n)
3225
{
3326
// returns position of biggest bit; i.e. floor(log2(n))+1 without using fpa
@@ -1060,7 +1053,7 @@ static SEXP gvarsd1(SEXP x, SEXP narmArg, bool isSD)
10601053
v += (subd[j]-(double)m) * (subd[j]-(double)m);
10611054
}
10621055
ansd[i] = (double)v/(nna-1);
1063-
if (isSD) ansd[i] = SQRTL(ansd[i]);
1056+
if (isSD) ansd[i] = sqrtl(ansd[i]);
10641057
}
10651058
}}
10661059
break;
@@ -1091,7 +1084,7 @@ static SEXP gvarsd1(SEXP x, SEXP narmArg, bool isSD)
10911084
v += (subd[j]-(double)m) * (subd[j]-(double)m);
10921085
}
10931086
ansd[i] = (double)v/(nna-1);
1094-
if (isSD) ansd[i] = SQRTL(ansd[i]);
1087+
if (isSD) ansd[i] = sqrtl(ansd[i]);
10951088
}
10961089
}}
10971090
break;

0 commit comments

Comments
 (0)