Merge pull request #11 from Bl00drav3n/master

replace call to powf with SQUARE macro
This commit is contained in:
Gustav Louw 2018-04-11 16:17:53 -07:00 committed by GitHub
commit 87a032a14a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

2
Tinn.c
View File

@ -8,7 +8,7 @@
// Error function. // Error function.
static float err(const float a, const float b) 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. // Partial derivative of error function.