Home
last modified time | relevance | path

Searched refs:fraction (Results 1 – 25 of 287) sorted by relevance

12345678910>>...12

/third_party/jerryscript/jerry-core/ecma/base/
Decma-helpers-number.c54 uint64_t fraction) /**< fraction */ in ecma_number_pack() argument
57 JERRY_ASSERT ((fraction & ~((1ull << ECMA_NUMBER_FRACTION_WIDTH) - 1)) == 0); in ecma_number_pack()
61 ((uint32_t) fraction)); in ecma_number_pack()
117 uint64_t fraction) /**< fraction */ in ecma_number_pack() argument
121 fraction); in ecma_number_pack()
124 JERRY_ASSERT ((fraction & ~((1ull << ECMA_NUMBER_FRACTION_WIDTH) - 1)) == 0); in ecma_number_pack()
178 uint64_t fraction; in ecma_number_get_fraction_field() local
180 ecma_number_unpack (num, NULL, NULL, &fraction); in ecma_number_get_fraction_field()
182 return fraction; in ecma_number_get_fraction_field()
229 uint64_t fraction = ecma_number_get_fraction_field (num); in ecma_number_is_nan() local
[all …]
/third_party/skia/tests/sksl/intrinsics/
DModf.glsl11 vec4 fraction;
12 fraction.x = modf(value.x, whole.x);
13 ok.x = whole.x == 2.0 && fraction.x == 0.5;
14 fraction.xy = modf(value.xy, whole.xy);
15 ok.y = whole.xy == vec2(2.0, -2.0) && fraction.xy == vec2(0.5, -0.5);
16 fraction.xyz = modf(value.xyz, whole.xyz);
17 ok.z = whole.xyz == vec3(2.0, -2.0, 8.0) && fraction.xyz == vec3(0.5, -0.5, 0.0);
18 fraction = modf(value, whole);
19 ok.w = whole == expectedWhole && fraction == expectedFraction;
DModf.metal45 float4 fraction;
46 fraction.x = _skOutParamHelper0_modf(value.x, whole);
47 ok.x = whole.x == 2.0 && fraction.x == 0.5;
48 fraction.xy = _skOutParamHelper1_modf(value.xy, whole);
49 ok.y = all(whole.xy == float2(2.0, -2.0)) && all(fraction.xy == float2(0.5, -0.5));
50 fraction.xyz = _skOutParamHelper2_modf(value.xyz, whole);
51 ok.z = all(whole.xyz == float3(2.0, -2.0, 8.0)) && all(fraction.xyz == float3(0.5, -0.5, 0.0));
52 fraction = _skOutParamHelper3_modf(value, whole);
53 ok.w = all(whole == expectedWhole) && all(fraction == expectedFraction);
DModf.asm.frag18 OpName %fraction "fraction"
99 %fraction = OpVariable %_ptr_Function_v4float Function
114 %57 = OpAccessChain %_ptr_Function_float %fraction %int_0
122 %63 = OpLoad %v4float %fraction
137 %76 = OpLoad %v4float %fraction
139 OpStore %fraction %77
147 %86 = OpLoad %v4float %fraction
163 %103 = OpLoad %v4float %fraction
165 OpStore %fraction %104
173 %113 = OpLoad %v4float %fraction
[all …]
/third_party/skia/resources/sksl/intrinsics/
DModf.sksl8 float4 whole, fraction;
10 fraction.x = modf(value.x, whole.x);
11 ok.x = whole.x == expectedWhole.x && fraction.x == expectedFraction.x;
12 fraction.xy = modf(value.xy, whole.xy);
13 ok.y = whole.xy == expectedWhole.xy && fraction.xy == expectedFraction.xy;
14 fraction.xyz = modf(value.xyz, whole.xyz);
15 ok.z = whole.xyz == expectedWhole.xyz && fraction.xyz == expectedFraction.xyz;
16 fraction.xyzw = modf(value.xyzw, whole.xyzw);
17 ok.w = whole.xyzw == expectedWhole.xyzw && fraction.xyzw == expectedFraction.xyzw;
/third_party/rust/crates/minimal-lexical/tests/
Dslow_tests.rs53 …let fraction = b"470328229206232720882843964341106861825299013071623822127928412503377536351043759… in slow_test() localVariable
63 let result = slow::slow::<f64, _, _>(num.clone(), fp, integer.iter(), fraction.iter()); in slow_test()
68 …let fraction = b"470328229206232720882843964341106861825299013071623822127928412503377536351043759… in slow_test() localVariable
69 let result = slow::slow::<f64, _, _>(num.clone(), fp, integer.iter(), fraction.iter()); in slow_test()
75 …let fraction = b"988465674311580536566680721305029496276241413130815897397134275615404541548669375… in slow_test() localVariable
85 let result = slow::slow::<f64, _, _>(num.clone(), fp, integer.iter(), fraction.iter()); in slow_test()
90 …let fraction = b"988465674311580536566680721305029496276241413130815897397134275615404541548669375… in slow_test() localVariable
91 let result = slow::slow::<f64, _, _>(num.clone(), fp, integer.iter(), fraction.iter()); in slow_test()
272 …let fraction = b"470328229206232720882843964341106861825299013071623822127928412503377536351043759… in parse_mantissa_test() localVariable
273 let (bigmant, count) = slow::parse_mantissa(integer.iter(), fraction.iter(), max_digits); in parse_mantissa_test()
[all …]
Dparse_tests.rs4 fn check_parse_float<F: num::Float>(integer: &str, fraction: &str, exponent: i32, expected: F) { in check_parse_float()
6 let fraction = fraction.as_bytes().iter(); in check_parse_float() localVariable
7 assert!(expected == parse::parse_float::<F, _, _>(integer, fraction, exponent)); in check_parse_float()
/third_party/musl/libc-test/src/functionalext/supplement/math/math_gtest/
Dmath_frexp_test.cpp40 double fraction = frexp(inputNum, &exponent); variable
41 EXPECT_DOUBLE_EQ(2048.0, scalbn(fraction, exponent));
69 float fraction = frexpf(inputNum, &exponent); variable
70 EXPECT_FLOAT_EQ(2048.0f, scalbnf(fraction, exponent));
82 float fraction = frexpf(inputNum, &exponent); variable
83 EXPECT_FLOAT_EQ(6.3f, scalbnf(fraction, exponent));
95 long double fraction = frexpl(inputNum, &exponent); variable
96 EXPECT_DOUBLE_EQ(2048.0L, scalbnl(fraction, exponent));
/third_party/glslang/SPIRV/
Dhex_float.h685 uint_type fraction = static_cast<uint_type>((bits & HF::fraction_encode_mask)
688 const bool is_zero = exponent == 0 && fraction == 0;
702 while ((fraction & HF::fraction_top_bit) == 0) {
703 fraction = static_cast<uint_type>(fraction << 1);
708 fraction = static_cast<uint_type>(fraction << 1); // eat the leading 1
709 fraction &= HF::fraction_represent_mask;
715 while (fraction_nibbles > 0 && (fraction & 0xF) == 0) {
717 fraction = static_cast<uint_type>(fraction >> 4);
729 << std::setfill('0') << std::hex << fraction;
893 uint_type fraction = 0;
[all …]
/third_party/rust/crates/minimal-lexical/src/
Dparse.rs23 fraction: Iter2, in parse_number_fast()
38 for &c in fraction { in parse_number_fast()
58 fn parse_number<'a, Iter1, Iter2>(mut integer: Iter1, mut fraction: Iter2, exponent: i32) -> Number in parse_number()
64 if let Some(num) = parse_number_fast(integer.clone(), fraction.clone(), exponent) { in parse_number()
88 for &c in &mut fraction { in parse_number()
98 for c in fraction { in parse_number()
146 pub fn parse_float<'a, F, Iter1, Iter2>(integer: Iter1, fraction: Iter2, exponent: i32) -> F in parse_float()
153 let num = parse_number(integer.clone(), fraction.clone(), exponent); in parse_float()
164 fp = slow::<F, _, _>(num, fp, integer, fraction); in parse_float()
Dslow.rs40 fraction: Iter2, in slow()
59 let (bigmant, digits) = parse_mantissa(integer, fraction, F::MAX_DIGITS); in slow()
267 mut fraction: Iter2, in parse_mantissa()
309 round_up_nonzero!(format, fraction, result, count); in parse_mantissa()
321 for &c in &mut fraction { in parse_mantissa()
330 'fraction: loop { in parse_mantissa()
333 if let Some(&c) = fraction.next() { in parse_mantissa()
336 break 'fraction; in parse_mantissa()
344 round_up_nonzero!(format, fraction, result, count); in parse_mantissa()
/third_party/skia/third_party/externals/swiftshader/third_party/SPIRV-Tools/source/util/
Dhex_float.h755 uint_type fraction = static_cast<uint_type>((bits & HF::fraction_encode_mask)
758 const bool is_zero = exponent == 0 && fraction == 0;
772 while ((fraction & HF::fraction_top_bit) == 0) {
773 fraction = static_cast<uint_type>(fraction << 1);
778 fraction = static_cast<uint_type>(fraction << 1); // eat the leading 1
779 fraction &= HF::fraction_represent_mask;
785 while (fraction_nibbles > 0 && (fraction & 0xF) == 0) {
787 fraction = static_cast<uint_type>(fraction >> 4);
799 << std::setfill('0') << std::hex << fraction;
963 uint_type fraction = 0;
[all …]
/third_party/skia/third_party/externals/spirv-tools/source/util/
Dhex_float.h755 uint_type fraction = static_cast<uint_type>((bits & HF::fraction_encode_mask)
758 const bool is_zero = exponent == 0 && fraction == 0;
772 while ((fraction & HF::fraction_top_bit) == 0) {
773 fraction = static_cast<uint_type>(fraction << 1);
778 fraction = static_cast<uint_type>(fraction << 1); // eat the leading 1
779 fraction &= HF::fraction_represent_mask;
785 while (fraction_nibbles > 0 && (fraction & 0xF) == 0) {
787 fraction = static_cast<uint_type>(fraction >> 4);
799 << std::setfill('0') << std::hex << fraction;
963 uint_type fraction = 0;
[all …]
/third_party/ffmpeg/libavformat/
Dreplaygain.c41 char *fraction; in parse_value() local
55 db = strtol(value, &fraction, 0); in parse_value()
56 if (*fraction++ == '.') { in parse_value()
57 while (av_isdigit(*fraction) && scale) { in parse_value()
58 mb += scale * (*fraction - '0'); in parse_value()
60 fraction++; in parse_value()
/third_party/spirv-tools/source/util/
Dhex_float.h756 uint_type fraction = static_cast<uint_type>((bits & HF::fraction_encode_mask)
759 const bool is_zero = exponent == 0 && fraction == 0;
773 while ((fraction & HF::fraction_top_bit) == 0) {
774 fraction = static_cast<uint_type>(fraction << 1);
779 fraction = static_cast<uint_type>(fraction << 1); // eat the leading 1
780 fraction &= HF::fraction_represent_mask;
786 while (fraction_nibbles > 0 && (fraction & 0xF) == 0) {
788 fraction = static_cast<uint_type>(fraction >> 4);
800 << std::setfill('0') << std::hex << fraction;
965 uint_type fraction = 0;
[all …]
/third_party/skia/gm/
Dstringart.cpp74 SkScalar fraction = 1.0f - TimeUtils::Scaled(1e-9 * nanos, 2.0f/kDesiredDurationSecs, 2.0f); in onAnimate() local
75 if (fraction <= 0.0f) { in onAnimate()
76 fraction = -fraction; in onAnimate()
79 SkASSERT(fraction >= 0.0f && fraction <= 1.0f); in onAnimate()
81 fNumSteps = (int) (fraction * kMaxNumSteps); in onAnimate()
/third_party/mesa3d/src/intel/ci/
Ddeqp-iris-glk.toml11 fraction = 6
24 fraction = 8
35 fraction = 8
54 fraction = 2
67 fraction = 2
79 fraction = 2
92 fraction = 2
104 fraction = 2
/third_party/mesa3d/src/freedreno/ci/
Ddeqp-freedreno-a630-vk.toml6 fraction = 39
16 fraction = 150
27 fraction = 10
38 fraction = 30
49 fraction = 10
60 fraction = 10
/third_party/protobuf/src/google/protobuf/stubs/
Dmathutil.h133 const T fraction, const T margin);
138 const T fraction, const T margin) { in WithinFractionOrMargin() argument
140 GOOGLE_DCHECK((T(0) < fraction || T(0) == fraction) && in WithinFractionOrMargin()
141 fraction < T(1) && in WithinFractionOrMargin()
154 T relative_margin = static_cast<T>(fraction * Max(Abs(x), Abs(y))); in WithinFractionOrMargin()
/third_party/protobuf/src/google/protobuf/util/
Dfield_comparator.h142 void SetFractionAndMargin(const FieldDescriptor* field, double fraction,
151 void SetDefaultFractionAndMargin(double fraction, double margin);
164 double fraction; member
166 Tolerance() : fraction(0.0), margin(0.0) {} in Tolerance()
167 Tolerance(double f, double m) : fraction(f), margin(m) {} in Tolerance()
Dfield_comparator.cc138 void DefaultFieldComparator::SetDefaultFractionAndMargin(double fraction, in SetDefaultFractionAndMargin() argument
140 default_tolerance_ = Tolerance(fraction, margin); in SetDefaultFractionAndMargin()
145 double fraction, in SetFractionAndMargin() argument
151 map_tolerance_[field] = Tolerance(fraction, margin); in SetFractionAndMargin()
198 value_1, value_2, static_cast<T>(tolerance->fraction), in CompareDoubleOrFloat()
/third_party/python/Doc/tutorial/
Dfloatingpoint.rst15 fractions. For example, the decimal fraction ::
19 has value 1/10 + 2/100 + 5/1000, and in the same way the binary fraction ::
32 The problem is easier to understand at first in base 10. Consider the fraction
33 1/3. You can approximate that as a base 10 fraction::
50 decimal value 0.1 cannot be represented exactly as a base 2 fraction. In base
51 2, 1/10 is the infinitely repeating fraction ::
56 machines today, floats are approximated using a binary fraction with
58 with the denominator as a power of two. In the case of 1/10, the binary fraction
78 of 1/10, the actual stored value is the nearest representable binary fraction.
81 nearest approximate binary fraction. For example, the numbers ``0.1`` and
[all …]
/third_party/optimized-routines/math/test/rtest/
Dsemi.c619 int fraction = x[0] & 0x007fffff; in test_isnanf() local
620 if ((exponent == 0x7f800000) && (fraction != 0)) out[0] = 1; in test_isnanf()
673 int fraction = (x[0] & 0x000fffff) | x[1]; in test_fpclassify() local
675 if ((exponent == 0x00) && (fraction == 0)) out[0] = 0; in test_fpclassify()
676 else if ((exponent == 0x00) && (fraction != 0)) out[0] = 4; in test_fpclassify()
677 else if ((exponent == 0x7ff) && (fraction == 0)) out[0] = 3; in test_fpclassify()
678 else if ((exponent == 0x7ff) && (fraction != 0)) out[0] = 7; in test_fpclassify()
686 int fraction = x[0] & 0x007fffff; in test_fpclassifyf() local
688 if ((exponent == 0x000) && (fraction == 0)) out[0] = 0; in test_fpclassifyf()
689 else if ((exponent == 0x000) && (fraction != 0)) out[0] = 4; in test_fpclassifyf()
[all …]
/third_party/node/benchmark/
D_benchmark_progress.js11 function fraction(numerator, denominator) { function
103 `${fraction(completedFiles, scheduledFiles)} files | ` +
104 `${fraction(completedRunsForFile, runsPerFile)} runs | ` +
105 `${fraction(completedConfig, scheduledConfig)} configs]: ` +
/third_party/skia/third_party/externals/harfbuzz/test/shape/data/in-house/tests/
Dautomatic-fractions.tests1 …44,U+0034,U+0035,U+0036;[one.numr=0+600|two.numr=1+600|three.numr=2+600|fraction=3+252|four.small=…
2 …44,U+0034,U+0035,U+0036;[one.numr=0+600|two.numr=1+600|three.numr=2+600|fraction=3+252|four.small=…
3 …U+0665,U+0666;[uni0661.numr=0+600|uni0662.numr=1+600|uni0663.numr=2+600|fraction=3+252|uni0664.sma…

12345678910>>...12