Add simple C implementations for _chgsignf, _copysignf, _hypotf, asinf, atan2f, atanf, coshf, expf, log10f, modff, sinhf, tanf, tanhf

svn path=/trunk/; revision=67717
This commit is contained in:
Timo Kreuzer 2015-05-14 19:06:00 +00:00
parent 81e0eb6b13
commit 6115da1a2a
13 changed files with 151 additions and 0 deletions

View file

@ -0,0 +1,10 @@
#include <math.h>
_Check_return_
float
_chgsignf(_In_ float x)
{
return (float)_chgsign((double)x);
}

View file

@ -0,0 +1,12 @@
#include <math.h>
_Check_return_
float
__cdecl
_copysignf(
_In_ float x,
_In_ float y)
{
return (float)_copysign((double)x, (double)y);
}

View file

@ -0,0 +1,12 @@
#include <math.h>
_Check_return_
float
__cdecl
_hypotf(
_In_ float x,
_In_ float y)
{
return (float)_hypot((double)x, (double)y);
}

View file

@ -0,0 +1,11 @@
#include <math.h>
_Check_return_
float
__cdecl
asinf(
_In_ float x)
{
return (float)asin((double)x);
}

View file

@ -0,0 +1,12 @@
#include <math.h>
_Check_return_
float
__cdecl
atan2f(
_In_ float x,
_In_ float y)
{
return (float)atan2((double)x,(double)y);
}

View file

@ -0,0 +1,11 @@
#include <math.h>
_Check_return_
float
__cdecl
atanf(
_In_ float x)
{
return (float)atan((double)x);
}

View file

@ -0,0 +1,11 @@
#include <math.h>
_Check_return_
float
__cdecl
coshf(
_In_ float x)
{
return (float)cosh((double)x);
}

View file

@ -0,0 +1,11 @@
#include <math.h>
_Check_return_
float
__cdecl
expf(
_In_ float x)
{
return (float)exp((double)x);
}

View file

@ -0,0 +1,11 @@
#include <math.h>
_Check_return_
float
__cdecl
log10f(
_In_ float x)
{
return (float)log10((double)x);
}

View file

@ -0,0 +1,17 @@
#include <math.h>
_Check_return_
float
__cdecl
modff(
_In_ float x,
_Out_ float *y)
{
double _Di, _Df;
_Df = modf((double)x,&_Di);
*y = (float)_Di;
return (float)_Df;
}

View file

@ -0,0 +1,11 @@
#include <math.h>
_Check_return_
float
__cdecl
sinhf(
_In_ float x)
{
return (float)sinh((double)x);
}

View file

@ -0,0 +1,11 @@
#include <math.h>
_Check_return_
float
__cdecl
tanf(
_In_ float x)
{
return (float)tan((double)x);
}

View file

@ -0,0 +1,11 @@
#include <math.h>
_Check_return_
float
__cdecl
tanhf(
_In_ float x)
{
return (float)tanh((double)x);
}