VirtualBox

source: vbox/trunk/include/iprt/nocrt/float.h@ 95975

Last change on this file since 95975 was 95975, checked in by vboxsync, 3 years ago

include/iprt/nocrt: Prototyped a whole bunch of things to make mesa (almost) compile. bugref:10261

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
1/** @file
2 * IPRT / No-CRT - Our minimal float.h.
3 */
4
5/*
6 * Copyright (C) 2022 Oracle Corporation
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
21 *
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
24 */
25
26#ifndef IPRT_INCLUDED_nocrt_float_h
27#define IPRT_INCLUDED_nocrt_float_h
28#ifndef RT_WITHOUT_PRAGMA_ONCE
29# pragma once
30#endif
31
32#include <iprt/types.h>
33
34/*
35 * Common.
36 */
37#define FLT_RADIX 2
38
39
40/*
41 * float
42 */
43#if defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64) || defined(RT_ARCH_ARM64)
44
45# define FLT_MAX (3.40282347E+38F)
46# define FLT_MIN (1.17549435E-38F)
47# define FLT_MAX_EXP (128)
48# define FLT_MIN_EXP (-125)
49# define FLT_EPSILON (1.192092896E-07F)
50
51#endif
52
53/*
54 * double
55 */
56#if defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64) || defined(RT_ARCH_ARM64)
57
58# define DBL_MAX (1.7976931348623157E+308)
59# define DBL_MIN (2.2250738585072014E-308)
60# define DBL_MAX_EXP (1024)
61# define DBL_MIN_EXP (-1021)
62# define DBL_EPSILON (2.2204460492503131E-16)
63
64#endif
65
66/*
67 * long double
68 */
69#if (defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64)) && defined(RT_OS_WINDOWS)
70# define LDBL_MAX DBL_MAX
71# define LDBL_MIN DBL_MIN
72# define LDBL_MAX_EXP DBL_MAX_EXP
73# define LDBL_MIN_EXP DBL_MIN_EXP
74# define LDBL_EPSIOLON DBL_EPSIOLON
75#endif
76
77
78#endif /* !IPRT_INCLUDED_nocrt_float_h */
79
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette