mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 21:36:11 +00:00
[CRT]
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:
parent
81e0eb6b13
commit
6115da1a2a
13 changed files with 151 additions and 0 deletions
10
reactos/lib/sdk/crt/math/_chgsignf.c
Normal file
10
reactos/lib/sdk/crt/math/_chgsignf.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
|
||||
#include <math.h>
|
||||
|
||||
_Check_return_
|
||||
float
|
||||
_chgsignf(_In_ float x)
|
||||
{
|
||||
return (float)_chgsign((double)x);
|
||||
}
|
||||
|
12
reactos/lib/sdk/crt/math/_copysignf.c
Normal file
12
reactos/lib/sdk/crt/math/_copysignf.c
Normal 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);
|
||||
}
|
12
reactos/lib/sdk/crt/math/_hypotf.c
Normal file
12
reactos/lib/sdk/crt/math/_hypotf.c
Normal 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);
|
||||
}
|
11
reactos/lib/sdk/crt/math/asinf.c
Normal file
11
reactos/lib/sdk/crt/math/asinf.c
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
#include <math.h>
|
||||
|
||||
_Check_return_
|
||||
float
|
||||
__cdecl
|
||||
asinf(
|
||||
_In_ float x)
|
||||
{
|
||||
return (float)asin((double)x);
|
||||
}
|
12
reactos/lib/sdk/crt/math/atan2f.c
Normal file
12
reactos/lib/sdk/crt/math/atan2f.c
Normal 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);
|
||||
}
|
11
reactos/lib/sdk/crt/math/atanf.c
Normal file
11
reactos/lib/sdk/crt/math/atanf.c
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
#include <math.h>
|
||||
|
||||
_Check_return_
|
||||
float
|
||||
__cdecl
|
||||
atanf(
|
||||
_In_ float x)
|
||||
{
|
||||
return (float)atan((double)x);
|
||||
}
|
11
reactos/lib/sdk/crt/math/coshf.c
Normal file
11
reactos/lib/sdk/crt/math/coshf.c
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
#include <math.h>
|
||||
|
||||
_Check_return_
|
||||
float
|
||||
__cdecl
|
||||
coshf(
|
||||
_In_ float x)
|
||||
{
|
||||
return (float)cosh((double)x);
|
||||
}
|
11
reactos/lib/sdk/crt/math/expf.c
Normal file
11
reactos/lib/sdk/crt/math/expf.c
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
#include <math.h>
|
||||
|
||||
_Check_return_
|
||||
float
|
||||
__cdecl
|
||||
expf(
|
||||
_In_ float x)
|
||||
{
|
||||
return (float)exp((double)x);
|
||||
}
|
11
reactos/lib/sdk/crt/math/log10f.c
Normal file
11
reactos/lib/sdk/crt/math/log10f.c
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
#include <math.h>
|
||||
|
||||
_Check_return_
|
||||
float
|
||||
__cdecl
|
||||
log10f(
|
||||
_In_ float x)
|
||||
{
|
||||
return (float)log10((double)x);
|
||||
}
|
17
reactos/lib/sdk/crt/math/modff.c
Normal file
17
reactos/lib/sdk/crt/math/modff.c
Normal 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;
|
||||
}
|
11
reactos/lib/sdk/crt/math/sinhf.c
Normal file
11
reactos/lib/sdk/crt/math/sinhf.c
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
#include <math.h>
|
||||
|
||||
_Check_return_
|
||||
float
|
||||
__cdecl
|
||||
sinhf(
|
||||
_In_ float x)
|
||||
{
|
||||
return (float)sinh((double)x);
|
||||
}
|
11
reactos/lib/sdk/crt/math/tanf.c
Normal file
11
reactos/lib/sdk/crt/math/tanf.c
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
#include <math.h>
|
||||
|
||||
_Check_return_
|
||||
float
|
||||
__cdecl
|
||||
tanf(
|
||||
_In_ float x)
|
||||
{
|
||||
return (float)tan((double)x);
|
||||
}
|
11
reactos/lib/sdk/crt/math/tanhf.c
Normal file
11
reactos/lib/sdk/crt/math/tanhf.c
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
#include <math.h>
|
||||
|
||||
_Check_return_
|
||||
float
|
||||
__cdecl
|
||||
tanhf(
|
||||
_In_ float x)
|
||||
{
|
||||
return (float)tanh((double)x);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue