ReactOS 0.4.17-dev-1321-g5c122a9
_logb.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS CRT
3 * LICENSE: MIT (https://spdx.org/licenses/MIT)
4 * PURPOSE: Implementation of _logb
5 * COPYRIGHT: Copyright 2026 Justin Miller <justin.miller@reactos.org>
6 */
7
8#include "libm.h"
9
11double
14 _In_ double x)
15{
16 /* Infinities come back unchanged, logb would make -inf positive */
17 if ((asuint64(x) & 0x7FFFFFFFFFFFFFFFULL) == 0x7FF0000000000000ULL)
18 return x;
19
20 return logb(x);
21}
_Check_return_ double __cdecl _logb(_In_ double x)
Definition: _logb.c:13
#define __cdecl
Definition: corecrt.h:121
_ACRTIMP double __cdecl logb(double)
Definition: mingw_math.h:243
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static uint64_t asuint64(double f)
Definition: libm.h:135
#define _Check_return_
Definition: no_sal2.h:60
#define _In_
Definition: no_sal2.h:158