2016-12-24 01:03:10 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-12-21 22:54:25 +00:00
|
|
|
/** exp10 from GNU libm fails to give precise result for integer arguments.
|
|
|
|
* For example, exp10(3) gives 1000.0000000000001
|
|
|
|
* despite the fact that 1000 is exactly representable in double and float.
|
|
|
|
* Better to always use implementation from MUSL.
|
2018-02-16 14:51:14 +00:00
|
|
|
*
|
|
|
|
* Note: the function names are different to avoid confusion with symbols from the system libm.
|
2017-12-21 22:54:25 +00:00
|
|
|
*/
|
2017-01-13 11:25:44 +00:00
|
|
|
|
2017-12-21 22:54:25 +00:00
|
|
|
#include <stdlib.h> /// for __THROW
|
2016-12-24 01:03:10 +00:00
|
|
|
|
2017-12-29 15:48:20 +00:00
|
|
|
// freebsd have no __THROW
|
|
|
|
#if !defined(__THROW)
|
|
|
|
#define __THROW
|
|
|
|
#endif
|
|
|
|
|
2017-12-21 22:54:25 +00:00
|
|
|
extern "C"
|
|
|
|
{
|
2017-02-07 21:26:32 +00:00
|
|
|
|
2018-02-16 14:51:14 +00:00
|
|
|
double preciseExp10(double x) __THROW;
|
|
|
|
double precisePow10(double x) __THROW;
|
|
|
|
float preciseExp10f(float x) __THROW;
|
|
|
|
float precisePow10f(float x) __THROW;
|
2017-12-21 22:54:25 +00:00
|
|
|
|
|
|
|
}
|