mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
various fixes (#49)
* libs: libc: math: Fix tanh() math functions * drivers: mtd: smart: Fix trivial debug message in smartfs * binfmt: libelf: Fix fd not closed on error * binfmt: Fix stack memory leak on error * fs: romfs: Fix private data not free on error * sched: group: Fix reference after free memory * sched: clock: Fix clock sync Fix clock sync when CONFIG_RTC_HIRES is enabled
This commit is contained in:
@@ -44,6 +44,6 @@ double tanh(double x)
|
||||
double x0 = exp(x);
|
||||
double x1 = 1.0 / x0;
|
||||
|
||||
return ((x0 + x1) / (x0 - x1));
|
||||
return ((x0 - x1) / (x0 + x1));
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -40,5 +40,5 @@ float tanhf(float x)
|
||||
float x0 = expf(x);
|
||||
float x1 = 1.0F / x0;
|
||||
|
||||
return ((x0 + x1) / (x0 - x1));
|
||||
return ((x0 - x1) / (x0 + x1));
|
||||
}
|
||||
|
||||
@@ -44,6 +44,6 @@ long double tanhl(long double x)
|
||||
long double x0 = exp(x);
|
||||
long double x1 = 1.0 / x0;
|
||||
|
||||
return ((x0 + x1) / (x0 - x1));
|
||||
return ((x0 - x1) / (x0 + x1));
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user