diff options
Diffstat (limited to 'lib/logarithm.c')
| -rwxr-xr-x | lib/logarithm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/logarithm.c b/lib/logarithm.c index 7451976..9ca98a6 100755 --- a/lib/logarithm.c +++ b/lib/logarithm.c @@ -36,8 +36,8 @@ int ts_logarithm( { TS_PROLOGUE( ts_logarithm_p ); if ( !c ) return -1; - fp_t b = ((ts_logarithm_params_t *)c)->b; - if (b == 0 || b == 1.0) return -1; + fp_t b = ((ts_logarithm_params_t const *)c)->b; + if (b <= 0 || b == 1.0 || isnan(b) || isinf(b)) return -1; b = _ts_reciprocal( log( b ) ); |