Home
last modified time | relevance | path

Searched refs:chars_format (Results 1 – 25 of 36) sorted by relevance

12

/llvm-project-15.0.7/libcxx/test/std/utilities/charconv/charconv.msvc/
H A Ddouble_general_precision_to_chars_test_cases.hpp23 {0.0, chars_format::general, 4, "0"},
24 {-0.0, chars_format::general, 4, "-0"},
31 {1.729, chars_format::general, 4, "1.729"},
55 {0x1p-1022, chars_format::general, 1000,
339 {5.0, chars_format::general, 1, "5"},
353 {5.0, chars_format::general, 2, "5"},
367 {5.0, chars_format::general, 3, "5"},
381 {5.0, chars_format::general, 4, "5"},
395 {5.0, chars_format::general, 5, "5"},
510 {9.0, chars_format::general, 1, "9"},
[all …]
H A Ddouble_scientific_precision_to_chars_test_cases_4.hpp14 {0x0.fffffffffffffp-1022, chars_format::scientific, 766,
24 {0x1.fffffffffffffp-1022, chars_format::scientific, 766,
34 {0x1.fffffffffffffp-1021, chars_format::scientific, 765,
44 {0x1.fffffffffffffp-1020, chars_format::scientific, 765,
54 {0x1.fffffffffffffp-1019, chars_format::scientific, 764,
64 {0x1.fffffffffffffp-1018, chars_format::scientific, 763,
74 {0x1.fffffffffffffp-1017, chars_format::scientific, 763,
84 {0x1.fffffffffffffp-1016, chars_format::scientific, 762,
94 {0x1.fffffffffffffp-1015, chars_format::scientific, 761,
104 {0x1.fffffffffffffp-1014, chars_format::scientific, 761,
[all …]
H A Ddouble_fixed_precision_to_chars_test_cases_3.hpp51 {0x0.63b831e8bd9d7p-1022, chars_format::fixed, 1074,
64 {0x1.8777195166b0cp-1022, chars_format::fixed, 1072,
77 {0x1.4668b84fe57a0p-1021, chars_format::fixed, 1068,
90 {0x1.befe59a615135p-1020, chars_format::fixed, 1072,
103 {0x1.1e3d1ff2f0c7dp-1019, chars_format::fixed, 1071,
116 {0x1.6f434a1f8b19bp-1018, chars_format::fixed, 1070,
129 {0x1.587345c18153ep-1017, chars_format::fixed, 1068,
142 {0x1.f1b6b87277fdep-1016, chars_format::fixed, 1067,
155 {0x1.72a498409980ap-1015, chars_format::fixed, 1066,
168 {0x1.ce91e910d066ap-1014, chars_format::fixed, 1065,
[all …]
H A Ddouble_fixed_precision_to_chars_test_cases_4.hpp14 {0x0.fffffffffffffp-1022, chars_format::fixed, 1074,
27 {0x1.fffffffffffffp-1022, chars_format::fixed, 1074,
40 {0x1.fffffffffffffp-1021, chars_format::fixed, 1073,
53 {0x1.fffffffffffffp-1020, chars_format::fixed, 1072,
66 {0x1.fffffffffffffp-1019, chars_format::fixed, 1071,
79 {0x1.fffffffffffffp-1018, chars_format::fixed, 1070,
92 {0x1.fffffffffffffp-1017, chars_format::fixed, 1069,
105 {0x1.fffffffffffffp-1016, chars_format::fixed, 1068,
118 {0x1.fffffffffffffp-1015, chars_format::fixed, 1067,
131 {0x1.fffffffffffffp-1014, chars_format::fixed, 1066,
[all …]
H A Ddouble_scientific_precision_to_chars_test_cases_3.hpp51 {0x0.63b831e8bd9d7p-1022, chars_format::scientific, 765,
61 {0x1.8777195166b0cp-1022, chars_format::scientific, 764,
71 {0x1.4668b84fe57a0p-1021, chars_format::scientific, 760,
81 {0x1.befe59a615135p-1020, chars_format::scientific, 765,
91 {0x1.1e3d1ff2f0c7dp-1019, chars_format::scientific, 764,
101 {0x1.6f434a1f8b19bp-1018, chars_format::scientific, 763,
111 {0x1.587345c18153ep-1017, chars_format::scientific, 761,
121 {0x1.f1b6b87277fdep-1016, chars_format::scientific, 761,
131 {0x1.72a498409980ap-1015, chars_format::scientific, 760,
141 {0x1.ce91e910d066ap-1014, chars_format::scientific, 760,
[all …]
H A Ddouble_to_chars_test_cases.hpp61 {0.0, chars_format::fixed, "0"},
85 {0.0, chars_format{}, "0"},
86 {-0.0, chars_format{}, "-0"},
1853 {1e84, chars_format::fixed,
1855 {1e85, chars_format::fixed,
1857 {1e86, chars_format::fixed,
1859 {1e87, chars_format::fixed,
1861 {1e88, chars_format::fixed,
1863 {1e89, chars_format::fixed,
1865 {1e90, chars_format::fixed,
[all …]
H A Dfloat_general_precision_to_chars_test_cases.hpp23 {0.0f, chars_format::general, 4, "0"},
24 {-0.0f, chars_format::general, 4, "-0"},
42 {0x1p-126f, chars_format::general, 1000,
233 {5.0f, chars_format::general, 1, "5"},
247 {5.0f, chars_format::general, 2, "5"},
261 {5.0f, chars_format::general, 3, "5"},
275 {5.0f, chars_format::general, 4, "5"},
289 {5.0f, chars_format::general, 5, "5"},
404 {9.0f, chars_format::general, 1, "9"},
405 {9.0f, chars_format::general, 2, "9"},
[all …]
H A Dfloat_fixed_precision_to_chars_test_cases.hpp85 {1e-44f, chars_format::fixed, 149,
89 {1e-43f, chars_format::fixed, 149,
93 {1e-42f, chars_format::fixed, 148,
97 {1e-41f, chars_format::fixed, 144,
101 {1e-40f, chars_format::fixed, 148,
105 {1e-39f, chars_format::fixed, 146,
167 {1e-23f, chars_format::fixed, 99,
169 {1e-22f, chars_format::fixed, 97,
171 {1e-21f, chars_format::fixed, 88,
173 {1e-20f, chars_format::fixed, 87,
[all …]
H A Ddouble_scientific_precision_to_chars_test_cases_2.hpp50 {1e-323, chars_format::scientific, 749,
60 {1e-322, chars_format::scientific, 749,
70 {1e-321, chars_format::scientific, 751,
80 {1e-320, chars_format::scientific, 750,
90 {1e-319, chars_format::scientific, 750,
100 {1e-318, chars_format::scientific, 754,
110 {1e-317, chars_format::scientific, 757,
120 {1e-316, chars_format::scientific, 757,
130 {1e-315, chars_format::scientific, 758,
140 {1e-314, chars_format::scientific, 759,
[all …]
H A Ddouble_fixed_precision_to_chars_test_cases_2.hpp50 {1e-323, chars_format::fixed, 1073,
63 {1e-322, chars_format::fixed, 1072,
76 {1e-321, chars_format::fixed, 1073,
89 {1e-320, chars_format::fixed, 1071,
102 {1e-319, chars_format::fixed, 1070,
115 {1e-318, chars_format::fixed, 1073,
128 {1e-317, chars_format::fixed, 1074,
2714 {1e+80, chars_format::fixed, 0,
2716 {1e+81, chars_format::fixed, 0,
2718 {1e+82, chars_format::fixed, 0,
[all …]
H A Dfloat_scientific_precision_to_chars_test_cases.hpp83 {1e-44f, chars_format::scientific, 104,
87 {1e-43f, chars_format::scientific, 105,
91 {1e-42f, chars_format::scientific, 106,
125 {1e-33f, chars_format::scientific, 98,
127 {1e-32f, chars_format::scientific, 98,
129 {1e-31f, chars_format::scientific, 94,
131 {1e-30f, chars_format::scientific, 88,
133 {1e-29f, chars_format::scientific, 88,
135 {1e-28f, chars_format::scientific, 88,
137 {1e-27f, chars_format::scientific, 85,
[all …]
H A Dfloat_to_chars_test_cases.hpp61 {0.0f, chars_format::fixed, "0"},
62 {-0.0f, chars_format::fixed, "-0"},
85 {0.0f, chars_format{}, "0"},
86 {-0.0f, chars_format{}, "-0"},
93 {2.018f, chars_format{}, "2.018"},
97 {0.0f, chars_format::hex, "0p+0"},
475 {1e-1f, chars_format{}, "0.1"},
476 {1e0f, chars_format{}, "1"},
477 {1e1f, chars_format{}, "10"},
478 {1e2f, chars_format{}, "100"},
[all …]
H A Ddouble_scientific_precision_to_chars_test_cases_1.hpp67 {0.0, chars_format::scientific, 2, "0.00e+00"},
68 {0.0, chars_format::scientific, 1, "0.0e+00"},
69 {0.0, chars_format::scientific, 0, "0e+00"},
100 {0x1p-1022, chars_format::scientific, 714,
118 {2.5, chars_format::scientific, 0, "2e+00"},
120 {3.5, chars_format::scientific, 0, "4e+00"},
139 {9.5, chars_format::scientific, 0, "1e+01"},
157 {2.41, chars_format::scientific, 0, "2e+00"},
159 {2.51, chars_format::scientific, 0, "3e+00"},
255 {2.9, chars_format::scientific, 0, "3e+00"},
[all …]
H A Ddouble_fixed_precision_to_chars_test_cases_1.hpp67 {0.0, chars_format::fixed, 2, "0.00"},
68 {0.0, chars_format::fixed, 1, "0.0"},
69 {0.0, chars_format::fixed, 0, "0"},
127 {2.5, chars_format::fixed, 0, "2"},
129 {3.5, chars_format::fixed, 0, "4"},
147 {9.5, chars_format::fixed, 0, "10"},
165 {2.41, chars_format::fixed, 0, "2"},
276 {0.9, chars_format::fixed, 0, "1"},
278 {2.9, chars_format::fixed, 0, "3"},
292 {0.4, chars_format::fixed, 0, "0"},
[all …]
H A Ddouble_from_chars_test_cases.hpp625 chars_format::fixed, 1088, errc{}, 0x1.0000000000000p-33},
639 chars_format::fixed, 1089, errc{}, 0x1.0000000000001p-33},
669 chars_format::fixed, 1088, errc{}, 0x1.ffffffffffffep-33},
683 chars_format::fixed, 1089, errc{}, 0x1.fffffffffffffp-33},
712 chars_format::fixed, 1055, errc{}, 0x1.0000000000000p+0},
726 chars_format::fixed, 1056, errc{}, 0x1.0000000000001p+0},
753 chars_format::fixed, 1055, errc{}, 0x1.ffffffffffffep+0},
767 chars_format::fixed, 1056, errc{}, 0x1.fffffffffffffp+0},
793 chars_format::fixed, 1031, errc{}, 0x1.0000000000000p+33},
1088 chars_format::hex, 1020, errc{}, 0x1.0000000000001p+0},
[all …]
H A Ddouble_hex_precision_to_chars_test_cases.hpp14 {0.0, chars_format::hex, 4, "0.0000p+0"},
15 {-0.0, chars_format::hex, 4, "-0.0000p+0"},
16 {double_inf, chars_format::hex, 4, "inf"},
17 {-double_inf, chars_format::hex, 4, "-inf"},
18 {double_nan, chars_format::hex, 4, "nan"},
34 {0x1p-999, chars_format::hex, 0, "1p-999"},
35 {0x1p-99, chars_format::hex, 0, "1p-99"},
36 {0x1p-9, chars_format::hex, 0, "1p-9"},
37 {0x1p+0, chars_format::hex, 0, "1p+0"},
38 {0x1p+9, chars_format::hex, 0, "1p+9"},
[all …]
H A Dfloat_hex_precision_to_chars_test_cases.hpp14 {0.0f, chars_format::hex, 4, "0.0000p+0"},
15 {-0.0f, chars_format::hex, 4, "-0.0000p+0"},
16 {float_inf, chars_format::hex, 4, "inf"},
17 {-float_inf, chars_format::hex, 4, "-inf"},
18 {float_nan, chars_format::hex, 4, "nan"},
33 {0x1p-109f, chars_format::hex, 0, "1p-109"},
34 {0x1p-99f, chars_format::hex, 0, "1p-99"},
35 {0x1p-9f, chars_format::hex, 0, "1p-9"},
36 {0x1p+0f, chars_format::hex, 0, "1p+0"},
37 {0x1p+9f, chars_format::hex, 0, "1p+9"},
[all …]
H A Dfloat_from_chars_test_cases.hpp13 {"1.a0000400", chars_format::hex, 10, errc{}, 0x1.a00004p0f}, // exact
17 {"1.a0000600", chars_format::hex, 10, errc{}, 0x1.a00006p0f}, // exact
22 {"1.0000040", chars_format::hex, 9, errc{}, 0x1.000004p0f}, // exact
26 {"1.0000060", chars_format::hex, 9, errc{}, 0x1.000006p0f}, // exact
34 {"1.0000002980232238769531250000", chars_format::general, 30, errc{},
75 chars_format::scientific, 1006, errc{}, 0x0.000002p-126f},
87 chars_format::scientific, 1006, errc{}, 0x0.000002p-126f},
99 chars_format::scientific, 1006, errc{}, 0x0.000002p-126f},
111 chars_format::scientific, 1006, errc{}, 0x0.000002p-126f},
123 chars_format::scientific, 1006, errc{}, 0x0.000004p-126f},
[all …]
H A Dtest.hpp23 chars_format fmt;
31 chars_format fmt;
37 chars_format fmt;
44 chars_format fmt;
52 chars_format fmt;
58 chars_format fmt;
H A Dtest.cpp110 static_assert((chars_format::scientific & chars_format::fixed) == chars_format{});
111 static_assert((chars_format::scientific & chars_format::hex) == chars_format{});
112 static_assert((chars_format::fixed & chars_format::hex) == chars_format{});
113 static_assert(chars_format::general == (chars_format::fixed | chars_format::scientific));
887 case chars_format::general:
922 case chars_format::scientific:
926 case chars_format::fixed:
930 case chars_format::hex:
980 …for (const auto& fmt : {chars_format::general, chars_format::scientific, chars_format::fixed, char… in all_floating_tests()
1021 if (t.fmt == chars_format{}) { in all_floating_tests()
[all …]
/llvm-project-15.0.7/libcxx/include/__charconv/
H A Dchars_format.h24 enum class _LIBCPP_ENUM_VIS chars_format enum
33 operator~(chars_format __x) {
34 return chars_format(~_VSTD::__to_underlying(__x));
38 operator&(chars_format __x, chars_format __y) {
39 return chars_format(_VSTD::__to_underlying(__x) &
44 operator|(chars_format __x, chars_format __y) {
45 return chars_format(_VSTD::__to_underlying(__x) |
50 operator^(chars_format __x, chars_format __y) {
56 operator&=(chars_format& __x, chars_format __y) {
62 operator|=(chars_format& __x, chars_format __y) {
[all …]
/llvm-project-15.0.7/libcxx/src/
H A Dcharconv.cpp46 …loating_to_chars<_Floating_to_chars_overload::_Plain>(__first, __last, __value, chars_format{}, 0); in to_chars()
50 …loating_to_chars<_Floating_to_chars_overload::_Plain>(__first, __last, __value, chars_format{}, 0); in to_chars()
55 chars_format{}, 0); in to_chars()
58 to_chars_result to_chars(char* __first, char* __last, float __value, chars_format __fmt) { in to_chars()
62 to_chars_result to_chars(char* __first, char* __last, double __value, chars_format __fmt) { in to_chars()
66 to_chars_result to_chars(char* __first, char* __last, long double __value, chars_format __fmt) { in to_chars()
71 to_chars_result to_chars(char* __first, char* __last, float __value, chars_format __fmt, int __prec… in to_chars()
76 to_chars_result to_chars(char* __first, char* __last, double __value, chars_format __fmt, int __pre… in to_chars()
81 to_chars_result to_chars(char* __first, char* __last, long double __value, chars_format __fmt, int … in to_chars()
/llvm-project-15.0.7/libcxx/test/std/utilities/charconv/charconv.syn/
H A Dchars_format.pass.cpp30 using cf = std::chars_format; in test()
64 std::chars_format x;
65 static_assert(std::is_same<std::chars_format, decltype(~x)>::value, "");
66 static_assert(std::is_same<std::chars_format, decltype(x & x)>::value, "");
67 static_assert(std::is_same<std::chars_format, decltype(x | x)>::value, "");
68 static_assert(std::is_same<std::chars_format, decltype(x ^ x)>::value, "");
69 static_assert(std::is_same<std::chars_format&, decltype(x &= x)>::value, "");
70 static_assert(std::is_same<std::chars_format&, decltype(x |= x)>::value, "");
71 static_assert(std::is_same<std::chars_format&, decltype(x ^= x)>::value, "");
/llvm-project-15.0.7/libcxx/src/ryu/
H A Df2s.cpp420 chars_format _Fmt, const uint32_t __ieeeMantissa, const uint32_t __ieeeExponent) { in __to_chars()
427 if (_Fmt == chars_format{}) { in __to_chars()
446 _Fmt = chars_format::fixed; in __to_chars()
448 _Fmt = chars_format::scientific; in __to_chars()
450 } else if (_Fmt == chars_format::general) { in __to_chars()
457 _Fmt = chars_format::fixed; in __to_chars()
459 _Fmt = chars_format::scientific; in __to_chars()
463 if (_Fmt == chars_format::fixed) { in __to_chars()
664 const chars_format _Fmt) { in __f2s_buffered_n()
671 if (_Fmt == chars_format::scientific) { in __f2s_buffered_n()
[all …]
/llvm-project-15.0.7/libcxx/src/include/
H A Dto_chars_floating_point.h560 const auto to_result = to_chars(buf, end(buf), flt, chars_format::scientific, P - 1);
992 …char* _First, char* const _Last, _Floating _Value, const chars_format _Fmt, const int _Precision) …
995 … _LIBCPP_ASSERT(_Fmt == chars_format{}, ""); // plain overload must pass chars_format{} internally
997 …_LIBCPP_ASSERT(_Fmt == chars_format::general || _Fmt == chars_format::scientific || _Fmt == chars_…
998 || _Fmt == chars_format::hex,
1053 return _Floating_to_chars_ryu(_First, _Last, _Value, chars_format{});
1055 if (_Fmt == chars_format::hex) {
1062 case chars_format::scientific:
1064 case chars_format::fixed:
1066 case chars_format::general:
[all …]

12