MCPcopy Create free account
hub / github.com/cwida/ALP / is_impossible_to_encode

Method is_impossible_to_encode

include/alp/encoder.hpp:75–78  ·  view source on GitHub ↗

* Check for special values which are impossible for ALP to encode * because they cannot be cast to int64 without an undefined behaviour */

Source from the content-addressed store, hash-verified

73 * because they cannot be cast to int64 without an undefined behaviour
74 */
75 static inline bool is_impossible_to_encode(const PT n) {
76 return !std::isfinite(n) || std::isnan(n) || n > ENCODING_UPPER_LIMIT || n < ENCODING_LOWER_LIMIT ||
77 (n == 0.0 && std::signbit(n)); //! Verification for -0.0
78 }
79
80 //! Scalar encoding a single value with ALP
81 template <bool SAFE = true>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected