mirror of
https://github.com/glouw/tinn
synced 2024-11-21 22:11:21 +03:00
replace call to powf with simple mul
This commit is contained in:
parent
c72e5b66db
commit
53b15e05b5
2
Tinn.c
2
Tinn.c
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user