Home
last modified time | relevance | path

Searched refs:rounding (Results 1 – 25 of 1018) sorted by relevance

12345678910>>...41

/external/llvm-project/flang/lib/Evaluate/
Dcomplex.cpp16 const Complex &that, Rounding rounding) const { in Add()
18 Part reSum{re_.Add(that.re_, rounding).AccumulateFlags(flags)}; in Add()
19 Part imSum{im_.Add(that.im_, rounding).AccumulateFlags(flags)}; in Add()
25 const Complex &that, Rounding rounding) const { in Subtract()
27 Part reDiff{re_.Subtract(that.re_, rounding).AccumulateFlags(flags)}; in Subtract()
28 Part imDiff{im_.Subtract(that.im_, rounding).AccumulateFlags(flags)}; in Subtract()
34 const Complex &that, Rounding rounding) const { in Multiply()
37 Part ac{re_.Multiply(that.re_, rounding).AccumulateFlags(flags)}; in Multiply()
38 Part bd{im_.Multiply(that.im_, rounding).AccumulateFlags(flags)}; in Multiply()
39 Part ad{re_.Multiply(that.im_, rounding).AccumulateFlags(flags)}; in Multiply()
[all …]
Dreal.cpp58 const Real &y, Rounding rounding) const { in Add()
90 return y.Add(*this, rounding); in Add()
96 return y.Add(*this, rounding); in Add()
100 if (rounding.mode == common::RoundingMode::Down) { in Add()
132 result, isNegative, exponent, fraction, rounding, roundingBits); in Add()
138 const Real &y, Rounding rounding) const { in Multiply()
189 NormalizeAndRound(result, isNegative, exponent, product.upper, rounding, in Multiply()
198 const Real &y, Rounding rounding) const { in Divide()
258 result, isNegative, exponent, quotient, rounding, roundingBits); in Divide()
292 const Fraction &fraction, Rounding rounding, RoundingBits *roundingBits) { in Normalize() argument
[all …]
Dint-power.h20 const INT &power, Rounding rounding = defaultRounding) {
37 result.value = result.value.Divide(squares, rounding)
40 result.value = result.value.Multiply(squares, rounding)
45 squares.Multiply(squares, rounding).AccumulateFlags(result.flags);
53 const REAL &base, const INT &power, Rounding rounding = defaultRounding) {
55 return TimesIntPowerOf(one, base, power, rounding);
/external/icu/android_icu4j/src/main/java/android/icu/number/
DNumberPropertyMapper.java172 Precision rounding = null; in oldToNew()
174 rounding = Precision.constructCurrency(currencyUsage).withCurrency(currency); in oldToNew()
177 rounding = Precision.constructFraction(minFrac, maxFrac); in oldToNew()
179 rounding = Precision.constructIncrement(roundingIncrement); in oldToNew()
188 rounding = Precision.constructSignificant(minSig, maxSig); in oldToNew()
190 rounding = Precision.constructFraction(minFrac, maxFrac); in oldToNew()
192 rounding = Precision.constructCurrency(currencyUsage); in oldToNew()
194 if (rounding != null) { in oldToNew()
195 rounding = rounding.withMode(mathContext); in oldToNew()
196 macros.precision = rounding; in oldToNew()
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/number/
DNumberPropertyMapper.java171 Precision rounding = null; in oldToNew()
173 rounding = Precision.constructCurrency(currencyUsage).withCurrency(currency); in oldToNew()
176 rounding = Precision.constructFraction(minFrac, maxFrac); in oldToNew()
178 rounding = Precision.constructIncrement(roundingIncrement); in oldToNew()
187 rounding = Precision.constructSignificant(minSig, maxSig); in oldToNew()
189 rounding = Precision.constructFraction(minFrac, maxFrac); in oldToNew()
191 rounding = Precision.constructCurrency(currencyUsage); in oldToNew()
193 if (rounding != null) { in oldToNew()
194 rounding = rounding.withMode(mathContext); in oldToNew()
195 macros.precision = rounding; in oldToNew()
[all …]
/external/llvm-project/llvm/test/Feature/
Dfp-intrinsics.ll3 ; Test to verify that constants aren't folded when the rounding mode is unknown.
16 ; Verify that 'a - 0' isn't simplified to 'a' when the rounding mode is unknown.
19 ; // Because the result of '0 - 0' is negative zero if rounding mode is
35 ; Verify that '-((-a)*b)' isn't simplified to 'a*b' when the rounding mode is
40 ; // rounding, this shouldn't be simplified.
97 ; Verify that sqrt(42.0) isn't simplified when the rounding mode is unknown.
108 ; Verify that pow(42.1, 3.0) isn't simplified when the rounding mode is unknown.
120 ; Verify that powi(42.1, 3) isn't simplified when the rounding mode is unknown.
132 ; Verify that sin(42.0) isn't simplified when the rounding mode is unknown.
143 ; Verify that cos(42.0) isn't simplified when the rounding mode is unknown.
[all …]
/external/llvm-project/flang/unittests/Evaluate/
Dreal.cpp48 template <typename R> void basicTests(int rm, Rounding rounding) { in basicTests() argument
136 vr = R::FromInteger(ix, rounding); in basicTests()
151 if (rounding.mode == RoundingMode::TiesToEven) { // to match stold() in basicTests()
159 auto check{R::Read(p, rounding)}; in basicTests()
290 void inttest(std::int64_t x, int pass, Rounding rounding) { in inttest() argument
298 real = real.value.FromInteger(ix, rounding); in inttest()
348 void subsetTests(int pass, Rounding rounding, std::uint32_t opds) { in subsetTests() argument
352 inttest<UINT, FLT, REAL>(x, pass, rounding); in subsetTests()
353 inttest<UINT, FLT, REAL>(-x, pass, rounding); in subsetTests()
355 inttest<UINT, FLT, REAL>(0, pass, rounding); in subsetTests()
[all …]
/external/llvm-project/flang/lib/Decimal/
Dbinary-to-decimal.cpp18 BinaryFloatingPointNumber<PREC> x, enum FortranRounding rounding) in BigRadixFloatingPointNumber() argument
19 : rounding_{rounding} { in BigRadixFloatingPointNumber()
282 enum FortranRounding rounding, BinaryFloatingPointNumber<PREC> x) { in ConvertToDecimal() argument
295 Big number{x, rounding}; in ConvertToDecimal()
312 number.Minimize(Big{less, rounding}, Big{more, rounding}); in ConvertToDecimal()
341 enum FortranRounding rounding, float x) { in ConvertFloatToDecimal() argument
343 rounding, Fortran::decimal::BinaryFloatingPointNumber<24>(x)); in ConvertFloatToDecimal()
348 enum FortranRounding rounding, double x) { in ConvertDoubleToDecimal() argument
350 rounding, Fortran::decimal::BinaryFloatingPointNumber<53>(x)); in ConvertDoubleToDecimal()
356 enum FortranRounding rounding, long double x) { in ConvertLongDoubleToDecimal() argument
[all …]
Ddecimal-to-binary.cpp232 bool isNegative, FortranRounding rounding) const { in ToBinary()
260 switch (rounding) { in ToBinary()
425 const char *&p, enum FortranRounding rounding) { in ConvertToBinary() argument
426 return BigRadixFloatingPointNumber<PREC>{rounding}.ConvertToBinary(p); in ConvertToBinary()
444 const char **p, float *f, enum FortranRounding rounding) { in ConvertDecimalToFloat() argument
445 auto result{Fortran::decimal::ConvertToBinary<24>(*p, rounding)}; in ConvertDecimalToFloat()
451 const char **p, double *d, enum FortranRounding rounding) { in ConvertDecimalToDouble() argument
452 auto result{Fortran::decimal::ConvertToBinary<53>(*p, rounding)}; in ConvertDecimalToDouble()
459 const char **p, long double *ld, enum FortranRounding rounding) { in ConvertDecimalToLongDouble() argument
460 auto result{Fortran::decimal::ConvertToBinary<64>(*p, rounding)}; in ConvertDecimalToLongDouble()
/external/python/cpython2/Lib/test/decimaltestdata/
Drounding.decTest2 -- rounding.decTest -- decimal rounding modes testcases --
23 -- order to get correct results for some rounding modes. Rather than
24 -- single rounding tests we therefore need tests for most operators.
26 -- is rounding of negatives (if the latter works for addition, assume it
41 rounding: down
73 rounding: half_down
105 rounding: half_even
137 rounding: half_up
169 rounding: up
201 rounding: floor
[all …]
Dtointegral.decTest31 rounding: half_up
166 rounding: half_up
178 -- all rounding modes
179 rounding: half_even
188 rounding: half_up
197 rounding: half_down
206 rounding: up
215 rounding: down
224 rounding: ceiling
233 rounding: floor
/external/python/cpython3/Lib/test/decimaltestdata/
Drounding.decTest2 -- rounding.decTest -- decimal rounding modes testcases --
23 -- order to get correct results for some rounding modes. Rather than
24 -- single rounding tests we therefore need tests for most operators.
26 -- is rounding of negatives (if the latter works for addition, assume it
41 rounding: down
73 rounding: half_down
105 rounding: half_even
137 rounding: half_up
169 rounding: up
201 rounding: floor
[all …]
/external/webp/src/dsp/
Dyuv.h186 static WEBP_INLINE int VP8ClipUV(int uv, int rounding) { in VP8ClipUV() argument
187 uv = (uv + rounding + (128 << (YUV_FIX + 2))) >> (YUV_FIX + 2); in VP8ClipUV()
191 static WEBP_INLINE int VP8RGBToY(int r, int g, int b, int rounding) { in VP8RGBToY() argument
193 return (luma + rounding + (16 << YUV_FIX)) >> YUV_FIX; // no need to clip in VP8RGBToY()
196 static WEBP_INLINE int VP8RGBToU(int r, int g, int b, int rounding) { in VP8RGBToU() argument
198 return VP8ClipUV(u, rounding); in VP8RGBToU()
201 static WEBP_INLINE int VP8RGBToV(int r, int g, int b, int rounding) { in VP8RGBToV() argument
203 return VP8ClipUV(v, rounding); in VP8RGBToV()
/external/icu/icu4c/source/test/testdata/
Dnumberpermutationtest.txt508 compact-short percent rounding-mode-floor
522 compact-short currency/EUR rounding-mode-floor
536 compact-short measure-unit/length-furlong rounding-mode-floor
550 scientific/+ee/sign-always percent rounding-mode-floor
564 scientific/+ee/sign-always currency/EUR rounding-mode-floor
578 scientific/+ee/sign-always measure-unit/length-furlong rounding-mode-floor
1320 compact-short unit-width-narrow rounding-mode-floor
1334 compact-short unit-width-full-name rounding-mode-floor
1348 scientific/+ee/sign-always unit-width-narrow rounding-mode-floor
1362 scientific/+ee/sign-always unit-width-full-name rounding-mode-floor
[all …]
/external/icu/android_icu4j/src/main/tests/android/icu/dev/data/
Dnumberpermutationtest.txt508 compact-short percent rounding-mode-floor
522 compact-short currency/EUR rounding-mode-floor
536 compact-short measure-unit/length-furlong rounding-mode-floor
550 scientific/+ee/sign-always percent rounding-mode-floor
564 scientific/+ee/sign-always currency/EUR rounding-mode-floor
578 scientific/+ee/sign-always measure-unit/length-furlong rounding-mode-floor
1320 compact-short unit-width-narrow rounding-mode-floor
1334 compact-short unit-width-full-name rounding-mode-floor
1348 scientific/+ee/sign-always unit-width-narrow rounding-mode-floor
1362 scientific/+ee/sign-always unit-width-full-name rounding-mode-floor
[all …]
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/data/
Dnumberpermutationtest.txt508 compact-short percent rounding-mode-floor
522 compact-short currency/EUR rounding-mode-floor
536 compact-short measure-unit/length-furlong rounding-mode-floor
550 scientific/+ee/sign-always percent rounding-mode-floor
564 scientific/+ee/sign-always currency/EUR rounding-mode-floor
578 scientific/+ee/sign-always measure-unit/length-furlong rounding-mode-floor
1320 compact-short unit-width-narrow rounding-mode-floor
1334 compact-short unit-width-full-name rounding-mode-floor
1348 scientific/+ee/sign-always unit-width-narrow rounding-mode-floor
1362 scientific/+ee/sign-always unit-width-full-name rounding-mode-floor
[all …]
/external/llvm-project/flang/include/flang/Evaluate/
Dcomplex.h64 const INT &n, Rounding rounding = defaultRounding) {
67 Part::FromInteger(n, rounding).AccumulateFlags(result.flags);
72 const Complex &, Rounding rounding = defaultRounding) const;
74 const Complex &, Rounding rounding = defaultRounding) const;
76 const Complex &, Rounding rounding = defaultRounding) const;
78 const Complex &, Rounding rounding = defaultRounding) const;
Dreal.h110 const Real &, Rounding rounding = defaultRounding) const;
112 const Real &y, Rounding rounding = defaultRounding) const {
113 return Add(y.Negate(), rounding);
116 const Real &, Rounding rounding = defaultRounding) const;
118 const Real &, Rounding rounding = defaultRounding) const;
123 const Real &, Rounding rounding = defaultRounding) const;
182 const INT &n, Rounding rounding = defaultRounding) {
204 result.flags |= result.value.Round(rounding, roundingBits);
249 const A &x, Rounding rounding = defaultRounding) {
277 result.flags |= result.value.Round(rounding, roundingBits);
[all …]
/external/XNNPACK/src/xnnpack/
Dparams-init.h98 params.sse2.rounding[0] = UINT64_C(0x40000000); in xnn_init_qu8_gemm_params()
99 params.sse2.rounding[1] = UINT64_C(0x40000000); in xnn_init_qu8_gemm_params()
201 params.sse2.rounding[0] = UINT64_C(0x40000000); in xnn_init_qs8_gemm_params()
202 params.sse2.rounding[1] = UINT64_C(0x40000000); in xnn_init_qs8_gemm_params()
230 params.wasmsimd.rounding[0] = INT64_C(0x80000000); in xnn_init_qs8_gemm_params()
231 params.wasmsimd.rounding[1] = INT64_C(0x80000000); in xnn_init_qs8_gemm_params()
315 const uint64_t rounding = UINT64_C(1) << (right_shift - 1); in xnn_init_qu8_avgpool_params() local
324 params.sse2.rounding[0] = rounding; in xnn_init_qu8_avgpool_params()
325 params.sse2.rounding[1] = rounding; in xnn_init_qu8_avgpool_params()
344 const int64_t rounding = INT64_C(1) << (right_shift - 1); in xnn_init_qu8_avgpool_params() local
[all …]
/external/libvpx/libvpx/vp9/encoder/x86/
Dhighbd_temporal_filter_sse4.c70 const int strength, const int rounding, in highbd_average_4() argument
74 const __m128i rounding_u32 = _mm_set1_epi32(rounding); in highbd_average_4()
117 const int strength, const int rounding, in highbd_average_8() argument
119 highbd_average_4(output_0, sum_0_u32, mul_constants_0, strength, rounding, in highbd_average_8()
121 highbd_average_4(output_1, sum_1_u32, mul_constants_1, strength, rounding, in highbd_average_8()
203 const int rounding = (1 << strength) >> 1; in vp9_highbd_apply_temporal_filter_luma_8() local
253 &sum_row_second, &mul_first, &mul_second, strength, rounding, in vp9_highbd_apply_temporal_filter_luma_8()
319 rounding, weight); in vp9_highbd_apply_temporal_filter_luma_8()
359 &sum_row_second, &mul_first, &mul_second, strength, rounding, in vp9_highbd_apply_temporal_filter_luma_8()
503 const int rounding = (1 << strength) >> 1; in vp9_highbd_apply_temporal_filter_chroma_8() local
[all …]
/external/libaom/libaom/av1/encoder/x86/
Dtemporal_filter_sse4.c81 const int strength, const int rounding, in average_8() argument
85 const __m128i rounding_u16 = _mm_set1_epi16(rounding); in average_8()
106 const int strength, const int rounding, in average_4_4() argument
110 const __m128i rounding_u16 = _mm_set1_epi16(rounding); in average_4_4()
135 const int strength, const int rounding, in average_16() argument
138 const __m128i rounding_u16 = _mm_set1_epi16(rounding); in average_16()
342 const int rounding = (1 << strength) >> 1; in apply_temporal_filter_luma_16() local
391 average_8(sum_row_first, &mul_first, strength, rounding, blk_fw[0]); in apply_temporal_filter_luma_16()
393 average_8(sum_row_second, &mul_second, strength, rounding, blk_fw[1]); in apply_temporal_filter_luma_16()
396 strength, rounding, weight); in apply_temporal_filter_luma_16()
[all …]
/external/libaom/libaom/av1/common/x86/
Dhighbd_inv_txfm_avx2.c243 const __m256i *rounding, int bit) { in half_btf_0_avx2() argument
246 x = _mm256_add_epi32(x, *rounding); in half_btf_0_avx2()
253 const __m256i *rounding, int bit) { in half_btf_avx2() argument
259 x = _mm256_add_epi32(x, *rounding); in half_btf_avx2()
283 const __m256i *rounding, int bit) { in idct32_stage4_avx2() argument
285 temp1 = half_btf_avx2(cospim8, &bf1[17], cospi56, &bf1[30], rounding, bit); in idct32_stage4_avx2()
286 bf1[30] = half_btf_avx2(cospi56, &bf1[17], cospi8, &bf1[30], rounding, bit); in idct32_stage4_avx2()
289 temp2 = half_btf_avx2(cospim56, &bf1[18], cospim8, &bf1[29], rounding, bit); in idct32_stage4_avx2()
290 bf1[29] = half_btf_avx2(cospim8, &bf1[18], cospi56, &bf1[29], rounding, bit); in idct32_stage4_avx2()
293 temp1 = half_btf_avx2(cospim40, &bf1[21], cospi24, &bf1[26], rounding, bit); in idct32_stage4_avx2()
[all …]
/external/XNNPACK/src/qu8-requantization/
Dprecise-scalar-signed64.c38 const int64_t rounding = INT64_C(1) << (shift - 1); in xnn_qu8_requantize_precise__scalar_signed64() local
68 const int32_t x_scaled = (int32_t) asr_s64(x_adjusted_product + rounding, shift); in xnn_qu8_requantize_precise__scalar_signed64()
69 const int32_t y_scaled = (int32_t) asr_s64(y_adjusted_product + rounding, shift); in xnn_qu8_requantize_precise__scalar_signed64()
70 const int32_t z_scaled = (int32_t) asr_s64(z_adjusted_product + rounding, shift); in xnn_qu8_requantize_precise__scalar_signed64()
71 const int32_t w_scaled = (int32_t) asr_s64(w_adjusted_product + rounding, shift); in xnn_qu8_requantize_precise__scalar_signed64()
/external/XNNPACK/src/qs8-requantization/
Dprecise-scalar-signed64.c38 const int64_t rounding = INT64_C(1) << (shift - 1); in xnn_qs8_requantize_precise__scalar_signed64() local
68 const int32_t x_scaled = (int32_t) asr_s64(x_adjusted_product + rounding, shift); in xnn_qs8_requantize_precise__scalar_signed64()
69 const int32_t y_scaled = (int32_t) asr_s64(y_adjusted_product + rounding, shift); in xnn_qs8_requantize_precise__scalar_signed64()
70 const int32_t z_scaled = (int32_t) asr_s64(z_adjusted_product + rounding, shift); in xnn_qs8_requantize_precise__scalar_signed64()
71 const int32_t w_scaled = (int32_t) asr_s64(w_adjusted_product + rounding, shift); in xnn_qs8_requantize_precise__scalar_signed64()
/external/icu/icu4j/demos/src/com/ibm/icu/dev/demo/number/
DCurrencyDemo.java50 result.setRoundingIncrement(hack.rounding); in getCurrencyFormat()
60 double rounding; field in CurrencyDemo.HackCurrencyInfo
62 HackCurrencyInfo(int decimals, double rounding, String symbol) { in HackCurrencyInfo() argument
64 this.rounding = rounding; in HackCurrencyInfo()

12345678910>>...41