diff options
author | Pjotr Prins | 2018-09-06 12:59:12 +0000 |
---|---|---|
committer | Pjotr Prins | 2018-09-06 12:59:12 +0000 |
commit | b40601c6e65b10e070dc3d025ffa50850b7d4ebb (patch) | |
tree | 9cd3f7138af5a2cb077c03edf66aa4638093b4d1 /src/mathfunc.h | |
parent | cdf407bd7994dbe41a952bf29cacc1a2ca9c722e (diff) | |
download | pangemma-b40601c6e65b10e070dc3d025ffa50850b7d4ebb.tar.gz |
Sometimes a value gets negative zero causing a NaN on the sqrt.
Closes #61
Diffstat (limited to 'src/mathfunc.h')
-rw-r--r-- | src/mathfunc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mathfunc.h b/src/mathfunc.h index 5b1e2ec..e786e87 100644 --- a/src/mathfunc.h +++ b/src/mathfunc.h @@ -46,6 +46,7 @@ bool has_inf(const gsl_matrix *m); bool is_integer(const std::string & s); double safe_log(const double d); +double safe_sqrt(const double d); double VectorVar(const gsl_vector *v); void CenterMatrix(gsl_matrix *G); |