Home
last modified time | relevance | path

Searched refs:radix (Results 1 – 25 of 63) sorted by relevance

123

/llvm-project-15.0.7/llvm/test/tools/llvm-ml/
H A Dradix.asm37 .radix 2
39 .radix 16
41 .radix 10
51 .radix 9
53 .radix 10
59 .radix 12
62 .radix 10
69 .radix 16
72 .radix 10
79 .radix 12
[all …]
H A Dradix_errors.asm10 .radix 11
15 .radix 10
22 .radix 13
27 .radix 10
34 .radix 13
39 .radix 10
44 .radix 16
45 .radix 10
50 .radix 9
53 .radix 10
/llvm-project-15.0.7/polly/lib/External/isl/imath/examples/
H A Dinput.c37 mp_size radix = 10; /* Default output radix */ in main() local
47 if ((radix = atoi(argv[2])) < MP_MIN_RADIX || (radix > MP_MAX_RADIX)) { in main()
48 fprintf(stderr, "Error: Specified radix is out of range (%d)\n", radix); in main()
71 printf("Here is your value in base %d\n", radix); in main()
79 buf_size = mp_int_string_len(MP_NUMER_P(&value), radix); in main()
83 res = mp_int_to_string(MP_NUMER_P(&value), radix, obuf, buf_size); in main()
85 fprintf(stderr, "Converstion to base %d failed: %s\n", radix, in main()
93 buf_size = mp_rat_string_len(&value, radix); in main()
97 res = mp_rat_to_string(&value, radix, obuf, buf_size); in main()
99 fprintf(stderr, "Conversion to base %d failed: %s\n", radix, in main()
H A Drounding.c38 mp_size prec, radix; in main() local
54 radix = atoi(argv[3]); in main()
61 mode, prec, radix, argv[4]); in main()
63 if ((res = mp_rat_read_decimal(&value, radix, argv[4])) != MP_OK) { in main()
68 len = mp_rat_decimal_len(&value, radix, prec); in main()
71 if ((res = mp_rat_to_decimal(&value, radix, prec, mode, buf, len)) != MP_OK) { in main()
H A Dpi.c39 mp_result arctan(mp_small radix, mp_small mul, mp_small x, mp_small prec,
65 int radix = atoi(argv[2]); in main() local
67 if (radix < MP_MIN_RADIX || radix > MP_MAX_RADIX) { in main()
72 g_radix = radix; in main()
125 mp_result arctan(mp_small radix, mp_small mul, mp_small x, mp_small prec, in arctan() argument
139 if ((res = mp_int_expt_value(radix, prec, &t)) != MP_OK || in arctan()
164 res = mp_int_div_value(sum, radix, sum, NULL); in arctan()
/llvm-project-15.0.7/flang/lib/Decimal/
H A Dbig-radix-floating-point.h52 static constexpr Digit radix{uint64Radix};
164 auto q{n / radix}; in SetTo()
165 digit_[digits_++] = static_cast<Digit>(n - q * radix); in SetTo()
210 static_assert(N > 1 && radix % N == 0, "bad modulus"); in RemoveLeastOrderZeroDigits()
219 digit_[j] = q + (radix / DIVISOR) * remainder; in RemoveLeastOrderZeroDigits()
228 auto coeff{radix >> twoPow}; in RemoveLeastOrderZeroDigits()
270 if (v < radix) { in RemoveLeastOrderZeroDigits()
274 digit_[position] = v - radix; in RemoveLeastOrderZeroDigits()
291 digit_[j] = radix - 1; in RemoveLeastOrderZeroDigits()
298 carry = v / radix; in RemoveLeastOrderZeroDigits()
[all …]
H A Ddecimal-to-binary.cpp92 for (auto times{radix}; q-- > firstDigit;) { in ParseNumber()
94 if (times == radix) { in ParseNumber()
163 incr = LSD > radix / 2 || (LSD == radix / 2 && digit_[0] % 2 != 0); in LoseLeastSignificantDigit()
174 incr = LSD >= radix / 2; in LoseLeastSignificantDigit()
177 for (int j{0}; (digit_[j] += incr) == radix; ++j) { in LoseLeastSignificantDigit()
/llvm-project-15.0.7/llvm/test/tools/llvm-size/
H A Dradix.test6 ## Case 1: Octal radix (Berkeley).
7 # RUN: llvm-size %t1.o %t2.o --totals -B --radix=8 \
17 ## Case 2: Decimal radix (Berkeley).
28 ## Case 3: Hexadecimal radix (Berkeley).
39 ## Case 4: Octal radix (sysv).
40 # RUN: llvm-size %t1.o %t2.o -A --radix=8 \
60 ## Case 5: Decimal radix (sysv).
61 # RUN: llvm-size %t1.o %t2.o -A --radix=10 \
81 ## Case 6: Hexadecimal radix (sysv).
111 # RUN: not llvm-size %t1.o --radix=0 2>&1 \
[all …]
/llvm-project-15.0.7/polly/lib/External/isl/imath/
H A Dimrat.c619 res = mp_int_to_string(TEMP(1), radix, start, left); in mp_rat_to_decimal()
627 mp_result mp_rat_string_len(mp_rat r, mp_size radix) { in mp_rat_string_len() argument
632 d_len = mp_int_string_len(MP_DENOM_P(r), radix); in mp_rat_string_len()
645 int z_len = mp_int_string_len(MP_NUMER_P(r), radix); in mp_rat_decimal_len()
657 return mp_rat_read_cstring(r, radix, str, NULL); in mp_rat_read_string()
706 if (radix == 0) radix = 10; /* default to decimal input */ in mp_rat_read_ustring()
708 res = mp_rat_read_cstring(r, radix, str, &endp); in mp_rat_read_ustring()
710 res = mp_rat_read_cdecimal(r, radix, str, &endp); in mp_rat_read_ustring()
717 return mp_rat_read_cdecimal(r, radix, str, NULL); in mp_rat_read_decimal()
786 while (mp_int_divisible_value(&frac, radix)) { in mp_rat_read_cdecimal()
[all …]
H A Dimrat.h186 mp_result mp_rat_to_string(mp_rat r, mp_size radix, char *str, int limit);
215 mp_result mp_rat_to_decimal(mp_rat r, mp_size radix, mp_size prec,
221 mp_result mp_rat_string_len(mp_rat r, mp_size radix);
226 mp_result mp_rat_decimal_len(mp_rat r, mp_size radix, mp_size prec);
231 mp_result mp_rat_read_string(mp_rat r, mp_size radix, const char *str);
238 mp_result mp_rat_read_cstring(mp_rat r, mp_size radix, const char *str,
252 mp_result mp_rat_read_ustring(mp_rat r, mp_size radix, const char *str,
258 mp_result mp_rat_read_decimal(mp_rat r, mp_size radix, const char *str);
264 mp_result mp_rat_read_cdecimal(mp_rat r, mp_size radix, const char *str,
H A Dimdrover.c104 int radix = 10; in read_int_value() local
119 radix = 8; in read_int_value()
123 radix = 2; in read_int_value()
135 int radix = 10; in read_rat_value() local
150 radix = 8; in read_rat_value()
154 radix = 2; in read_rat_value()
170 int radix = 10; in read_long() local
185 radix = 8; in read_long()
1378 long radix; in test_qtostr() local
1385 if (radix < MP_MIN_RADIX || radix > MP_MAX_RADIX) { in test_qtostr()
[all …]
H A Dimath.h327 mp_result mp_int_to_string(mp_int z, mp_size radix, char *str, int limit);
332 mp_result mp_int_string_len(mp_int z, mp_size radix);
347 mp_result mp_int_read_string(mp_int z, mp_size radix, const char *str);
365 mp_result mp_int_read_cstring(mp_int z, mp_size radix, const char *str, char **end);
H A Dgmp_compat.c289 char *GMPZAPI(get_str)(char *str, int radix, mp_int op) { in GMPZAPI()
293 r = radix; in GMPZAPI()
307 if (radix < 0) { in GMPZAPI()
317 char *GMPQAPI(get_str)(char *str, int radix, mp_rat op) { in GMPQAPI()
322 return GMPZAPI(get_str)(str, radix, mp_rat_numer_ref(op)); in GMPQAPI()
325 r = radix; in GMPQAPI()
339 if (radix < 0) { in GMPQAPI()
/llvm-project-15.0.7/llvm/test/tools/llvm-strings/
H A Dradix.test1 ## Show that llvm-strings can handle the -t/--radix switch properly.
22 ## Show --radix works too.
23 RUN: llvm-strings --radix d %t/a.txt | FileCheck %s -check-prefix CHECK-DEC --strict-whitespace
24 RUN: llvm-strings --radix o %t/a.txt | FileCheck %s -check-prefix CHECK-OCT --strict-whitespace
25 RUN: llvm-strings --radix x %t/a.txt | FileCheck %s -check-prefix CHECK-HEX --strict-whitespace
28 RUN: llvm-strings --radix=d %t/a.txt | FileCheck %s -check-prefix CHECK-DEC --strict-whitespace
60 RUN: not llvm-strings --radix z %t/a.txt 2>&1 | FileCheck %s --check-prefix=INVALID
61 INVALID: error: --radix value should be one of: '' (no offset), 'o' (octal), 'd' (decimal), 'x' (he…
H A Dmultiple-inputs.test2 ## This test uses --print-file-name and --radix to show that the values are
8 RUN: llvm-strings --print-file-name --radix=d %t1 %t2 \
/llvm-project-15.0.7/llvm/tools/llvm-strings/
H A DOpts.td16 defm radix : Eq<"radix", "Print the offset within the file with the specified radix: o (octal), d (…
23 …inedOrSeparate<["-"], "t">, Alias<radix_EQ>, HelpText<"Alias for --radix">, MetaVarName<"<radix>">;
/llvm-project-15.0.7/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/
H A Dradix.pass.cpp22 static_assert(std::numeric_limits<T>::radix == expected, "radix test 1"); in test()
23 static_assert(std::numeric_limits<const T>::radix == expected, "radix test 2"); in test()
24 static_assert(std::numeric_limits<volatile T>::radix == expected, "radix test 3"); in test()
25 static_assert(std::numeric_limits<const volatile T>::radix == expected, "radix test 4"); in test()
/llvm-project-15.0.7/llvm/tools/llvm-size/
H A DOpts.td15 defm radix : Eq<"radix", "Print size in radix">;
27 def : F<"d", "Alias for --radix=10">, Alias<radix_EQ>, AliasArgs<["10"]>;
30 def : F<"o", "Alias for --radix=8">, Alias<radix_EQ>, AliasArgs<["8"]>;
32 def : F<"x", "Alias for --radix=16">, Alias<radix_EQ>, AliasArgs<["16"]>;
/llvm-project-15.0.7/llvm/docs/CommandGuide/
H A Dllvm-strings.rst74 .. option:: --radix=<radix>, -t
77 the specified radix. Valid ``<radix>`` values are ``o``, ``d`` and ``x`` for
84 $ llvm-strings --radix=o test.o
92 $ llvm-strings --radix=d test.o
H A Dllvm-size.rst46 Equivalent to :option:`--radix` with a value of ``10``.
134 Equivalent to :option:`--radix` with a value of ``8``.
136 .. option:: --radix=<value>
138 Display size information in the specified radix. Permitted values are ``8``,
146 $ llvm-size --radix=8 test.o
150 $ llvm-size --radix=10 test.o
154 $ llvm-size --radix=16 test.o
179 Equivalent to :option:`--radix` with a value of ``16``.
/llvm-project-15.0.7/clang/lib/Lex/
H A DLiteralSupport.cpp878 radix = 10; in NumericLiteralParser()
1116 assert((radix == 8 || radix == 10) && "Unexpected radix"); in ParseDecimalOrOctalCommon()
1133 radix = 10; in ParseDecimalOrOctalCommon()
1142 radix = 10; in ParseDecimalOrOctalCommon()
1222 radix = 16; in ParseNumberStartingWithZero()
1294 radix = 2; in ParseNumberStartingWithZero()
1314 radix = 8; in ParseNumberStartingWithZero()
1332 radix = 10; in ParseNumberStartingWithZero()
1441 assert(radix == 16 || radix == 10); in GetFixedPointValue()
1493 if (radix == 10) in GetFixedPointValue()
[all …]
/llvm-project-15.0.7/llvm/lib/Support/
H A DAPInt.cpp51 if (radix == 16 || radix == 36) { in getDigit()
57 if (r <= radix - 11U) in getDigit()
61 if (r <= radix - 11U) in getDigit()
64 radix = 10; in getDigit()
68 if (r < radix) in getDigit()
116 fromString(numbits, Str, radix); in APInt()
544 if (radix == 2 || radix == 8 || radix == 16) in getBitsNeeded()
2091 assert((radix == 10 || radix == 8 || radix == 16 || radix == 2 || in fromString()
2092 radix == 36) && in fromString()
2116 unsigned shift = (radix == 16 ? 4 : radix == 8 ? 3 : radix == 2 ? 1 : 0); in fromString()
[all …]
/llvm-project-15.0.7/llvm/test/CodeGen/X86/
H A D2007-11-30-LoadFolding-Bug.ll8 define fastcc void @mp_sqrt(i32 %n, i32 %radix, ptr %in, ptr %out, ptr %tmp1, ptr %tmp2, i32 %nfft,…
155 %tmp4.i19.i = icmp slt i32 %tmp1.i18.i, %radix ; <i1> [#uses=1]
176 tail call fastcc void @mp_mul_d2i( i32 0, i32 %radix, i32 0, ptr %tmp1fft, ptr %tmp2 )
183 tail call fastcc void @mp_round( i32 0, i32 %radix, i32 0, ptr %out )
184 tail call fastcc void @mp_add( i32 0, i32 %radix, ptr %tmp1, ptr %tmp2, ptr %tmp1 )
185 tail call fastcc void @mp_sub( i32 0, i32 %radix, ptr %in, ptr %tmp2, ptr %tmp2 )
186 tail call fastcc void @mp_round( i32 0, i32 %radix, i32 0, ptr %tmp1 )
187 tail call fastcc void @mp_mul_d2i( i32 0, i32 %radix, i32 %tmp7.i3, ptr %tmp2fft, ptr %tmp2 )
/llvm-project-15.0.7/lldb/source/Core/
H A DDumpDataExtractor.cpp119 bool is_signed, unsigned radix) { in DumpAPInt() argument
122 std::string apint_str = toString(apint.value(), radix, is_signed); in DumpAPInt()
123 switch (radix) { in DumpAPInt()
444 const unsigned radix = 2; in DumpDataExtractor() local
445 offset = DumpAPInt(s, DE, offset, item_byte_size, is_signed, radix); in DumpDataExtractor()
504 const unsigned radix = 10; in DumpDataExtractor() local
505 offset = DumpAPInt(s, DE, offset, item_byte_size, is_signed, radix); in DumpDataExtractor()
516 const unsigned radix = 10; in DumpDataExtractor() local
517 offset = DumpAPInt(s, DE, offset, item_byte_size, is_signed, radix); in DumpDataExtractor()
528 const unsigned radix = 8; in DumpDataExtractor() local
[all …]
/llvm-project-15.0.7/llvm/tools/llvm-nm/
H A DOpts.td33 defm radix : Eq<"radix", "Radix (o/d/x) for printing symbol Values">, MetaVarName<"<radix>">;
78 …: JoinedOrSeparate<["-"], "t">, HelpText<"Alias for --radix">, Alias<radix_EQ>, MetaVarName<"<radi…

123