File tree Expand file tree Collapse file tree 4 files changed +44
-2
lines changed
Expand file tree Collapse file tree 4 files changed +44
-2
lines changed Original file line number Diff line number Diff line change 306306@ cdecl - stub _dpcomp (double double )
307307@ cdecl - stub _dpoly (double ptr long )
308308@ cdecl - stub _dscale (ptr long )
309- @ cdecl - stub _dsign (double )
309+ @ cdecl _dsign (double )
310310@ cdecl - stub _dsin (double long )
311311@ cdecl _dtest (ptr )
312312@ cdecl - stub _dunscale (ptr ptr )
349349@ cdecl - stub _fdpcomp (float float )
350350@ cdecl - stub _fdpoly (float ptr long )
351351@ cdecl - stub _fdscale (ptr long )
352- @ cdecl - stub _fdsign (float )
352+ @ cdecl _fdsign (float )
353353@ cdecl - stub _fdsin (float long )
354354@ cdecl _fdtest (ptr )
355355@ cdecl - stub _fdunscale (ptr ptr )
Original file line number Diff line number Diff line change 1+ /*
2+ * PROJECT: ReactOS CRT
3+ * LICENSE: MIT (https://spdx.org/licenses/MIT)
4+ * PURPOSE: Implementation of _dsign.
5+ * COPYRIGHT: Copyright 2025 Timo Kreuzer <[email protected] > 6+ */
7+
8+ #include <math.h>
9+ #include <stdint.h>
10+
11+ _Check_return_
12+ int
13+ __cdecl
14+ _dsign (_In_ double _X )
15+ {
16+ union { double f ; uint64_t ui64 ; } u = { _X };
17+
18+ // This is what Windows returns
19+ return (u .ui64 >> 48 ) & 0x8000 ;
20+ }
Original file line number Diff line number Diff line change 1+ /*
2+ * PROJECT: ReactOS CRT
3+ * LICENSE: MIT (https://spdx.org/licenses/MIT)
4+ * PURPOSE: Implementation of _fdsign.
5+ * COPYRIGHT: Copyright 2025 Timo Kreuzer <[email protected] > 6+ */
7+
8+ #include <math.h>
9+ #include <stdint.h>
10+
11+ _Check_return_
12+ int
13+ __cdecl
14+ _fdsign (_In_ float _X )
15+ {
16+ union { float f ; uint32_t ui32 ; } u = { _X };
17+
18+ // This is what Windows returns
19+ return (u .ui32 >> 16 ) & 0x8000 ;
20+ }
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ include_directories(libm_sse2)
33
44list (APPEND LIBCNTPR_MATH_SOURCE
55 math /_chgsignf.c
6+ math /_dsign.c
7+ math /_fdsign.c
68 math /_invoke_matherr.c
79 math /abs.c
810 math /div.c
You can’t perform that action at this time.
0 commit comments