You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$(a_i)$, the coefficients, are elements of $A$. Theory states that if $A$ is a field, then $A[X]$ is euclidean. That means notions like division of gcd have a meaning, yielding an arithmetic of polynomials.
69
+
$(a_i)$, the coefficients, are elements of $\mathbb{A}$. Theory states that if $A$ is a field, then $\mathbb{A}[X]$ is euclidean. That means notions like division of gcd have a meaning, yielding an arithmetic of polynomials.
70
70
71
71
72
72
## Field of fractions
73
-
If $A$ is euclidean, we can build it's field of fractions: the smallest field containg $\mathbb{A}$.
74
-
We construct is a congruences classes of $A\times A$ with respect to the relation $(p,q) \sim (pp, qq)\ \mathrm{iff}\ p*qq = q*pp$. Basic algebra shows that this is a field (every element has an inverse). Canonical example is $\mathbb{Q}$, the set of rational numbers.
73
+
If $\mathbb{A}$ is euclidean, we can build it's field of fractions: the smallest field containg $\mathbb{A}$.
74
+
We construct is a congruences classes of $\mathbb{A}\times \mathbb{A}$ with respect to the relation $(p,q) \sim (pp, qq)\ \mathrm{iff}\ p*qq = q*pp$. Basic algebra shows that this is a field (every element has an inverse). Canonical example is $\mathbb{Q}$, the set of rational numbers.
75
75
76
76
Given polynomials over a field form an euclidean ring, we can do the same construction and get rational fractions $P(x) / Q(X)$ where $P$ and $Q$ are polynomials.
which express the algebraic objects described above. Then, as long as a type satisfies the IsEuclideanDomain concept, we can calculate greated common divisor of two values of this type using euclidean algorithm. As stated above, this algorithm operates on types instead of values and does not depend on the Ring, making possible for user to implement another kind of discrete integral domain without worring about that kind of algorithm :
114
+
which express the algebraic objects described above. Then, as long as a type satisfies the IsEuclideanDomain concept, we can calculate greatest common divisor of two values of this type using euclidean algorithm. As stated above, this algorithm operates on types instead of values and does not depend on the Ring, making possible for user to implement another kind of discrete euclidean domain without worrying about that kind of algorithm :
115
115
116
116
```C++
117
117
template<typename Ring>
@@ -204,18 +204,18 @@ V AND xx are computed at compile time, yielding the following assembly (clang 17
then, you can have the corresponding rational number by using `PI_fraction::type` and a computation with `PI_fraction::val`.
377
377
378
+
379
+
380
+
# Benchmarks
381
+
We compare to `vml` and to the standard library in the file "benchmarks.cpp".
382
+
Benchmark is quite simple and test compute intensive operation : computing sinus (compound twelve times) of all elements of a large double buffer of values (larger than cache). We run code on a Asus expertbook, equipped with an Intel i7-1195G7 @ 2.90GHz.
383
+
384
+

385
+
386
+
387
+
378
388
# Acknowledgements
379
389
380
390
Many thanks to my math teachers, A. Soyeur and M. Gonnord. I also acknowledge indirect contributions from F. Duguet, who basically learnt me all I know in C++.
0 commit comments