We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
eqv
1 parent 9b9b757 commit ef2a93bCopy full SHA for ef2a93b
doc/Language/operators.pod6
@@ -1641,6 +1641,13 @@ if only one C<Iterable> is lazy.
1641
(try say (1…∞) eqv (1…∞)) # Both lazy and of the same type. Cannot compare; throws.
1642
orelse say $!.^name; # OUTPUT: «X::Cannot::Lazy»
1643
1644
+Zero-denominator L<Rationals|/type/Rational>, such as L<Rat> and L<FatRat> types
1645
+are considered equivalent if their L<numerators|/routine/numerator>
1646
+are both C<0> or are of the same sign:
1647
+
1648
+ say 1/0 eqv 42/0; # OUTPUT: «True»
1649
+ say -1/0 eqv 42/0; # OUTPUT: «False»
1650
1651
The default C<eqv> operator even works with arbitrary objects. E.g., C<eqv>
1652
will consider two instances of the same object as being structurally
1653
equivalent:
0 commit comments