Home
last modified time | relevance | path

Searched refs:BigRat (Results 1 – 25 of 502) sorted by relevance

12345678910>>...21

/dports/math/cocoalib/CoCoALib-0.99712/src/tests/
H A Dtest-NumTheory3.C69 CoCoA_ASSERT_ALWAYS(CFApprox(ConvertTo<BigRat>(1.4142135), BigRat(1,1)) == BigRat(1,1)); in program()
74 CoCoA_ASSERT_ALWAYS(SimplestBigRatBetween(BigRat(1,1), BigRat(2,1)) == BigRat(1,1)); in program()
75 CoCoA_ASSERT_ALWAYS(SimplestBigRatBetween(BigRat(-2,1), BigRat(-1,1)) == BigRat(-1,1)); in program()
76 CoCoA_ASSERT_ALWAYS(SimplestBigRatBetween(BigRat(-1,1), BigRat(1,1)) == BigRat(0,1)); in program()
77 CoCoA_ASSERT_ALWAYS(SimplestBigRatBetween(BigRat(0,1), BigRat(1,1)) == BigRat(0,1)); in program()
78 CoCoA_ASSERT_ALWAYS(SimplestBigRatBetween(BigRat(-1,1), BigRat(0,1)) == BigRat(0,1)); in program()
79 CoCoA_ASSERT_ALWAYS(SimplestBigRatBetween(BigRat(1,1), BigRat(4,3)) == BigRat(1,1)); in program()
80 CoCoA_ASSERT_ALWAYS(SimplestBigRatBetween(BigRat(4,3), BigRat(2,1)) == BigRat(2,1)); in program()
81 CoCoA_ASSERT_ALWAYS(SimplestBigRatBetween(BigRat(-4,3), BigRat(-1,1)) == BigRat(-1,1)); in program()
82 CoCoA_ASSERT_ALWAYS(SimplestBigRatBetween(BigRat(-2,1), BigRat(-4,3)) == BigRat(-2,1)); in program()
[all …]
H A Dtest-RingElem5.C70 ReadExprShouldWork("0", BigRat(0,1)); in program()
71 ReadExprShouldWork("007", BigRat(7,1)); in program()
72 ReadExprShouldWork("1", BigRat(1,1)); in program()
76 ReadExprShouldWork("+0", BigRat(0,1)); in program()
77 ReadExprShouldWork("+007", BigRat(7,1)); in program()
78 ReadExprShouldWork("+1", BigRat(1,1)); in program()
82 ReadExprShouldWork("-0", BigRat(0,1)); in program()
84 ReadExprShouldWork("-1", BigRat(-1,1)); in program()
88 ReadExprShouldWork("- 0", BigRat(0,1)); in program()
124 ReadExprShouldWork("0.", BigRat(0,1)); in program()
[all …]
H A Dtest-BigRat1.C41 cout << 101 << " = " << BigRat(101,1) << endl; in program()
45 BigRat frac(a,b); in program()
51 CoCoA_ASSERT_ALWAYS(frac == BigRat(-a,-b)); in program()
57 CoCoA_ASSERT_ALWAYS(frac == BigRat(a*b, b*b)); in program()
90 BigRat frac2; in program()
118 CoCoA_ASSERT_ALWAYS(frac2 == BigRat(80,-9)); in program()
122 CoCoA_ASSERT_ALWAYS(frac2 == BigRat(62,-9)); in program()
125 CoCoA_ASSERT_ALWAYS(frac2 == BigRat(-80,9)); in program()
128 CoCoA_ASSERT_ALWAYS(frac == BigRat(-80,9)); in program()
129 CoCoA_ASSERT_ALWAYS(frac2 == BigRat(a,b)); in program()
[all …]
H A Dtest-BigRat4.C41 BigRat q; in TestBigRatRead()
70 BigRat q; in TestBigRatReadError()
96 TestBigRatRead("1/2", BigRat(1,2), ""); in program()
97 TestBigRatRead(" 1/2", BigRat(1,2), ""); in program()
101 TestBigRatRead("1", BigRat(1,1), ""); in program()
102 TestBigRatRead("1 ", BigRat(1,1), " "); in program()
103 TestBigRatRead(" 1", BigRat(1,1), ""); in program()
104 TestBigRatRead(" 1 ", BigRat(1,1), " "); in program()
118 TestBigRatRead("0.5", BigRat(1,2), ""); in program()
125 TestBigRatRead("1.", BigRat(1,1), ""); in program()
[all …]
H A Dtest-BigRat2.C44 const BigRat q = BigRat(n,d); in program()
45 CoCoA_ASSERT_ALWAYS(q == BigRat(n,d, BigRat::AlreadyReduced)); in program()
46 CoCoA_ASSERT_ALWAYS(q == BigRat(BigInt(n),d, BigRat::AlreadyReduced)); in program()
47 CoCoA_ASSERT_ALWAYS(q == BigRat(n,BigInt(d), BigRat::AlreadyReduced)); in program()
48 CoCoA_ASSERT_ALWAYS(q == BigRat(BigInt(n),BigInt(d),BigRat::AlreadyReduced)); in program()
50 CoCoA_ASSERT_ALWAYS(den(BigRat(n,d, BigRat::AlreadyReduced)) > 0); in program()
51 CoCoA_ASSERT_ALWAYS(den(BigRat(BigInt(n),d, BigRat::AlreadyReduced)) > 0); in program()
52 CoCoA_ASSERT_ALWAYS(den(BigRat(n,BigInt(d), BigRat::AlreadyReduced)) > 0); in program()
53 CoCoA_ASSERT_ALWAYS(den(BigRat(BigInt(n),BigInt(d),BigRat::AlreadyReduced)) > 0); in program()
57 const BigRat recip = BigRat(d,n,BigRat::AlreadyReduced); in program()
/dports/math/giacxcas/CoCoALib-0.99700/src/tests/
H A Dtest-NumTheory3.C69 CoCoA_ASSERT_ALWAYS(CFApprox(ConvertTo<BigRat>(1.4142135), BigRat(1,1)) == BigRat(1,1)); in program()
74 CoCoA_ASSERT_ALWAYS(SimplestBigRatBetween(BigRat(1,1), BigRat(2,1)) == BigRat(1,1)); in program()
75 CoCoA_ASSERT_ALWAYS(SimplestBigRatBetween(BigRat(-2,1), BigRat(-1,1)) == BigRat(-1,1)); in program()
76 CoCoA_ASSERT_ALWAYS(SimplestBigRatBetween(BigRat(-1,1), BigRat(1,1)) == BigRat(0,1)); in program()
77 CoCoA_ASSERT_ALWAYS(SimplestBigRatBetween(BigRat(0,1), BigRat(1,1)) == BigRat(0,1)); in program()
78 CoCoA_ASSERT_ALWAYS(SimplestBigRatBetween(BigRat(-1,1), BigRat(0,1)) == BigRat(0,1)); in program()
79 CoCoA_ASSERT_ALWAYS(SimplestBigRatBetween(BigRat(1,1), BigRat(4,3)) == BigRat(1,1)); in program()
80 CoCoA_ASSERT_ALWAYS(SimplestBigRatBetween(BigRat(4,3), BigRat(2,1)) == BigRat(2,1)); in program()
81 CoCoA_ASSERT_ALWAYS(SimplestBigRatBetween(BigRat(-4,3), BigRat(-1,1)) == BigRat(-1,1)); in program()
82 CoCoA_ASSERT_ALWAYS(SimplestBigRatBetween(BigRat(-2,1), BigRat(-4,3)) == BigRat(-2,1)); in program()
[all …]
H A Dtest-RingElem5.C70 ReadExprShouldWork("0", BigRat(0,1)); in program()
71 ReadExprShouldWork("007", BigRat(7,1)); in program()
72 ReadExprShouldWork("1", BigRat(1,1)); in program()
76 ReadExprShouldWork("+0", BigRat(0,1)); in program()
77 ReadExprShouldWork("+007", BigRat(7,1)); in program()
78 ReadExprShouldWork("+1", BigRat(1,1)); in program()
82 ReadExprShouldWork("-0", BigRat(0,1)); in program()
84 ReadExprShouldWork("-1", BigRat(-1,1)); in program()
88 ReadExprShouldWork("- 0", BigRat(0,1)); in program()
124 ReadExprShouldWork("0.", BigRat(0,1)); in program()
[all …]
H A Dtest-BigRat4.C41 BigRat q; in TestBigRatRead()
69 TestBigRatRead("1/2", BigRat(1,2), ""); in program()
70 TestBigRatRead(" 1/2", BigRat(1,2), ""); in program()
74 TestBigRatRead("1", BigRat(1,1), ""); in program()
75 TestBigRatRead("1 ", BigRat(1,1), " "); in program()
76 TestBigRatRead(" 1", BigRat(1,1), ""); in program()
77 TestBigRatRead(" 1 ", BigRat(1,1), " "); in program()
79 TestBigRatRead("1/", BigRat(1,1), "/"); in program()
91 TestBigRatRead("0.5", BigRat(1,2), ""); in program()
96 TestBigRatRead("1.", BigRat(1,1), ""); in program()
[all …]
H A Dtest-BigRat1.C41 cout << 101 << " = " << BigRat(101,1) << endl; in program()
45 BigRat frac(a,b); in program()
51 CoCoA_ASSERT_ALWAYS(frac == BigRat(-a,-b)); in program()
57 CoCoA_ASSERT_ALWAYS(frac == BigRat(a*b, b*b)); in program()
90 BigRat frac2; in program()
118 CoCoA_ASSERT_ALWAYS(frac2 == BigRat(80,-9)); in program()
122 CoCoA_ASSERT_ALWAYS(frac2 == BigRat(62,-9)); in program()
125 CoCoA_ASSERT_ALWAYS(frac2 == BigRat(-80,9)); in program()
128 CoCoA_ASSERT_ALWAYS(frac == BigRat(-80,9)); in program()
129 CoCoA_ASSERT_ALWAYS(frac2 == BigRat(a,b)); in program()
[all …]
H A Dtest-BigRat2.C44 const BigRat q = BigRat(n,d); in program()
45 CoCoA_ASSERT_ALWAYS(q == BigRat(n,d, BigRat::AlreadyReduced)); in program()
46 CoCoA_ASSERT_ALWAYS(q == BigRat(BigInt(n),d, BigRat::AlreadyReduced)); in program()
47 CoCoA_ASSERT_ALWAYS(q == BigRat(n,BigInt(d), BigRat::AlreadyReduced)); in program()
48 CoCoA_ASSERT_ALWAYS(q == BigRat(BigInt(n),BigInt(d),BigRat::AlreadyReduced)); in program()
50 CoCoA_ASSERT_ALWAYS(den(BigRat(n,d, BigRat::AlreadyReduced)) > 0); in program()
51 CoCoA_ASSERT_ALWAYS(den(BigRat(BigInt(n),d, BigRat::AlreadyReduced)) > 0); in program()
52 CoCoA_ASSERT_ALWAYS(den(BigRat(n,BigInt(d), BigRat::AlreadyReduced)) > 0); in program()
53 CoCoA_ASSERT_ALWAYS(den(BigRat(BigInt(n),BigInt(d),BigRat::AlreadyReduced)) > 0); in program()
57 const BigRat recip = BigRat(d,n,BigRat::AlreadyReduced); in program()
/dports/math/cocoalib/CoCoALib-0.99712/include/CoCoA/
H A DBigRatOps.H37 void swap(BigRat& a, BigRat& b);
39 const BigRat abs(const BigRat& Q);
40 const BigRat operator-(const BigRat& Q);
42 const BigRat operator+(const BigRat& Q1, const BigRat& Q2);
43 const BigRat operator-(const BigRat& Q1, const BigRat& Q2);
44 const BigRat operator*(const BigRat& Q1, const BigRat& Q2);
45 const BigRat operator/(const BigRat& Q1, const BigRat& Q2);
73 int cmp(const BigRat& Q1, const BigRat& Q2);
79 int CmpAbs(const BigRat& Q1, const BigRat& Q2);
85 bool operator==(const BigRat& Q1, const BigRat& Q2);
[all …]
H A DBigRat.H39 class BigRat
47 BigRat();
57 BigRat(const BigRat& from); // std copy ctor
58 BigRat(BigRat&& from); // std move ctor
66 friend BigRat BigRatFromMPQ(const mpq_t q) { return BigRat(q, BigRat::CopyFromMPQ); } in BigRatFromMPQ()
73 BigRat& operator=(const BigRat& rhs);
77 BigRat& operator+=(const BigRat& rhs);
78 BigRat& operator-=(const BigRat& rhs);
79 BigRat& operator*=(const BigRat& rhs);
80 BigRat& operator/=(const BigRat& rhs);
[all …]
/dports/math/giacxcas/CoCoALib-0.99700/include/CoCoA/
H A DBigRatOps.H37 void swap(BigRat& a, BigRat& b);
39 const BigRat abs(const BigRat& Q);
40 const BigRat operator-(const BigRat& Q);
42 const BigRat operator+(const BigRat& Q1, const BigRat& Q2);
43 const BigRat operator-(const BigRat& Q1, const BigRat& Q2);
44 const BigRat operator*(const BigRat& Q1, const BigRat& Q2);
45 const BigRat operator/(const BigRat& Q1, const BigRat& Q2);
80 int cmp(const BigRat& Q1, const BigRat& Q2);
86 int CmpAbs(const BigRat& Q1, const BigRat& Q2);
92 bool operator==(const BigRat& Q1, const BigRat& Q2);
[all …]
H A DBigRat.H39 class BigRat
47 BigRat();
57 BigRat(const BigRat& from);
58 ~BigRat();
65 friend BigRat BigRatFromMPQ(const mpq_t q) { return BigRat(q, BigRat::CopyFromMPQ); } in BigRatFromMPQ()
72 BigRat& operator=(const BigRat& rhs);
76 BigRat& operator+=(const BigRat& rhs);
77 BigRat& operator-=(const BigRat& rhs);
78 BigRat& operator*=(const BigRat& rhs);
79 BigRat& operator/=(const BigRat& rhs);
[all …]
/dports/math/cocoalib/CoCoALib-0.99712/src/AlgebraicCore/
H A DBigRatOps.C42 const BigRat abs(const BigRat& Q) in abs()
49 const BigRat operator-(const BigRat& Q)
56 const BigRat operator+(const BigRat& Q1, const BigRat& Q2)
63 const BigRat operator-(const BigRat& Q1, const BigRat& Q2)
70 const BigRat operator*(const BigRat& Q1, const BigRat& Q2)
77 const BigRat operator/(const BigRat& Q1, const BigRat& Q2)
211 int cmp(const BigRat& Q1, const BigRat& Q2) in cmp()
243 int CmpAbs(const BigRat& Q1, const BigRat& Q2) in CmpAbs()
271 bool operator==(const BigRat& Q1, const BigRat& Q2)
276 bool operator!=(const BigRat& Q1, const BigRat& Q2)
[all …]
H A DBigRat.C49 BigRat::BigRat() in BigRat() function
121 BigRat::BigRat(const MantExp2& ME) in BigRat() function
162 BigRat::BigRat(const BigRat& from) // std copy ctor in BigRat() function
169 BigRat::BigRat(BigRat&& from) // std move ctor in BigRat() function
176 BigRat::~BigRat() in ~BigRat()
198 BigRat& BigRat::operator=(const BigRat& rhs)
206 BigRat& BigRat::operator+=(const BigRat& rhs)
212 BigRat& BigRat::operator-=(const BigRat& rhs)
218 BigRat& BigRat::operator*=(const BigRat& rhs)
224 BigRat& BigRat::operator/=(const BigRat& rhs)
[all …]
/dports/math/giacxcas/CoCoALib-0.99700/src/AlgebraicCore/
H A DBigRatOps.C49 const BigRat abs(const BigRat& Q) in abs()
56 const BigRat operator-(const BigRat& Q)
63 const BigRat operator+(const BigRat& Q1, const BigRat& Q2)
70 const BigRat operator-(const BigRat& Q1, const BigRat& Q2)
77 const BigRat operator*(const BigRat& Q1, const BigRat& Q2)
84 const BigRat operator/(const BigRat& Q1, const BigRat& Q2)
253 int cmp(const BigRat& Q1, const BigRat& Q2) in cmp()
285 int CmpAbs(const BigRat& Q1, const BigRat& Q2) in CmpAbs()
313 bool operator==(const BigRat& Q1, const BigRat& Q2)
318 bool operator!=(const BigRat& Q1, const BigRat& Q2)
[all …]
H A DBigRat.C49 BigRat::BigRat() in BigRat() function
120 BigRat::BigRat(const MantExp2& ME) in BigRat() function
133 BigRat::BigRat(const MantExp10& ME) in BigRat() function
161 BigRat::BigRat(const BigRat& from) in BigRat() function
168 BigRat::~BigRat() in ~BigRat()
190 BigRat& BigRat::operator=(const BigRat& rhs)
198 BigRat& BigRat::operator+=(const BigRat& rhs)
204 BigRat& BigRat::operator-=(const BigRat& rhs)
210 BigRat& BigRat::operator*=(const BigRat& rhs)
216 BigRat& BigRat::operator/=(const BigRat& rhs)
[all …]
/dports/math/cgal/CGAL-5.3/include/CGAL/CORE/
H A DBigRat.h172 BigRat& operator=(const BigRat& rhs) {
188 BigRat& operator +=(const BigRat& rhs) {
339 inline BigRat operator+(const BigRat& a, const BigRat& b) {
344 inline BigRat operator-(const BigRat& a, const BigRat& b) {
349 inline BigRat operator*(const BigRat& a, const BigRat& b) {
354 inline BigRat operator/(const BigRat& a, const BigRat& b) {
363 inline BigRat div_exact(const BigRat& x, const BigRat& y) { in div_exact()
377 inline BigRat gcd(const BigRat& x, const BigRat& y) { in gcd()
450 inline BigRat abs(const BigRat& a) { in abs()
456 inline BigRat neg(const BigRat& a) { in neg()
[all …]
/dports/math/p5-Math-BigRat/Math-BigRat-0.2620/t/
H A Dbig_ap.t4 # the rounding force in BigRat.
13 use Math::BigRat;
47 $z = Math::BigRat->new($proper_int);
59 $y = Math::BigRat->new("2");
68 $x = Math::BigRat->new("$proper");
69 $y = Math::BigRat->new("1");
88 $y = Math::BigRat->new("2");
97 $x = Math::BigRat->new("$proper");
98 $y = Math::BigRat->new("1");
102 $x = Math::BigRat->new("$proper");
[all …]
/dports/lang/perl5.34/perl-5.34.0/cpan/Math-BigRat/t/
H A Dbig_ap.t13 use Math::BigRat;
47 $z = Math::BigRat->new($proper_int);
59 $y = Math::BigRat->new("2");
68 $x = Math::BigRat->new("$proper");
69 $y = Math::BigRat->new("1");
76 $z = Math::BigRat->new($proper_int);
88 $y = Math::BigRat->new("2");
97 $x = Math::BigRat->new("$proper");
98 $y = Math::BigRat->new("1");
102 $x = Math::BigRat->new("$proper");
[all …]
/dports/lang/perl5.30/perl-5.30.3/cpan/Math-BigRat/t/
H A Dbig_ap.t13 use Math::BigRat;
47 $z = Math::BigRat->new($proper_int);
59 $y = Math::BigRat->new("2");
68 $x = Math::BigRat->new("$proper");
69 $y = Math::BigRat->new("1");
76 $z = Math::BigRat->new($proper_int);
88 $y = Math::BigRat->new("2");
97 $x = Math::BigRat->new("$proper");
98 $y = Math::BigRat->new("1");
102 $x = Math::BigRat->new("$proper");
[all …]
/dports/lang/perl5.32/perl-5.32.1/cpan/Math-BigRat/t/
H A Dbig_ap.t13 use Math::BigRat;
47 $z = Math::BigRat->new($proper_int);
59 $y = Math::BigRat->new("2");
68 $x = Math::BigRat->new("$proper");
69 $y = Math::BigRat->new("1");
76 $z = Math::BigRat->new($proper_int);
88 $y = Math::BigRat->new("2");
97 $x = Math::BigRat->new("$proper");
98 $y = Math::BigRat->new("1");
102 $x = Math::BigRat->new("$proper");
[all …]
/dports/lang/perl5-devel/perl5-5.35.4-102-ge43d289c7c/cpan/Math-BigRat/t/
H A Dbig_ap.t13 use Math::BigRat;
47 $z = Math::BigRat->new($proper_int);
59 $y = Math::BigRat->new("2");
68 $x = Math::BigRat->new("$proper");
69 $y = Math::BigRat->new("1");
76 $z = Math::BigRat->new($proper_int);
88 $y = Math::BigRat->new("2");
97 $x = Math::BigRat->new("$proper");
98 $y = Math::BigRat->new("1");
102 $x = Math::BigRat->new("$proper");
[all …]
/dports/math/cgal/CGAL-5.3/include/CGAL/
H A DCORE_BigRat.h115 class Fraction_traits< CORE::BigRat > {
117 typedef CORE::BigRat Type;
153 const ::CORE::BigRat& t;
180 bool operator()( ::CORE::BigRat t){
192 const ::CORE::BigRat& t;
208 class Benchmark_rep< CORE::BigRat > {
209 const CORE::BigRat& t;
237 typedef CORE::BigRat Real;
238 typedef CORE::BigRat NonInteger;
239 typedef CORE::BigRat Nested;
[all …]

12345678910>>...21