mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 15:33:12 +00:00
[CRT:MATH] Implement _finite, _finitef
This commit is contained in:
parent
50028685dc
commit
e01231bd49
5 changed files with 41 additions and 17 deletions
19
sdk/lib/crt/math/_finitef.c
Normal file
19
sdk/lib/crt/math/_finitef.c
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* PROJECT: ReactOS CRT
|
||||
* LICENSE: MIT (https://spdx.org/licenses/MIT)
|
||||
* PURPOSE: Implementation of _finitef.
|
||||
* COPYRIGHT: Copyright 2025 Timo Kreuzer <timo.kreuzer@reactos.org>
|
||||
*/
|
||||
|
||||
#include <float.h>
|
||||
#include <stdint.h>
|
||||
|
||||
_Check_return_
|
||||
int
|
||||
__cdecl
|
||||
_finitef(_In_ float _X)
|
||||
{
|
||||
union { float f; uint32_t ui32; } u = { _X };
|
||||
uint32_t exp = u.ui32 & 0x7F800000;
|
||||
return (exp != 0x7F800000);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue