Home
last modified time | relevance | path

Searched refs:denom (Results 1 – 25 of 5590) sorted by relevance

12345678910>>...224

/dports/databases/qof/qof-0.8.8/qof/
H A Dqofnumeric.c66 if ((b.denom < a.denom) && ((a.denom % b.denom) == 0)) in qof_numeric_lcd()
68 if ((a.denom < b.denom) && ((b.denom % a.denom) == 0)) in qof_numeric_lcd()
232 if ((a.denom == b.denom) && (a.denom > 0)) in qof_numeric_equal()
306 denom = a.denom; in qof_numeric_add()
309 denom = a.denom; in qof_numeric_add()
314 denom = b.denom; in qof_numeric_add()
412 denom = a.denom; in qof_numeric_mul()
414 denom = a.denom; in qof_numeric_mul()
443 product.denom = a.denom * b.denom; in qof_numeric_mul()
460 product.denom = a.denom * b.denom; in qof_numeric_mul()
[all …]
/dports/math/libdivide/libdivide-5.0/
H A Dconstant_fast_div.h32 (denom==-2 || \
33 denom==-4 || \
34 denom==-8 || \
45 denom==-16384)
47 (denom==2 || \
48 denom==4 || \
49 denom==8 || \
50 denom==16 || \
60 denom==16384)
61 #define U16_ISPOW2(denom) (S16_ISPOW2_POS(denom) || denom==32768) argument
[all …]
H A Dlibdivide.h771 return libdivide_u16_do_raw(numer, denom->magic, denom->more); in libdivide_u16_do()
785 if (!denom->magic) { in libdivide_u16_recover()
823 if (!denom->magic) { in libdivide_u16_branchfree_recover()
917 if (!denom->magic) { in libdivide_u32_do()
943 if (!denom->magic) { in libdivide_u32_recover()
981 if (!denom->magic) { in libdivide_u32_branchfree_recover()
1077 if (!denom->magic) { in libdivide_u64_do()
1103 if (!denom->magic) { in libdivide_u64_recover()
1147 if (!denom->magic) { in libdivide_u64_branchfree_recover()
1287 return libdivide_s16_do_raw(numer, denom->magic, denom->more); in libdivide_s16_do()
[all …]
/dports/www/chromium-legacy/chromium-88.0.4324.182/third_party/openscreen/src/util/
H A Dinteger_division_unittest.cc20 void TestRangeAboutZero(int denom, in TestRangeAboutZero() argument
42 for (int denom : kDenominators) { in TEST() local
43 TestRangeAboutZero(denom, denom == 3 ? 11 : 15, -3, function_to_test); in TEST()
49 for (int denom : kDenominators) { in TEST() local
50 TestRangeAboutZero(denom, denom == 3 ? 11 : 15, -3, function_to_test); in TEST()
57 for (int denom = 1; denom <= 6; ++denom) { in TEST() local
66 for (int denom : kDenominators) { in TEST() local
67 TestRangeAboutZero(denom, denom == 3 ? 10 : 14, -3, function_to_test); in TEST()
74 for (int denom : kDenominators) { in TEST() local
75 TestRangeAboutZero(denom, denom == 3 ? 10 : 14, -3, function_to_test); in TEST()
[all …]
H A Dinteger_division.h18 constexpr auto DivideRoundingUp(Integer num, Integer denom) { in DivideRoundingUp() argument
19 if (denom < Integer{0}) { in DivideRoundingUp()
21 denom *= -1; in DivideRoundingUp()
24 return num / denom; in DivideRoundingUp()
26 return (num + denom - Integer{1}) / denom; in DivideRoundingUp()
45 constexpr auto DivideRoundingNearest(Integer num, Integer denom) { in DivideRoundingNearest() argument
46 if (denom < Integer{0}) { in DivideRoundingNearest()
48 denom *= -1; in DivideRoundingNearest()
51 return (num - ((denom - Integer{1}) / 2)) / denom; in DivideRoundingNearest()
53 return (num + (denom / 2)) / denom; in DivideRoundingNearest()
[all …]
/dports/www/qt5-webengine/qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/openscreen/src/util/
H A Dinteger_division_unittest.cc20 void TestRangeAboutZero(int denom, in TestRangeAboutZero() argument
42 for (int denom : kDenominators) { in TEST() local
43 TestRangeAboutZero(denom, denom == 3 ? 11 : 15, -3, function_to_test); in TEST()
49 for (int denom : kDenominators) { in TEST() local
50 TestRangeAboutZero(denom, denom == 3 ? 11 : 15, -3, function_to_test); in TEST()
57 for (int denom = 1; denom <= 6; ++denom) { in TEST() local
66 for (int denom : kDenominators) { in TEST() local
67 TestRangeAboutZero(denom, denom == 3 ? 10 : 14, -3, function_to_test); in TEST()
74 for (int denom : kDenominators) { in TEST() local
75 TestRangeAboutZero(denom, denom == 3 ? 10 : 14, -3, function_to_test); in TEST()
[all …]
H A Dinteger_division.h18 constexpr auto DivideRoundingUp(Integer num, Integer denom) { in DivideRoundingUp() argument
19 if (denom < Integer{0}) { in DivideRoundingUp()
21 denom *= -1; in DivideRoundingUp()
24 return num / denom; in DivideRoundingUp()
26 return (num + denom - Integer{1}) / denom; in DivideRoundingUp()
45 constexpr auto DivideRoundingNearest(Integer num, Integer denom) { in DivideRoundingNearest() argument
46 if (denom < Integer{0}) { in DivideRoundingNearest()
48 denom *= -1; in DivideRoundingNearest()
51 return (num - ((denom - Integer{1}) / 2)) / denom; in DivideRoundingNearest()
53 return (num + (denom / 2)) / denom; in DivideRoundingNearest()
[all …]
/dports/security/keybase/client-v5.7.1/shared/ios/Pods/Folly/folly/
H A DMath.h40 return (num / denom) + in divFloorBranchless()
41 ((num % denom) != 0 ? 1 : 0) * in divFloorBranchless()
53 : num / denom; in divFloorBranchful()
62 return (num / denom) + in divCeilBranchless()
63 ((num % denom) != 0 ? 1 : 0) * in divCeilBranchless()
75 ? num / denom in divCeilBranchful()
85 return (num / denom) + in divRoundAwayBranchless()
86 ((num % denom) != 0 ? 1 : 0) * in divRoundAwayBranchless()
133 using R = decltype(num / denom); in divFloor()
153 using R = decltype(num / denom); in divCeil()
[all …]
/dports/math/libdivide/libdivide-5.0/doc/
H A DC-API.md31 int16_t libdivide_s16_do(int16_t numer, const struct libdivide_s16_t *denom);
32 uint16_t libdivide_u16_do(uint16_t numer, const struct libdivide_u16_t *denom);
33 int32_t libdivide_s32_do(int32_t numer, const struct libdivide_s32_t *denom);
34 uint32_t libdivide_u32_do(uint32_t numer, const struct libdivide_u32_t *denom);
35 int64_t libdivide_s64_do(int64_t numer, const struct libdivide_s64_t *denom);
123 int16_t libdivide_s16_recover(const struct libdivide_s16_t *denom);
124 uint16_t libdivide_u16_recover(const struct libdivide_u16_t *denom);
125 int32_t libdivide_s32_recover(const struct libdivide_s32_t *denom);
126 uint32_t libdivide_u32_recover(const struct libdivide_u32_t *denom);
127 int64_t libdivide_s64_recover(const struct libdivide_s64_t *denom);
[all …]
/dports/math/reduce/Reduce-svn5758-src/packages/specfn/
H A Dsimpfact.red221 denom := cdr denom;
369 cdr denom := car{'times.denomsimp}.cdr denom;
401 car denom := car {cadar denom};
410 car denom := {caar denom,cadar denom,car cddar denom -1};
486 cdr denom := car{'times.denomsimp}.cdr denom;
536 car denom := car {cadar denom};
546 car denom := {caar denom,cadar denom,car cddar denom-1};
556 car denom := car {cadar denom};
565 car denom := {caar denom,cadar denom,car cddar denom-1};
637 cdr denom := car{'times.denomsimp}.cdr denom;
[all …]
/dports/graphics/lightzone/LightZone-4.1.8-3-g36e87773/lightcrafts/extsrc/com/lightcrafts/media/jai/util/
H A DRational.java22 public long denom; field in Rational
26 this.denom = denom; in Rational()
31 this.denom = r.denom; in Rational()
146 denom = -denom; in normalize()
168 num = num * r.denom + r.num * denom; in add()
169 denom *= r.denom; in add()
185 num = num * r.denom - r.num * denom; in subtract()
186 denom *= r.denom; in subtract()
203 denom *= r.denom; in multiply()
212 num = denom; in invert()
[all …]
/dports/math/libdivide/libdivide-5.0/test/
H A Dtest_c99.c26 #define LOOP_START(denom) MIN(((denom*2)+LOOP_STEP), ((denom/2)+LOOP_STEP)) argument
27 #define LOOP_END(type, denom, range_max) MIN(MAX((type)MIN_RANGE, ABS(denom)*4), range_max-(LOOP_ST… argument
34 type native_result = numer / denom; \
41 type loop = (type)LOOP_START(denom); \
57 #define CONSTANT_OP_U16(numer, denom) FAST_DIV16U(numer, denom) in test_u16() argument
63 int16_t denom = (int16_t)-4003; // Prime in test_s16() local
64 struct libdivide_s16_t divider = libdivide_s16_gen(denom); in test_s16()
68 #define CONSTANT_OP_S16(numer, denom) FAST_DIV16(numer, denom) in test_s16() argument
72 #define CONSTANT_OP_NEG_S16(numer, denom) FAST_DIV16_NEG(numer, denom) in test_s16() argument
79 struct libdivide_u32_t divider = libdivide_u32_gen(denom); in test_u32()
[all …]
H A DDivideTest.h81 T denom = get_random(); in random_denominator() local
82 while (denom == 0) { in random_denominator()
83 denom = get_random(); in random_denominator()
85 return denom; in random_denominator()
104 T expect = numer / denom; in test_one()
113 PRINT_ERROR(denom); in test_one()
290 UNUSED(denom); in test_vectordivide_numerators()
303 void test_many(T denom) { in test_many() argument
311 if (recovered != denom) { in test_many()
315 PRINT_ERROR(denom); in test_many()
[all …]
/dports/finance/gnucash/gnucash-4.9/libgnucash/engine/test/
H A Dgtest-gnc-numeric.cpp31 EXPECT_EQ(value.denom(), 1); in TEST()
50 EXPECT_EQ(input.denom, value.denom()); in TEST()
62 denom = INT64_C(0); in TEST()
68 int num(123), denom(456); in TEST() local
80 EXPECT_EQ(1000, a.denom()); in TEST()
83 EXPECT_EQ(1000, b.denom()); in TEST()
89 EXPECT_EQ(1, d.denom()); in TEST()
99 EXPECT_EQ(100, h.denom()); in TEST()
395 EXPECT_EQ(1, c.denom()); in TEST()
554 EXPECT_EQ(1, r.denom()); in TEST()
[all …]
/dports/audio/muse-sequencer/muse-4.0.0/src/muse/
H A Dlibdivide.h888 return q >> denom->more; in libdivide_u32_do_alg1()
904 return t >> denom->more; in libdivide_u32_branchfree_do()
1110 return q >> denom->more; in libdivide_u64_do_alg1()
1330 ? denom->magic > 0 : denom->magic < 0; in libdivide_s32_recover()
1338 uint32_t d = (uint32_t)(magic_was_negated ? -denom->magic : denom->magic); in libdivide_s32_recover()
1628 ? denom->magic > 0 : denom->magic < 0; in libdivide_s64_recover()
1630 uint64_t d = (uint64_t)(magic_was_negated ? -denom->magic : denom->magic); in libdivide_s64_recover()
1853 DenomType denom; member
1959 divider(const div_t& denom) : div(denom) { }
1997 return div.denom.magic == him.div.denom.magic &&
[all …]
/dports/math/py-sympy/sympy-1.9/sympy/polys/
H A Dfields.py172 if denom is None: denom = self.ring.one
173 numer, denom = numer.cancel(denom)
220 denom = self.ring.ground_new(denom)
294 self.denom = denom
329 denom = self.denom.set_ring(new_ring)
402 if f.denom == g.denom:
405 return f.new(f.numer*g.denom + f.denom*g.numer, f.denom*g.denom)
407 return f.new(f.numer + f.denom*g, f.denom)
446 if f.denom == g.denom:
449 return f.new(f.numer*g.denom - f.denom*g.numer, f.denom*g.denom)
[all …]
/dports/devel/folly/folly-2021.12.27.00/folly/
H A DMath.h41 return (num / denom) + in divFloorBranchless()
42 ((num % denom) != 0 ? 1 : 0) * in divFloorBranchless()
54 : num / denom; in divFloorBranchful()
63 return (num / denom) + in divCeilBranchless()
64 ((num % denom) != 0 ? 1 : 0) * in divCeilBranchless()
76 ? num / denom in divCeilBranchful()
86 return (num / denom) + in divRoundAwayBranchless()
87 ((num % denom) != 0 ? 1 : 0) * in divRoundAwayBranchless()
134 using R = decltype(num / denom); in divFloor()
154 using R = decltype(num / denom); in divCeil()
[all …]
/dports/graphics/bmeps/dktools-4.31.1/src/libdk4bif/
H A Ddk4pxres.c49 pxrptr->denom = 255UL; in dk4pxres_init()
65 dk4_px_t denom; in dk4pxres_setup() local
78 pxrptr->denom = 255UL; in dk4pxres_setup()
92 pxrptr->denom = (unsigned long)denom; in dk4pxres_setup()
112 unsigned long denom; in dk4pxres_setup_from_maxval() local
127 pxrptr->denom = 255UL; in dk4pxres_setup_from_maxval()
139 pxrptr->denom = denom = (unsigned long)imaxval; in dk4pxres_setup_from_maxval()
159 unsigned long denom; in dk4pxres_setup_to_maxval() local
173 pxrptr->denom = 255UL; in dk4pxres_setup_to_maxval()
182 pxrptr->denom = denom; in dk4pxres_setup_to_maxval()
[all …]
/dports/graphics/optipng/optipng-0.7.7/src/optipng/
H A Dratio.c95 if (denom == 0) in opng_sprint_uratio_impl()
101 if (num < denom && denom / (denom - num) < 20000) in opng_sprint_uratio_impl()
104 scaled_ratio = ((double)num * (double)scale) / (double)denom; in opng_sprint_uratio_impl()
117 integer_part = num / denom; in opng_sprint_uratio_impl()
118 remainder = num % denom; in opng_sprint_uratio_impl()
143 integer_part = num / denom; in opng_sprint_uratio_impl()
144 if (remainder > (denom - 1) / 2) in opng_sprint_uratio_impl()
159 opng_uxlong_impl_t denom = ratio->denom; in opng_ulratio_to_factor_string() local
171 opng_uxlong_impl_t denom = ratio->denom; in opng_ulratio_to_percent_string() local
185 opng_uxlong_impl_t denom = ratio->denom; in opng_ullratio_to_factor_string() local
[all …]
/dports/graphics/py-pyx/PyX-0.15/pyx/graph/axis/
H A Dtick.py117 self.denom = 1
132 self.num, self.denom = x.num, x.denom
146 self.num, self.denom = self.denom, self.num
149 self.num, self.denom = self.denom ** (-power), self.num ** (-power)
155 self.denom = self.denom ** power
158 self.denom = int(self.denom) ** power
162 return self.num * other.denom < other.num * self.denom
168 return self.num * other.denom == other.num * self.denom
180 return rational((self.num * other.num, self.denom * other.denom))
184 self.denom *= other.denom
[all …]
/dports/math/primecount/primecount-7.2/include/
H A Dlibdivide.h612 if (!denom->magic) { in libdivide_u32_do()
639 if (!denom->magic) { in libdivide_u32_recover()
677 if (!denom->magic) { in libdivide_u32_branchfree_recover()
771 if (!denom->magic) { in libdivide_u64_do()
798 if (!denom->magic) { in libdivide_u64_recover()
841 if (!denom->magic) { in libdivide_u64_branchfree_recover()
952 if (!denom->magic) { in libdivide_s32_do()
1019 ? denom->magic > 0 : denom->magic < 0; in libdivide_s32_recover()
1183 ? denom->magic > 0 : denom->magic < 0; in libdivide_s64_recover()
2013 return div.denom.magic == other.denom.magic &&
[all …]
/dports/games/NBlood/NBlood-a1689a4/source/build/include/
H A Dlibdivide.h628 if (!denom->magic) { in libdivide_u32_do()
655 if (!denom->magic) { in libdivide_u32_recover()
693 if (!denom->magic) { in libdivide_u32_branchfree_recover()
787 if (!denom->magic) { in libdivide_u64_do()
814 if (!denom->magic) { in libdivide_u64_recover()
857 if (!denom->magic) { in libdivide_u64_branchfree_recover()
968 if (!denom->magic) { in libdivide_s32_do()
1035 ? denom->magic > 0 : denom->magic < 0; in libdivide_s32_recover()
1199 ? denom->magic > 0 : denom->magic < 0; in libdivide_s64_recover()
2029 return div.denom.magic == other.denom.magic &&
[all …]
/dports/net/ipsumdump/ipsumdump-1.86/libclick-2.1/include/click/
H A Dlibdivide.h249 uint8_t more = denom->more; in libdivide_u32_do()
266 uint8_t more = denom->more; in libdivide_u32_recover()
287 uint64_t d = (1ULL << 32) | denom->magic; in libdivide_u32_recover()
300 return full_q + (denom->magic != 0); in libdivide_u32_recover()
305 … struct libdivide_u32_t denom_u32 = {denom->magic, (uint8_t)(denom->more | LIBDIVIDE_ADD_MARKER)}; in libdivide_u32_branchfree_recover()
310 uint8_t more = denom->more; in libdivide_u32_get_algorithm()
317 return numer >> (denom->more & LIBDIVIDE_32_SHIFT_MASK); in libdivide_u32_do_alg0()
321 uint32_t q = libdivide__mullhi_u32(denom->magic, numer); in libdivide_u32_do_alg1()
322 return q >> denom->more; in libdivide_u32_do_alg1()
331 return t >> (denom->more & LIBDIVIDE_32_SHIFT_MASK); in libdivide_u32_do_alg2()
[all …]
/dports/games/libretro-prboom/libretro-prboom-cc80175/deps/libmad/
H A Dtimer.c120 *denom /= factor; in reduce_rational()
134 if (denom < scale) in scale_rational()
135 return numer * (scale / denom) + numer * (scale % denom) / denom; in scale_rational()
136 if (denom < numer) in scale_rational()
137 return scale * (numer / denom) + scale * (numer % denom) / denom; in scale_rational()
150 if (numer >= denom && denom > 0) { in mad_timer_set()
152 numer %= denom; in mad_timer_set()
155 switch (denom) { in mad_timer_set()
316 switch (denom) { in mad_timer_fraction()
373 unsigned long denom; in mad_timer_string() local
[all …]
/dports/games/libretro-scummvm/scummvm-7b1e929/backends/platform/libretro/deps/libmad/
H A Dtimer.c120 *denom /= factor; in reduce_rational()
134 if (denom < scale) in scale_rational()
135 return numer * (scale / denom) + numer * (scale % denom) / denom; in scale_rational()
136 if (denom < numer) in scale_rational()
137 return scale * (numer / denom) + scale * (numer % denom) / denom; in scale_rational()
150 if (numer >= denom && denom > 0) { in mad_timer_set()
152 numer %= denom; in mad_timer_set()
155 switch (denom) { in mad_timer_set()
316 switch (denom) { in mad_timer_fraction()
373 unsigned long denom; in mad_timer_string() local
[all …]

12345678910>>...224