mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 13:23:04 +00:00
[CRT:MATH] Implement _dsign and _dsignf
This commit is contained in:
parent
0e5d6af68e
commit
50028685dc
4 changed files with 44 additions and 2 deletions
20
sdk/lib/crt/math/_dsign.c
Normal file
20
sdk/lib/crt/math/_dsign.c
Normal file
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* PROJECT: ReactOS CRT
|
||||
* LICENSE: MIT (https://spdx.org/licenses/MIT)
|
||||
* PURPOSE: Implementation of _dsign.
|
||||
* COPYRIGHT: Copyright 2025 Timo Kreuzer <timo.kreuzer@reactos.org>
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
|
||||
_Check_return_
|
||||
int
|
||||
__cdecl
|
||||
_dsign(_In_ double _X)
|
||||
{
|
||||
union { double f; uint64_t ui64; } u = { _X };
|
||||
|
||||
// This is what Windows returns
|
||||
return (u.ui64 >> 48) & 0x8000;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue