Skip to content

Commit b734e3b

Browse files
committed
[CRT:MATH] Move some math functions from ucrt to crt
1 parent a9ee20c commit b734e3b

File tree

8 files changed

+64
-68
lines changed

8 files changed

+64
-68
lines changed
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
//
2-
// _dclass.c
3-
//
4-
// Copyright (c) 2024 Timo Kreuzer
5-
//
6-
// Implementation of _dclass.
7-
//
8-
// SPDX-License-Identifier: MIT
9-
//
1+
/*
2+
* PROJECT: ReactOS CRT
3+
* LICENSE: MIT (https://spdx.org/licenses/MIT)
4+
* PURPOSE: Implementation of _dclass.
5+
* COPYRIGHT: Copyright 2025 Timo Kreuzer <[email protected]>
6+
*/
107

118
#include <math.h>
129
#include <stdint.h>
1310

1411
#if defined(_MSC_VER) && (_MSC_VER >= 1922)
12+
_Check_return_ short __cdecl _dclass(_In_ double _X);
1513
#pragma function(_dclass)
1614
#endif
1715

sdk/lib/crt/math/_dtest.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* PROJECT: ReactOS CRT
3+
* LICENSE: MIT (https://spdx.org/licenses/MIT)
4+
* PURPOSE: Implementation of _dtest.
5+
* COPYRIGHT: Copyright 2025 Timo Kreuzer <[email protected]>
6+
*/
7+
8+
#include <math.h>
9+
10+
_Check_return_ short __cdecl _dclass(_In_ double _X);
11+
12+
#if defined(_MSC_VER) && (_MSC_VER >= 1922)
13+
_Check_return_ short __cdecl _dtest(_In_ double* _Px);
14+
#pragma function(_dtest)
15+
#endif
16+
17+
_Check_return_
18+
short
19+
__cdecl
20+
_dtest(_In_ double* _Px)
21+
{
22+
return _dclass(*_Px);
23+
}
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
//
2-
// _fdclass.c
3-
//
4-
// Copyright (c) 2024 Timo Kreuzer
5-
//
6-
// Implementation of _fdclass.
7-
//
8-
// SPDX-License-Identifier: MIT
9-
//
1+
/*
2+
* PROJECT: ReactOS CRT
3+
* LICENSE: MIT (https://spdx.org/licenses/MIT)
4+
* PURPOSE: Implementation of _fdclass.
5+
* COPYRIGHT: Copyright 2025 Timo Kreuzer <[email protected]>
6+
*/
107

118
#include <math.h>
129
#include <stdint.h>
1310

1411
#if defined(_MSC_VER) && (_MSC_VER >= 1922)
12+
_Check_return_ short __cdecl _fdclass(_In_ float _X);
1513
#pragma function(_fdclass)
1614
#endif
1715

sdk/lib/crt/math/_fdtest.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* PROJECT: ReactOS CRT
3+
* LICENSE: MIT (https://spdx.org/licenses/MIT)
4+
* PURPOSE: Implementation of _fdtest.
5+
* COPYRIGHT: Copyright 2025 Timo Kreuzer <[email protected]>
6+
*/
7+
8+
#include <math.h>
9+
10+
_Check_return_ short __cdecl _fdclass(_In_ float _X);
11+
12+
#if defined(_MSC_VER) && (_MSC_VER >= 1922)
13+
_Check_return_ short __cdecl _fdtest(_In_ float* _Px);
14+
#pragma function(_fdtest)
15+
#endif
16+
17+
_Check_return_
18+
short
19+
__cdecl
20+
_fdtest(_In_ float* _Px)
21+
{
22+
return _fdclass(*_Px);
23+
}

sdk/lib/crt/math/math.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ include_directories(libm_sse2)
33

44
list(APPEND LIBCNTPR_MATH_SOURCE
55
math/_chgsignf.c
6+
math/_dclass.c
67
math/_dsign.c
8+
math/_dtest.c
9+
math/_fdclass.c
710
math/_fdsign.c
11+
math/_fdtest.c
812
math/_finite.c
913
math/_finitef.c
1014
math/_isnan.c

sdk/lib/ucrt/math/_dtest.c

Lines changed: 0 additions & 23 deletions
This file was deleted.

sdk/lib/ucrt/math/_fdtest.c

Lines changed: 0 additions & 23 deletions
This file was deleted.

sdk/lib/ucrt/math/math.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11

22
list(APPEND UCRT_MATH_SOURCES
3-
math/_dclass.c
4-
math/_dtest.c
5-
math/_fdclass.c
6-
math/_fdtest.c
73
math/matherr.cpp
84
)

0 commit comments

Comments
 (0)