Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
42b13eff
Commit
42b13eff
authored
Jan 30, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Add some C99 floating point comparison macros.
parent
8772b384
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
math.h
include/msvcrt/math.h
+28
-0
No files found.
include/msvcrt/math.h
View file @
42b13eff
...
@@ -342,6 +342,34 @@ static inline int __signbit(double x)
...
@@ -342,6 +342,34 @@ static inline int __signbit(double x)
#endif
#endif
#ifdef _UCRT
_ACRTIMP
int
__cdecl
_dpcomp
(
double
,
double
);
_ACRTIMP
int
__cdecl
_fdpcomp
(
float
,
float
);
#define _FP_LT 1
#define _FP_EQ 2
#define _FP_GT 4
#ifdef __GNUC__
# define isgreater(x, y) __builtin_isgreater(x, y)
# define isgreaterequal(x, y) __builtin_isgreaterequal(x, y)
# define isless(x, y) __builtin_isless(x, y)
# define islessequal(x, y) __builtin_islessequal(x, y)
# define islessgreater(x, y) __builtin_islessgreater(x, y)
# define isunordered(x, y) __builtin_isunordered(x, y)
#else
# define __FP_COMPARE(x,y) (sizeof(x) == sizeof(float) && sizeof(y) == sizeof(float) ? _fdpcomp(x,y) : _dpcomp(x,y))
# define isgreater(x, y) ((__FP_COMPARE(x, y) & _FP_GT) != 0)
# define isgreaterequal(x, y) ((__FP_COMPARE(x, y) & (_FP_GT|_FP_EQ)) != 0)
# define isless(x, y) ((__FP_COMPARE(x, y) & _FP_LT) != 0)
# define islessequal(x, y) ((__FP_COMPARE(x, y) & (_FP_LT|_FP_EQ)) != 0)
# define islessgreater(x, y) ((__FP_COMPARE(x, y) & (_FP_LT|_FP_GT)) != 0)
# define isunordered(x, y) (!__FP_COMPARE(x, y))
#endif
#endif
/* _UCRT */
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment