|
Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
|
Range analyzer for tracking value distributions during computation. More...
#include <range_analyzer.hpp>
Public Types | |
| using | value_type = NumberSystem |
Public Member Functions | |
| range_analyzer () | |
| void | reset () |
| Reset all statistics. | |
| void | observe (const NumberSystem &value) |
| Observe a single value. | |
| template<typename Iterator> | |
| void | observe (Iterator begin, Iterator end) |
| Observe multiple values. | |
| template<typename TargetType> | |
| void | checkBounds (const NumberSystem &value) |
| Check if a value would overflow/underflow a target type. | |
| const RangeStatistics & | statistics () const |
| Get collected statistics. | |
| NumberSystem | minValue () const |
| Get observed value range. | |
| NumberSystem | maxValue () const |
| NumberSystem | minAbsValue () const |
| NumberSystem | maxAbsValue () const |
| int | minScale () const |
| Get observed scale (exponent) range. | |
| int | maxScale () const |
| int | ufp () const |
| Convenience alias for POP integration: ufp of the largest observed value. | |
| int | scaleRange () const |
| double | dynamicRangeUtilization () const |
| Calculate dynamic range utilization. | |
| PrecisionRecommendation | recommendPrecision () const |
| Generate precision recommendation. | |
| void | report (std::ostream &ostr) const |
| Report range analysis to stream. | |
| std::string | summary () const |
| Get a one-line summary. | |
Range analyzer for tracking value distributions during computation.
| using sw::universal::range_analyzer< NumberSystem >::value_type = NumberSystem |
|
inline |
|
inline |
Check if a value would overflow/underflow a target type.
|
inline |
Calculate dynamic range utilization.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get observed scale (exponent) range.
|
inline |
Get observed value range.
|
inline |
Observe a single value.
|
inline |
Observe multiple values.
|
inline |
Generate precision recommendation.
|
inline |
Report range analysis to stream.
|
inline |
Reset all statistics.
|
inline |
|
inline |
Get collected statistics.
|
inline |
Get a one-line summary.
|
inline |
Convenience alias for POP integration: ufp of the largest observed value.