For floating point, seed the running min/max with +/-infinity rather than the largest/smallest finite value: a finite seed is not an identity for min/max once the data contains infinities, so an all-+Inf (resp. all--Inf) column would otherwise never displace the seed and report a finite bound.
| 92 | // min/max once the data contains infinities, so an all-+Inf (resp. all--Inf) |
| 93 | // column would otherwise never displace the seed and report a finite bound. |
| 94 | constexpr static T DefaultMin() { |
| 95 | if constexpr (std::is_floating_point_v<T>) { |
| 96 | return std::numeric_limits<T>::infinity(); |
| 97 | } else { |
| 98 | return std::numeric_limits<T>::max(); |
| 99 | } |
| 100 | } |
| 101 | constexpr static T DefaultMax() { |
| 102 | if constexpr (std::is_floating_point_v<T>) { |
| 103 | return -std::numeric_limits<T>::infinity(); |
nothing calls this directly
no outgoing calls
no test coverage detected