summaryrefslogtreecommitdiffstats
path: root/lib/logarithm.c
diff options
context:
space:
mode:
authorEthan Werner <mail@ethanwerner.com>2026-08-09 15:02:21 +0400
committerEthan Werner <mail@ethanwerner.com>2026-08-09 15:02:21 +0400
commit3d92926a902017e7cf1f5738e99ff62da596ce12 (patch)
tree2b55422c26a48759d56fa91f06df24449e9dfa88 /lib/logarithm.c
parent07e18043145f3d91c8ea7ec3ad41b3c905585277 (diff)
Diffstat (limited to 'lib/logarithm.c')
-rwxr-xr-xlib/logarithm.c4
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 ) );