Home
last modified time | relevance | path

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

12345678910>>...24

/third_party/rust/crates/minimal-lexical/tests/
Drounding_tests.rs2 use minimal_lexical::rounding;
10 rounding::round::<f64, _>(&mut fp, |f, s| { in round_test()
21 rounding::round::<f64, _>(&mut fp, |f, s| { in round_test()
35 rounding::round::<f64, _>(&mut fp, |f, s| { in round_test()
36 rounding::round_nearest_tie_even(f, s, |is_odd, is_halfway, is_above| { in round_test()
48 rounding::round::<f64, _>(&mut fp, |f, s| { in round_test()
49 rounding::round_nearest_tie_even(f, s, |is_odd, is_halfway, is_above| { in round_test()
61 rounding::round::<f64, _>(&mut fp, rounding::round_down); in round_test()
/third_party/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 …]
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/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 …]
/third_party/FreeBSD/contrib/gdtoa/
Dstrtord.c73 strtord_l(s, sp, rounding, d, locale) CONST char *s; char **sp; int rounding; in strtord_l() argument
76 strtord_l(CONST char *s, char **sp, int rounding, double *d, locale_t locale)
86 if (rounding != FPI_Round_near) {
88 fpi1.rounding = rounding;
/third_party/python/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
Dadd.decTest23 rounding: half_up
238 rounding: half_up
260 rounding: half_even
286 rounding: down
310 rounding: half_up
331 rounding: half_down
341 rounding: half_up
394 rounding: half_up
403 rounding: half_down
408 rounding: half_up
[all …]
DddToIntegral.decTest26 -- elsewhere; the tests here are for integrity, rounding mode, etc.
40 rounding: half_even
170 rounding: half_up
181 -- all rounding modes
182 rounding: half_even
190 rounding: half_up
199 rounding: half_down
208 rounding: up
217 rounding: down
226 rounding: ceiling
[all …]
DdqToIntegral.decTest26 -- elsewhere; the tests here are for integrity, rounding mode, etc.
40 rounding: half_even
170 rounding: half_up
181 -- all rounding modes
182 rounding: half_even
190 rounding: half_up
199 rounding: half_down
208 rounding: up
217 rounding: down
226 rounding: ceiling
[all …]
Dtointegralx.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
DddAdd.decTest29 rounding: half_even
85 -- same, without rounding
218 rounding: half_up
236 rounding: half_up
258 rounding: half_even
284 rounding: down
307 rounding: half_up
358 rounding: half_up
366 rounding: half_down
369 rounding: half_up
[all …]
Dfma.decTest24 rounding: half_up
379 -- test some edge cases with exact rounding
416 rounding: half_up
647 -- test subnormals rounding
651 rounding: half_even
748 rounding: half_up
769 rounding: half_up
782 rounding: half_up
996 rounding: half_up
1018 rounding: half_even
[all …]
/third_party/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 …]
/third_party/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 …]
/third_party/icu/ohos_icu4j/src/main/tests/resources/ohos/global/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 …]
/third_party/flutter/skia/third_party/externals/libwebp/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()
/third_party/skia/third_party/externals/libwebp/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()
/third_party/icu/docs/userguide/format_parse/numbers/
Drounding-modes.md24 The following rounding modes are used with ICU's Decimal Formatter. Note that
82 This is ICU's default rounding mode. Values exactly on the 0.5 (half) mark
119 This is the default rounding mode in ECMAScript. In CSS, it is known as "nearest".
137 The mode "Unnecessary" doesn't perform any rounding, but instead returns an
138 error if the value cannot be represented exactly without rounding.
142 * Decimal Context docs (used by ICU4C to implement rounding):
143 <http://speleotrove.com/decimal/decifaq1.html#rounding>
146 * IEEE 754 rounding rules:
150 * Live rounding mode chart: [Rounding Mode
/third_party/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()
/third_party/skia/experimental/lowp-basic/
DQMath.h47 const int32_t rounding = 1 << 14; in simulate_ssse3_mm_mulhrs_epi16() local
48 int32_t temp = (int32_t)r * (int32_t)s + rounding; in simulate_ssse3_mm_mulhrs_epi16()
62 const int64_t rounding = 1 << (esize - 1); in simulate_neon_vqrdmulhq_s16() local
63 int64_t product = 2LL * (int64_t)r * (int64_t)s + rounding; in simulate_neon_vqrdmulhq_s16()
/third_party/skia/third_party/externals/spirv-cross/reference/shaders/vert/
Docean.vert78 uvec4 rounding;
79 rounding.x = _111;
89 rounding.y = _122;
99 rounding.z = _133;
109 rounding.w = _145;
110 vec4 lower_upper_snapped = vec4((uPosition.xyxy + rounding) & (~mask).xxyy);
/third_party/python/Lib/
D_pydecimal.py376 if context.rounding in (ROUND_HALF_UP, ROUND_HALF_EVEN,
380 if context.rounding == ROUND_CEILING:
385 if context.rounding == ROUND_FLOOR:
1105 if not self and context.rounding != ROUND_FLOOR:
1127 if not self and context.rounding != ROUND_FLOOR:
1184 if context.rounding == ROUND_FLOOR and self._sign != other._sign:
1197 ans = other._rescale(exp, context.rounding)
1202 ans = self._rescale(exp, context.rounding)
1398 self._rescale(ideal_exp, context.rounding))
1545 ans = self._rescale(ideal_exponent, context.rounding)
[all …]
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/impl/number/
DPatternStringParser.java198 public DecimalQuantity_DualStorageBCD rounding = null; field in PatternStringParser.ParsedSubpatternInfo
430 if (state.peek() != '0' && result.rounding == null) { in consumeIntegerFormat()
431 result.rounding = new DecimalQuantity_DualStorageBCD(); in consumeIntegerFormat()
433 if (result.rounding != null) { in consumeIntegerFormat()
434 result.rounding.appendDigit((byte) (state.peek() - '0'), 0, true); in consumeIntegerFormat()
486 if (result.rounding == null) { in consumeFractionFormat()
487 result.rounding = new DecimalQuantity_DualStorageBCD(); in consumeFractionFormat()
489 result.rounding.appendDigit((byte) (state.peek() - '0'), zeroCounter, false); in consumeFractionFormat()
603 } else if (positive.rounding != null) { in patternInfoToProperties()
608 positive.rounding.toBigDecimal().setScale(positive.fractionNumerals)); in patternInfoToProperties()
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/number/
DPatternStringParser.java192 public DecimalQuantity_DualStorageBCD rounding = null; field in PatternStringParser.ParsedSubpatternInfo
424 if (state.peek() != '0' && result.rounding == null) { in consumeIntegerFormat()
425 result.rounding = new DecimalQuantity_DualStorageBCD(); in consumeIntegerFormat()
427 if (result.rounding != null) { in consumeIntegerFormat()
428 result.rounding.appendDigit((byte) (state.peek() - '0'), 0, true); in consumeIntegerFormat()
480 if (result.rounding == null) { in consumeFractionFormat()
481 result.rounding = new DecimalQuantity_DualStorageBCD(); in consumeFractionFormat()
483 result.rounding.appendDigit((byte) (state.peek() - '0'), zeroCounter, false); in consumeFractionFormat()
597 } else if (positive.rounding != null) { in patternInfoToProperties()
602 positive.rounding.toBigDecimal().setScale(positive.fractionNumerals)); in patternInfoToProperties()
/third_party/skia/third_party/externals/spirv-cross/shaders/vert/
Docean.vert162 uvec4 rounding;
163 rounding.x = uPosition.x < 32u ? mask.x : 0u;
164 rounding.y = uPosition.y < 32u ? mask.x : 0u;
165 rounding.z = uPosition.x < 32u ? mask.y : 0u;
166 rounding.w = uPosition.y < 32u ? mask.y : 0u;
168 //rounding = uPosition.xyxy * mask.xxyy;
169 vec4 lower_upper_snapped = vec4((uPosition.xyxy + rounding) & (~mask).xxyy);

12345678910>>...24