ReactOS 0.4.17-dev-1321-g5c122a9
_logbf.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 _logbf
5 * COPYRIGHT: Copyright 2026 Justin Miller <justin.miller@reactos.org>
6 */
7
8#include "libm.h"
9
10/* Every float is a normal double, so the exponent comes out unchanged */
12float
15 _In_ float x)
16{
17 /* Infinities come back unchanged, logb would make -inf positive */
18 if ((asuint(x) & 0x7FFFFFFF) == 0x7F800000)
19 return x;
20
21 return (float)logb((double)x);
22}
_Check_return_ float __cdecl _logbf(_In_ float x)
Definition: _logbf.c:14
#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 uint32_t asuint(float f)
Definition: libm.h:121
#define _Check_return_
Definition: no_sal2.h:60
#define _In_
Definition: no_sal2.h:158