Lines Matching defs:bits
547 void assert_message_bits(const bool b, const char* const msg, const std::uint32_t bits) {
549 fprintf(stderr, "%s failed for 0x%08zX\n", msg, static_cast<std::size_t>(bits));
557 void assert_message_bits(const bool b, const char* const msg, const std::uint64_t bits) {
560 fprintf(stderr, "%s failed for 0x%016llX\n", msg, static_cast<unsigned long long>(bits));
570 static_assert(FractionBits <= 23, "There are only 23 fraction bits in a float.");
581 * (1U << (23 - FractionBits)); // fraction bits in prefix
612 const UIntType bits = prefix + frac;
613 const FloatingType input = _Bit_cast<FloatingType>(bits);
617 assert_message_bits(to_result.ec == errc{}, "to_result.ec", bits);
623 assert_message_bits(from_result.ptr == last, "from_result.ptr", bits);
624 assert_message_bits(from_result.ec == errc{}, "from_result.ec", bits);
625 assert_message_bits(_Bit_cast<UIntType>(val) == bits, "round-trip", bits);
632 assert_message_bits(fixed_result.ec == errc{}, "fixed_result.ec", bits);
637 assert_message_bits(stdio_ret != -1, "stdio_ret", bits);
639 assert_message_bits(fixed_sv == stdio_sv, "fixed_sv", bits);
652 // These hexits correspond to the explicitly stored fraction bits.
653 // double explicitly stores 52 fraction bits. 52 / 4 == 13, so we need 13 hexits.
654 // float explicitly stores 23 fraction bits. 23 / 4 == 5.75, so we need 6 hexits.
665 const UIntType bits = prefix + frac;
666 const FloatingType input = _Bit_cast<FloatingType>(bits);
669 assert_message_bits(to_result.ec == errc{}, "(hex) to_result.ec", bits);
676 assert_message_bits(from_result.ptr == last, "(hex) from_result.ptr", bits);
677 assert_message_bits(from_result.ec == errc{}, "(hex) from_result.ec", bits);
678 assert_message_bits(_Bit_cast<UIntType>(val) == bits, "(hex) round-trip", bits);
712 const UIntType bits = prefix + frac;
713 const FloatingType input = _Bit_cast<FloatingType>(bits);
716 assert_message_bits(result.ec == errc{}, "to_chars fixed precision", bits);
720 assert_message_bits(stdio_ret != -1, "sprintf_s fixed precision", bits);
723 assert_message_bits(charconv_sv == stdio_sv, "fixed precision output", bits);
727 assert_message_bits(result.ec == errc{}, "to_chars scientific precision", bits);
731 assert_message_bits(stdio_ret != -1, "sprintf_s scientific precision", bits);
734 assert_message_bits(charconv_sv == stdio_sv, "scientific precision output", bits);
738 assert_message_bits(result.ec == errc{}, "to_chars general precision", bits);
742 assert_message_bits(stdio_ret != -1, "sprintf_s general precision", bits);
745 assert_message_bits(charconv_sv == stdio_sv, "general precision output", bits);
855 // The UCRT considers indeterminate NaN to be negative quiet NaN with no payload bits set.