Skip to content

Commit 82e85b5

Browse files
authored
Merge pull request #2362 from cronos2/master
Corrects some imprecisions in the "Doing math with Perl 6" article Thanks a lot!
2 parents 1359a80 + 1c884f9 commit 82e85b5

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

doc/Language/math.pod6

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ mathematical notation.
8282
=head1 Arithmetic
8383
8484
Perl 6 can do arithmetic using different data types. L<Num>, L<Rat> and
85-
L<Complex> can all operate as a L<field under the operations of addition, subtraction, multiplication and division|https://en.wikipedia.org/wiki/Field_(mathematics)>.
85+
L<Complex> can all operate as a L<field under the operations of addition, subtraction, multiplication and division|https://en.wikipedia.org/wiki/Field_(mathematics)>
86+
(technically, it should be noted that data types dealing with floating point number representations are not a field in the mathematical sense due to the inherent
87+
imprecisions of their arithmetic. However, they constitute an approximate enough, computer friendly version of such mathematical objects for most of the cases).
8688
The equivalent mathematical fields are:
8789
8890
=begin table
@@ -93,12 +95,10 @@ Num ℝ
9395
Complex ℂ
9496
=end table
9597
96-
The C<Int>s, although technically corresponding to Z, is not really a
97-
mathematical field since they are not closed under the four arithmetical
98-
operations, and integers do not satisfy the
99-
L<identity axiom|https://math.stackexchange.com/questions/2192317/set-of-integers-not-a-field/2192330>.
100-
However, if the integer division C<div> is used, their operations will always
101-
yield other integers; if C</> is used, however, in general the result will be a
98+
The C<Int>s or ℤ, as they're usually called in mathematics, are not a
99+
mathematical field but rather a ring, since they are not closed under
100+
multiplicative inverses. However, if the integer division C<div> is used, their operations will always
101+
yield other integers; if C</> is used, on the other hand, in general the result will be a
102102
L<Rat>.
103103
104104
Besides, C<Int> can do infinite-precision arithmetic (or at least infinite as
@@ -120,10 +120,10 @@ mathematically:
120120
basic operations for L<vectors|https://en.wikipedia.org/wiki/Coordinate_vector>.
121121
122122
=item L<C<Math::Matrix>|https://github.com/pierre-vigier/Perl6-Math-Matrix>
123-
operates on the L<matrix field|https://en.wikipedia.org/wiki/Matrix_field>.
123+
operates on L<matrices rings over numeric rings|https://en.wikipedia.org/wiki/Matrix_(mathematics)>.
124124
125125
=item L<C<Math::Quaternion>|https://github.com/Util/Perl6-Math-Quaternion>
126-
operates on the L<quaternion field|https://en.wikipedia.org/wiki/Quaternion>,
126+
operates on the L<quaternion algebra, ℍ|https://en.wikipedia.org/wiki/Quaternion>,
127127
which are a generalization of complex numbers.
128128
129129
=item L<C<Math::Polynomial>|https://github.com/colomon/Math-Polynomial> works
@@ -195,7 +195,7 @@ We can, in fact, compute the approximation to the L<golden ratio|https://en.wiki
195195
The L<Math::Sequences|https://github.com/ajs/perl6-Math-Sequences> module
196196
includes many mathematical sequences, already defined for you. It defines many
197197
L<sequences from the encyclopedia|https://oeis.org/>, some of them with their
198-
original name, such as ℤ or ℝ.
198+
original name, such as ℤ.
199199
200200
Some set operators also operate on sequences, and they can be used to find out if an object is part of it:
201201
@@ -208,7 +208,7 @@ generators. And we can use set inclusion operators too:
208208
say (55,89).Set ⊂ (1,1, * + * … * > 200); # OUTPUT: «True␤»
209209
210210
although it does not take into account if it is effectively a subsequence, just
211-
the presence of the two elements here; Sets have no order, and even if you don't
211+
the presence of the two elements here. Sets have no order, and even if you don't
212212
explicitly cast the subsequence into a Set or explicitly cast it into a C<Seq>
213213
it will be coerced into such for the application of the inclusion operator.
214214

0 commit comments

Comments
 (0)