spack/var/spack/repos/builtin/packages/ssht/float_conversion.patch

12 lines
261 B
Diff
Raw Normal View History

--- spack-src/src/c/ssht_sampling.h
+++ spack-src/src/c/ssht_sampling.h
@@ -89,7 +89,7 @@
*/
static inline void ssht_sampling_ind2elm(int *el, int *m, int ind) {
- *el = sqrt(ind);
+ *el = lrint(floor(sqrt(ind)));
*m = ind - (*el)*(*el) - (*el);
}