Skip to content

Commit a7b4eb4

Browse files
committed
Improve comments
1 parent e2b34c0 commit a7b4eb4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

examples/debugger.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,24 @@
1414
template <typename T>
1515
void debug_values()
1616
{
17+
// Displays the maximum and minimum values that the type can hold
18+
// from numeric_limits
1719
const T max {std::numeric_limits<T>::max()};
1820
const T min {std::numeric_limits<T>::min()};
21+
22+
// A number whose representation will change based on IEEE vs fast type
23+
// In the IEEE case 3.140e+00 will be displayed as the pretty printer is cohort preserving
1924
const T short_num {"3.140"};
25+
26+
// Shows how infinities will be displayed
2027
const T pos_inf {std::numeric_limits<T>::infinity()};
2128
const T neg_inf {-std::numeric_limits<T>::infinity()};
2229

30+
// Shows how the different kinds of NANs will be displayed
2331
const T qnan {std::numeric_limits<T>::quiet_NaN()};
2432
const T snan {std::numeric_limits<T>::signaling_NaN()};
2533

34+
// Shows how a payload added to a QNAN will be displayed
2635
const T payload_nan {boost::decimal::nan<T>("7")};
2736

2837
// Break Here:

0 commit comments

Comments
 (0)