/usr/include/ITK-4.5/emulation/vcl_limits.h is in libinsighttoolkit4-dev 4.5.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 | // This is vcl/emulation/vcl_limits.h
#ifndef emulation_vcl_limits_h_
#define emulation_vcl_limits_h_
#ifdef VCL_NEEDS_PRAGMA_INTERFACE
#pragma interface
#endif
//:
// \file
// \brief Standard limits for numeric datatypes
//
// Implementation of the May 96 ANSI Draft Working Paper (DWP)
// numeric_limits class. Numbering in
// the documentation below refers to section 18.2 of the DWP.
//
// \author Andrew W. Fitzgibbon, Oxford RRG
// \date 28 Aug 96
//
// \verbatim
// Modifications
// LSB (Manchester) 23/3/01 Documentation tidied
// Feb.2002 - Peter Vanroose - brief doxygen comment placed on single line
// Jan.2003 - Peter Vanroose - bug fix in infinity() and NaN(): LITTLE_ENDIAN
// \endverbatim
//
//-----------------------------------------------------------------------------
#include <vcl_compiler.h>
//: 18.2.1.3 Type float_round_style [lib.round.style]
enum vcl_float_round_style {
vcl_round_indeterminate = -1,
vcl_round_toward_zero = 0,
vcl_round_to_nearest = 1,
vcl_round_toward_infinity = 2,
vcl_round_toward_neg_infinity = 3
};
#ifdef infinity
# error
#endif
//: Standard limits for numeric datatypes
// Implementation of the May 96 ANSI Draft Working Paper (DWP)
// numeric_limits class. Numbering in
// the documentation below refers to section 18.2 of the DWP.
//
// When specializing this class, note that 9.4.2 in the '98 C++
// standard requires that the static constants be defined
// somewhere. (See vcl_numeric_limits.cxx)
//
template<class T>
class vcl_numeric_limits
{
public:
//: Distinguishes between scalar types, which have specialisations, and non-scalar types, which don't.
static const bool is_specialized;
//: Minimum finite value.
// Equivalent to CHAR_MIN, SHRT_MIN, FLT_MIN, DBL_MIN, etc.
//
// For floating types with denormalization, returns the minimum positive
// normalized value, denorm_min().
//
// Meaningful for all specializations in which is_bounded == true, or
// is_bounded == false && is_signed == false.
static T min();
//: Maximum finite value.
// Equivalent to CHAR_MAX, SHRT_MAX, FLT_MAX, DBL_MAX, etc.
// Meaningful for all specializations in which is_bounded == true.
static T max();
//: Number of radix digits which can be represented without change.
// For built-in integer types, the number of non-sign bits in the representation.
// For floating point types, the number of radix digits in the mantissa.
// Equivalent to FLT_MANT_DIG, DBL_MANT_DIG, LDBL_MANT_DIG.
static const int digits;
//: Number of base 10 digits which can be represented without change.
// Equivalent to FLT_DIG, DBL_DIG, LDBL_DIG.
// Meaningful for all specializations in which is_bounded == true.
static const int digits10;
//: True if the type is signed.
static const bool is_signed;
//: True if the type is integer
static const bool is_integer;
//: True if the type uses an exact representation.
// All integer types are exact, but not vice versa.
// For example, rational and fixed-exponent
// representations are exact but not integer.
static const bool is_exact;
//:
// For floating types, specifies the base or radix of the exponent
// representation (often 2). Equivalent to FLT_RADIX.
// For integer types, specifies the base of the representation -
// distinguishes types with bases other than 2 (e.g. BCD).
static const int radix;
//: Machine epsilon.
// The difference between 1 and the least value greater
// than 1 that is representable. Equivalent to FLT_EPSILON, DBL_EPSILON,
// LDBL_EPSILON.
// Meaningful only for floating point types.
static T epsilon();
//: Measure of the maximum rounding error.
// This has a precise definition in
// the Language Independent Arithmetic (LIA-1) standard. Required by LIA-1.
static T round_error();
//: Minimum negative integer such that radix raised to that power is in range.
// Equivalent to FLT_MIN_EXP, DBL_MIN_EXP, LDBL_MIN_EXP.
// Meaningful only for floating point types.
static const int min_exponent;
//: Minimum negative integer such that 10 raised to that power is in range.
// Equivalent to FLT_MIN_10_EXP, DBL_MIN_10_EXP, LDBL_MIN_10_EXP.
// Meaningful only for floating point types.
static const int min_exponent10;
//: Maximum positive integer such that radix raised to that power is in range.
// Equivalent to FLT_MAX_EXP, DBL_MAX_EXP, LDBL_MAX_EXP.
// Meaningful only for floating point types.
static const int max_exponent;
//: Maximum positive integer such that 10 raised to that power is in range.
// Equivalent to FLT_MAX_10_EXP, DBL_MAX_10_EXP, LDBL_MAX_10_EXP.
// Meaningful only for floating point types.
static const int max_exponent10;
//: True if the type has a representation for positive infinity.
// Meaningful only for floating point types.
// Shall be true for all specializations in which is_iec559 == true.
static const bool has_infinity;
//: True if the type has a representation for a quiet (non-signaling).
// ``Not a Number.''. RLIA
// Meaningful only for floating point types.
// Shall be true for all specializations in which is_iec559 == true.
static const bool has_quiet_NaN;
//: True if the type has a representation for a signaling.
// ``Not a Number.''.
// Meaningful only for floating point types.
// Shall be true for all specializations in which is_iec559 == true.
static const bool has_signaling_NaN;
//: True if the type allows denormalized values (variable number of exponent bits).
// Meaningful only for floating point types.
static const bool has_denorm;
//: Representation of positive infinity, if available.
static T infinity();
//: Representation of a quiet ``Not a Number,'' if available.
static T quiet_NaN();
//: Representation of a signaling ``Not a Number,'' if available.
static T signaling_NaN();
//: Minimum positive denormalized value.
// Meaningful for all floating point types.
// In specializations for which has_denorm == false, returns the minimum
// positive normalized value.
// For types with has_denorm == false, the member denorm_min() shall
// return the same value as the member min().
static T denorm_min();
//: True if and only if the type adheres to IEC 559 standard.
// International Electrotechnical Commission standard 559 is the same as IEEE 754.
static const bool is_iec559;
//: True if the set of values representable by the type is finite.
// All built-in types are bounded, this member would be false for arbitrary
// precision types.
static const bool is_bounded;
//: True if the type is modulo.
// A type is modulo if it is possible to add two positive numbers and have
// a result which wraps around to a third number which is less.
// Generally, this is false for floating types, true for unsigned integers,
// and true for signed integers on most machines.
static const bool is_modulo;
//: True if trapping is implemented for the type.
static const bool traps;
//: True if tinyness is detected before rounding. Refer to IEC 559.
static const bool tinyness_before;
//: The rounding style for the type. Equivalent to FLT_ROUNDS.
// Specializations for integer types shall return round_toward_zero.
static const vcl_float_round_style round_style;
};
// SPECIALIZATIONS :
VCL_DEFINE_SPECIALIZATION
class vcl_numeric_limits<int>
{
public:
static const bool is_specialized VCL_STATIC_CONST_INIT_INT_DECL(true);
inline static int min() { return -0x7fffffff; }
inline static int max() { return 0x7fffffff; }
static const int digits VCL_STATIC_CONST_INIT_INT_DECL(31);
static const int digits10 VCL_STATIC_CONST_INIT_INT_DECL(9);
static const bool is_signed VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_integer VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_exact VCL_STATIC_CONST_INIT_INT_DECL(true);
static const int radix VCL_STATIC_CONST_INIT_INT_DECL(2);
inline static int epsilon() { return 0; }
inline static int round_error() { return 0; }
static const int min_exponent VCL_STATIC_CONST_INIT_INT_DECL(-31);
static const int min_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(-9);
static const int max_exponent VCL_STATIC_CONST_INIT_INT_DECL(31);
static const int max_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(9);
static const bool has_infinity VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_quiet_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_signaling_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_denorm VCL_STATIC_CONST_INIT_INT_DECL(false);
static int infinity() { return max(); }
static int quiet_NaN();
static int signaling_NaN();
inline static int denorm_min() { return min(); }
static const bool is_iec559 VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_bounded VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_modulo VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool traps VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool tinyness_before VCL_STATIC_CONST_INIT_INT_DECL(false);
static const vcl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vcl_round_toward_zero);
};
VCL_DEFINE_SPECIALIZATION
class vcl_numeric_limits<unsigned int>
{
public:
static const bool is_specialized VCL_STATIC_CONST_INIT_INT_DECL(true);
inline static unsigned int min() { return 0; }
inline static unsigned int max() { return 0xffffffff; }
static const int digits VCL_STATIC_CONST_INIT_INT_DECL(sizeof(unsigned long) * 8 );
static const int digits10 VCL_STATIC_CONST_INIT_INT_DECL( (digits * 301) / 1000 );
static const bool is_signed VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_integer VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_exact VCL_STATIC_CONST_INIT_INT_DECL(true);
static const int radix VCL_STATIC_CONST_INIT_INT_DECL(2);
inline static int epsilon() { return 0; }
inline static int round_error() { return 0; }
static const int min_exponent VCL_STATIC_CONST_INIT_INT_DECL(-31);
static const int min_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(-9);
static const int max_exponent VCL_STATIC_CONST_INIT_INT_DECL(31);
static const int max_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(9);
static const bool has_infinity VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_quiet_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_signaling_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_denorm VCL_STATIC_CONST_INIT_INT_DECL(false);
static int infinity() { return max(); }
static int quiet_NaN();
static int signaling_NaN();
inline static int denorm_min() { return min(); }
static const bool is_iec559 VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_bounded VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_modulo VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool traps VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool tinyness_before VCL_STATIC_CONST_INIT_INT_DECL(false);
static const vcl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vcl_round_toward_zero);
};
VCL_DEFINE_SPECIALIZATION
class vcl_numeric_limits<long>
{
public:
static const bool is_specialized VCL_STATIC_CONST_INIT_INT_DECL(true);
inline static int min() { return -0x7fffffff; }
inline static int max() { return 0x7fffffff; }
static const int digits VCL_STATIC_CONST_INIT_INT_DECL(31);
static const int digits10 VCL_STATIC_CONST_INIT_INT_DECL(9);
static const bool is_signed VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_integer VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_exact VCL_STATIC_CONST_INIT_INT_DECL(true);
static const int radix VCL_STATIC_CONST_INIT_INT_DECL(2);
inline static int epsilon() { return 0; }
inline static int round_error() { return 0; }
static const int min_exponent VCL_STATIC_CONST_INIT_INT_DECL(-31);
static const int min_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(-9);
static const int max_exponent VCL_STATIC_CONST_INIT_INT_DECL(31);
static const int max_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(9);
static const bool has_infinity VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_quiet_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_signaling_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_denorm VCL_STATIC_CONST_INIT_INT_DECL(false);
static int infinity() { return max(); }
static int quiet_NaN();
static int signaling_NaN();
inline static int denorm_min() { return min(); }
static const bool is_iec559 VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_bounded VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_modulo VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool traps VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool tinyness_before VCL_STATIC_CONST_INIT_INT_DECL(false);
static const vcl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vcl_round_toward_zero);
};
VCL_DEFINE_SPECIALIZATION
class vcl_numeric_limits<unsigned long>
{
public:
static const bool is_specialized VCL_STATIC_CONST_INIT_INT_DECL(true);
inline static unsigned int min() { return 0; }
inline static unsigned int max() { return 0xffffffff; }
static const int digits VCL_STATIC_CONST_INIT_INT_DECL(sizeof(unsigned long) * 8 );
static const int digits10 VCL_STATIC_CONST_INIT_INT_DECL( (digits * 301) / 1000 );
static const bool is_signed VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_integer VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_exact VCL_STATIC_CONST_INIT_INT_DECL(true);
static const int radix VCL_STATIC_CONST_INIT_INT_DECL(2);
inline static int epsilon() { return 0; }
inline static int round_error() { return 0; }
static const int min_exponent VCL_STATIC_CONST_INIT_INT_DECL(-31);
static const int min_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(-9);
static const int max_exponent VCL_STATIC_CONST_INIT_INT_DECL(31);
static const int max_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(9);
static const bool has_infinity VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_quiet_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_signaling_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_denorm VCL_STATIC_CONST_INIT_INT_DECL(false);
static int infinity() { return max(); }
static int quiet_NaN();
static int signaling_NaN();
inline static int denorm_min() { return min(); }
static const bool is_iec559 VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_bounded VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_modulo VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool traps VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool tinyness_before VCL_STATIC_CONST_INIT_INT_DECL(false);
static const vcl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vcl_round_toward_zero);
};
VCL_DEFINE_SPECIALIZATION
class vcl_numeric_limits<unsigned short >
{
public:
static const bool is_specialized VCL_STATIC_CONST_INIT_INT_DECL(true);
inline static unsigned int min() { return 0; }
inline static unsigned int max() { return 0xffff; }
static const int digits VCL_STATIC_CONST_INIT_INT_DECL(sizeof(unsigned short) * 8 );
static const int digits10 VCL_STATIC_CONST_INIT_INT_DECL( (digits * 301) / 1000 );
static const bool is_signed VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_integer VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_exact VCL_STATIC_CONST_INIT_INT_DECL(true);
static const int radix VCL_STATIC_CONST_INIT_INT_DECL(2);
inline static int epsilon() { return 0; }
inline static int round_error() { return 0; }
static const int min_exponent VCL_STATIC_CONST_INIT_INT_DECL(-31);
static const int min_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(-9);
static const int max_exponent VCL_STATIC_CONST_INIT_INT_DECL(31);
static const int max_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(9);
static const bool has_infinity VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_quiet_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_signaling_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_denorm VCL_STATIC_CONST_INIT_INT_DECL(false);
static int infinity() { return max(); }
static int quiet_NaN();
static int signaling_NaN();
inline static int denorm_min() { return min(); }
static const bool is_iec559 VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_bounded VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_modulo VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool traps VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool tinyness_before VCL_STATIC_CONST_INIT_INT_DECL(false);
static const vcl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vcl_round_toward_zero);
};
VCL_DEFINE_SPECIALIZATION
class vcl_numeric_limits<short >
{
public:
static const bool is_specialized VCL_STATIC_CONST_INIT_INT_DECL(true);
inline static int min() { return -0x7fff; }
inline static int max() { return 0x7fff; }
static const int digits VCL_STATIC_CONST_INIT_INT_DECL(15);
static const int digits10 VCL_STATIC_CONST_INIT_INT_DECL(5);
static const bool is_signed VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_integer VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_exact VCL_STATIC_CONST_INIT_INT_DECL(true);
static const int radix VCL_STATIC_CONST_INIT_INT_DECL(2);
inline static int epsilon() { return 0; }
inline static int round_error() { return 0; }
static const int min_exponent VCL_STATIC_CONST_INIT_INT_DECL(-15);
static const int min_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(-5);
static const int max_exponent VCL_STATIC_CONST_INIT_INT_DECL(15);
static const int max_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(5);
static const bool has_infinity VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_quiet_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_signaling_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_denorm VCL_STATIC_CONST_INIT_INT_DECL(false);
static int infinity() { return max(); }
static int quiet_NaN();
static int signaling_NaN();
inline static int denorm_min() { return min(); }
static const bool is_iec559 VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_bounded VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_modulo VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool traps VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool tinyness_before VCL_STATIC_CONST_INIT_INT_DECL(false);
static const vcl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vcl_round_toward_zero);
};
VCL_DEFINE_SPECIALIZATION
class vcl_numeric_limits<signed char >
{
public:
static const bool is_specialized VCL_STATIC_CONST_INIT_INT_DECL(true);
inline static int min() { return -0x80; }
inline static int max() { return 0x7f; }
static const int digits VCL_STATIC_CONST_INIT_INT_DECL(7);
static const int digits10 VCL_STATIC_CONST_INIT_INT_DECL(3);
static const bool is_signed VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_integer VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_exact VCL_STATIC_CONST_INIT_INT_DECL(true);
static const int radix VCL_STATIC_CONST_INIT_INT_DECL(2);
inline static int epsilon() { return 0; }
inline static int round_error() { return 0; }
static const int min_exponent VCL_STATIC_CONST_INIT_INT_DECL(-15);
static const int min_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(-5);
static const int max_exponent VCL_STATIC_CONST_INIT_INT_DECL(15);
static const int max_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(5);
static const bool has_infinity VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_quiet_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_signaling_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_denorm VCL_STATIC_CONST_INIT_INT_DECL(false);
static int infinity() { return max(); }
static int quiet_NaN();
static int signaling_NaN();
inline static int denorm_min() { return min(); }
static const bool is_iec559 VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_bounded VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_modulo VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool traps VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool tinyness_before VCL_STATIC_CONST_INIT_INT_DECL(false);
static const vcl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vcl_round_toward_zero);
};
VCL_DEFINE_SPECIALIZATION
class vcl_numeric_limits<unsigned char >
{
public:
static const bool is_specialized VCL_STATIC_CONST_INIT_INT_DECL(true);
inline static int min() { return 0x0; }
inline static int max() { return 0xff; }
static const int digits VCL_STATIC_CONST_INIT_INT_DECL(8);
static const int digits10 VCL_STATIC_CONST_INIT_INT_DECL(3);
static const bool is_signed VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_integer VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_exact VCL_STATIC_CONST_INIT_INT_DECL(true);
static const int radix VCL_STATIC_CONST_INIT_INT_DECL(2);
inline static int epsilon() { return 0; }
inline static int round_error() { return 0; }
static const int min_exponent VCL_STATIC_CONST_INIT_INT_DECL(-15);
static const int min_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(-5);
static const int max_exponent VCL_STATIC_CONST_INIT_INT_DECL(15);
static const int max_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(5);
static const bool has_infinity VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_quiet_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_signaling_NaN VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool has_denorm VCL_STATIC_CONST_INIT_INT_DECL(false);
static int infinity() { return max(); }
static int quiet_NaN();
static int signaling_NaN();
inline static int denorm_min() { return min(); }
static const bool is_iec559 VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_bounded VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_modulo VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool traps VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool tinyness_before VCL_STATIC_CONST_INIT_INT_DECL(false);
static const vcl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vcl_round_toward_zero);
};
#if VCL_CHAR_IS_SIGNED
VCL_DEFINE_SPECIALIZATION
class vcl_numeric_limits<char>: public vcl_numeric_limits<signed char> {};
#else
VCL_DEFINE_SPECIALIZATION
class vcl_numeric_limits<char>: public vcl_numeric_limits<unsigned char> {};
#endif
// IEEE 754 single precision
VCL_DEFINE_SPECIALIZATION
class vcl_numeric_limits<float>
{
public:
static const bool is_specialized VCL_STATIC_CONST_INIT_INT_DECL(true);
inline static float min() { return 1.17549435E-38F; }
inline static float max() { return 3.40282347E+38F; }
static const int digits VCL_STATIC_CONST_INIT_INT_DECL(24);
static const int digits10 VCL_STATIC_CONST_INIT_INT_DECL(6);
static const bool is_signed VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_integer VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_exact VCL_STATIC_CONST_INIT_INT_DECL(false);
static const int radix VCL_STATIC_CONST_INIT_INT_DECL(2);
inline static float epsilon() { return 1.19209290E-07F; }
inline static float round_error() { return 0.5F; }
static const int min_exponent VCL_STATIC_CONST_INIT_INT_DECL(-125);
static const int min_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(-37);
static const int max_exponent VCL_STATIC_CONST_INIT_INT_DECL(128);
static const int max_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(38);
static const bool has_infinity VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool has_quiet_NaN VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool has_signaling_NaN VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool has_denorm VCL_STATIC_CONST_INIT_INT_DECL(false);
static float infinity();
static float quiet_NaN();
static float signaling_NaN();
inline static float denorm_min() { return min(); }
static const bool is_iec559 VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_bounded VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_modulo VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool traps VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool tinyness_before VCL_STATIC_CONST_INIT_INT_DECL(true);
static const vcl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vcl_round_to_nearest);
};
// IEEE 754 double precision with denorm
VCL_DEFINE_SPECIALIZATION
class vcl_numeric_limits<double>
{
public:
static const bool is_specialized VCL_STATIC_CONST_INIT_INT_DECL(true);
inline static double min() { return 2.2250738585072014e-308; }
inline static double max() { return 1.7976931348623157e+308; }
static const int digits VCL_STATIC_CONST_INIT_INT_DECL(53);
static const int digits10 VCL_STATIC_CONST_INIT_INT_DECL(15);
static const bool is_signed VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_integer VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_exact VCL_STATIC_CONST_INIT_INT_DECL(false);
static const int radix VCL_STATIC_CONST_INIT_INT_DECL(2);
inline static double epsilon() { return 2.220446049250313e-16; }
inline static double round_error() { return 0.5; }
static const int min_exponent VCL_STATIC_CONST_INIT_INT_DECL(-1021);
static const int min_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(-307);
static const int max_exponent VCL_STATIC_CONST_INIT_INT_DECL(1024);
static const int max_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(308);
static const bool has_infinity VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool has_quiet_NaN VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool has_signaling_NaN VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool has_denorm VCL_STATIC_CONST_INIT_INT_DECL(false);
static double infinity();
static double quiet_NaN();
static double signaling_NaN();
inline static double denorm_min() { return /* 5e-324 */ min(); }
static const bool is_iec559 VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_bounded VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_modulo VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool traps VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool tinyness_before VCL_STATIC_CONST_INIT_INT_DECL(true);
static const vcl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vcl_round_to_nearest);
};
VCL_DEFINE_SPECIALIZATION
class vcl_numeric_limits<long double>
{
public:
static const bool is_specialized VCL_STATIC_CONST_INIT_INT_DECL(true);
inline static long double max() { return 1.7976931348623157e+308; }
inline static long double min() { return 2.2250738585072014e-308; }
inline static long double denorm_min() { return min(); }
static const int digits VCL_STATIC_CONST_INIT_INT_DECL(53);
static const int digits10 VCL_STATIC_CONST_INIT_INT_DECL(15);
static const bool is_signed VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_integer VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool is_exact VCL_STATIC_CONST_INIT_INT_DECL(false);
static const int radix VCL_STATIC_CONST_INIT_INT_DECL(2);
inline static long double epsilon() { return 2.220446049250313e-16; } // TODO: should become dependent of sizeof(long double)
inline static long double round_error() { return 0.5; }
static const int min_exponent VCL_STATIC_CONST_INIT_INT_DECL(-1021);
static const int min_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(-307);
static const int max_exponent VCL_STATIC_CONST_INIT_INT_DECL(1024);
static const int max_exponent10 VCL_STATIC_CONST_INIT_INT_DECL(308);
static const bool has_infinity VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool has_quiet_NaN VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool has_signaling_NaN VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool has_denorm VCL_STATIC_CONST_INIT_INT_DECL(false);
static long double infinity();
static long double quiet_NaN();
static long double signaling_NaN();
static const bool is_iec559 VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_bounded VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool is_modulo VCL_STATIC_CONST_INIT_INT_DECL(false);
static const bool traps VCL_STATIC_CONST_INIT_INT_DECL(true);
static const bool tinyness_before VCL_STATIC_CONST_INIT_INT_DECL(true);
static const vcl_float_round_style round_style VCL_STATIC_CONST_INIT_INT_DECL(vcl_round_to_nearest);
};
#endif // emulation_vcl_limits_h_
|