From 53b15e05b50c8902c8bf0759d234fa42f57c83f1 Mon Sep 17 00:00:00 2001 From: Bl00drav3n Date: Wed, 11 Apr 2018 22:32:00 +0200 Subject: [PATCH] replace call to powf with simple mul --- Tinn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tinn.c b/Tinn.c index 5ab22c9..d07fc04 100644 --- a/Tinn.c +++ b/Tinn.c @@ -8,7 +8,7 @@ // Error function. static float err(const float a, const float b) { - return 0.5f * powf(a - b, 2.0f); + return 0.5f * (a - b) * (a - b); } // Partial derivative of error function.