Lines Matching refs:num
75 inline bool IsSignallingNaN(double num) { in IsSignallingNaN() argument
76 uint64_t raw = bit_cast<uint64_t>(num); in IsSignallingNaN()
77 if (std::isnan(num) && ((raw & kDQuietNanMask) == 0)) { in IsSignallingNaN()
84 inline bool IsSignallingNaN(float num) { in IsSignallingNaN() argument
85 uint32_t raw = bit_cast<uint32_t>(num); in IsSignallingNaN()
86 if (std::isnan(num) && ((raw & kSQuietNanMask) == 0)) { in IsSignallingNaN()
92 inline bool IsSignallingNaN(float16 num) { in IsSignallingNaN() argument
94 return (float16classify(num) == FP_NAN) && ((num & kFP16QuietNaNMask) == 0); in IsSignallingNaN()
98 inline bool IsQuietNaN(T num) { in IsQuietNaN() argument
99 return std::isnan(num) && !IsSignallingNaN(num); in IsQuietNaN()
104 inline double ToQuietNaN(double num) { in ToQuietNaN() argument
105 DCHECK(std::isnan(num)); in ToQuietNaN()
106 return bit_cast<double>(bit_cast<uint64_t>(num) | kDQuietNanMask); in ToQuietNaN()
110 inline float ToQuietNaN(float num) { in ToQuietNaN() argument
111 DCHECK(std::isnan(num)); in ToQuietNaN()
112 return bit_cast<float>(bit_cast<uint32_t>(num) | in ToQuietNaN()