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