From 6060b30bc33cccb2f5aa55e2c3909554281fa0c4 Mon Sep 17 00:00:00 2001 From: fdai7848 Date: Fri, 2 Feb 2024 00:16:58 +0100 Subject: [PATCH] add function for logarithmus to base 10 for convenience --- src/logarithmus.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/logarithmus.c b/src/logarithmus.c index 248622c..f212821 100644 --- a/src/logarithmus.c +++ b/src/logarithmus.c @@ -11,6 +11,10 @@ double logX(double b, double a){ return(logN(a, 0.000001)/logN(b, 0.000001)); } +double logDec(double a){ + return logX(10.0, a); +} + double logN(double x, double eps){ if(x <= 0){ return -1.0;