mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 10:58:49 +08:00
libs/libm: fix epsilon relaxation in log and logf
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
parent
39937c9685
commit
a2ed0ddd72
2 changed files with 2 additions and 2 deletions
|
@ -98,7 +98,7 @@ double log(double x)
|
|||
iter = 0;
|
||||
}
|
||||
|
||||
if (relax_factor > 1.0)
|
||||
if (iter == 0)
|
||||
{
|
||||
epsilon *= relax_factor;
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ float logf(float x)
|
|||
iter = 0;
|
||||
}
|
||||
|
||||
if (relax_factor > 1.0F)
|
||||
if (iter == 0)
|
||||
{
|
||||
epsilon *= relax_factor;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue