Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenWalnut Core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
44
Issues
44
List
Boards
Labels
Service Desk
Milestones
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
694552ce
Commit
694552ce
authored
Aug 16, 2017
by
Stefan Philips
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ADD] Further definitions for numerical limits
parent
ce8e2e7f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
src/core/common/WLimits.cpp
src/core/common/WLimits.cpp
+10
-0
src/core/common/WLimits.h
src/core/common/WLimits.h
+14
-0
No files found.
src/core/common/WLimits.cpp
View file @
694552ce
...
...
@@ -32,7 +32,17 @@ namespace wlimits
const
float
MAX_FLOAT
=
std
::
numeric_limits
<
float
>::
max
();
const
size_t
MAX_SIZE_T
=
std
::
numeric_limits
<
size_t
>::
max
();
const
int32_t
MAX_INT32_T
=
std
::
numeric_limits
<
int32_t
>::
max
();
const
double
MIN_DOUBLE
=
std
::
numeric_limits
<
double
>::
min
();
const
float
MIN_FLOAT
=
std
::
numeric_limits
<
float
>::
min
();
const
size_t
MIN_SIZE_T
=
std
::
numeric_limits
<
size_t
>::
min
();
const
int32_t
MIN_INT32_T
=
std
::
numeric_limits
<
int32_t
>::
min
();
const
double
LOWEST_DOUBLE
=
std
::
numeric_limits
<
double
>::
lowest
();
const
float
LOWEST_FLOAT
=
std
::
numeric_limits
<
float
>::
lowest
();
const
size_t
LOWEST_SIZE_T
=
std
::
numeric_limits
<
size_t
>::
lowest
();
const
int32_t
LOWEST_INT32_T
=
std
::
numeric_limits
<
int32_t
>::
lowest
();
const
double
DBL_EPS
=
std
::
numeric_limits
<
double
>::
epsilon
();
const
float
FLT_EPS
=
std
::
numeric_limits
<
float
>::
epsilon
();
}
...
...
src/core/common/WLimits.h
View file @
694552ce
...
...
@@ -46,6 +46,20 @@ namespace wlimits
extern
const
double
MIN_DOUBLE
;
//!< Positive minimum double value
extern
const
float
MIN_FLOAT
;
//!< Positive minimum float value
extern
const
size_t
MIN_SIZE_T
;
//!< Lowest/Minimum size value (equivalent to LOWEST_SIZE_T)
extern
const
int32_t
MIN_INT32_T
;
//!< Lowest/Minimum int32_t value (equivalent to LOWEST_INT32_T)
extern
const
double
LOWEST_DOUBLE
;
//!< Minimum double value
extern
const
float
LOWEST_FLOAT
;
//!< Minimum float value
extern
const
size_t
LOWEST_SIZE_T
;
//!< Lowest/Minimum size value (equivalent to MIN_SIZE_T)
extern
const
int32_t
LOWEST_INT32_T
;
//!< Lowest/Minimum int32_t value (equivalent to MIN_INT32_T)
/**
* Smallest double such: 1.0 + DBL_EPS == 1.0 is still true.
*/
...
...
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