diff options
author | Erik Schnetter <schnetter@gmail.com> | 2014-06-07 16:01:42 -0400 |
---|---|---|
committer | Erik Schnetter <schnetter@gmail.com> | 2014-06-07 16:01:42 -0400 |
commit | d986ee7ec52e34bd5276bd42047f1ed94e27321a (patch) | |
tree | 6aeba7a44112aa394a8df2d15995f012a5ba9588 /floatprops.h | |
parent | 6421332c045c18ee2821071b8365c60eeee45a54 (diff) | |
download | vecmathlib-d986ee7ec52e34bd5276bd42047f1ed94e27321a.zip vecmathlib-d986ee7ec52e34bd5276bd42047f1ed94e27321a.tar.gz |
Add constants for infinity and nan to floating point properties
Diffstat (limited to 'floatprops.h')
-rw-r--r-- | floatprops.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/floatprops.h b/floatprops.h index 3a99a95..992f999 100644 --- a/floatprops.h +++ b/floatprops.h @@ -26,6 +26,8 @@ namespace vecmathlib { // epsilon // min_exponent // max_exponent + // infinity + // quiet_NaN }; @@ -46,6 +48,8 @@ namespace vecmathlib { static real_t epsilon() { __builtin_unreachable(); } static int const min_exponent = -6; static int const max_exponent = 7; + static real_t infinity() { __builtin_unreachable(); } + static real_t quiet_NaN() { __builtin_unreachable(); } // Ensure the sizes match static_assert(sizeof(real_t) == sizeof(int_t), "int_t has wrong size"); @@ -112,6 +116,8 @@ namespace vecmathlib { static real_t epsilon() { __builtin_unreachable(); } static int const min_exponent = -14; static int const max_exponent = 15; + static real_t infinity() { __builtin_unreachable(); } + static real_t quiet_NaN() { __builtin_unreachable(); } // Ensure the sizes match static_assert(sizeof(real_t) == sizeof(int_t), "int_t has wrong size"); |