Equal to: Difference between revisions

Jump to navigation Jump to search
478 bytes added ,  10:56, 13 November 2019
no edit summary
Miraheze>Marshall
(Created page with "{{Built-in|Equal to|<nowiki>=</nowiki>}} is a comparison function which tests whether argument elements are tolerantly equal to each other: it retu...")
 
Miraheze>Adám Brudzewsky
No edit summary
Line 1: Line 1:
{{Built-in|Equal to|<nowiki>=</nowiki>}} is a [[comparison function]] which tests whether argument elements are [[Tolerant comparison|tolerantly]] equal to each other: it returns 1 if the [[element]]s being compared [[match]] and 0 if they do not. It is the [[Not|negation]] of [[Not equal to]] (<source lang=apl inline>≠</source>).
{{Built-in|Equal to|<nowiki>=</nowiki>}} is a [[comparison function]] which tests whether argument elements are [[Tolerant comparison|tolerantly]] equal to each other: it returns 1 if the [[element]]s being compared [[match]] and 0 if they do not. It is the [[Not|negation]] of [[Not equal to]] (<source lang=apl inline>≠</source>).
APL's <source lang=apl inline>=</source> differs from the usage of <math>=</math> in [[Comparison with traditional mathematics|traditional mathematical notation]] by having an implied [[Ken_Iverson#Iverson_bracket|Iverson bracket]]. Thus, <source lang=apl inline>i=j</source> is APL is equivalent to <math>[i=j]</math> or <math>\delta_{ij}</math> ([[wikipedia:Kronecker delta|Kronecker delta]]) in mathematics.


== Examples ==
== Examples ==
Line 47: Line 49:
== Boolean function ==
== Boolean function ==


When the arguments to Equal to are [[Boolean]], it is the [[wikipedia:Logical biconditional|Logical biconditional]] function, or the [[Not|negation]] of the [[xor]] function (which is [[Not Equal to]] restricted to Boolean arguments.
When the arguments to Equal to are [[Boolean]], it is the [[wikipedia:Logical biconditional|Logical biconditional]] function, or the [[Not|negation]] of the [[xor]] function (which is [[Not Equal to]] restricted to Boolean arguments, also known as [[xnor]] or the Kronecker delta).


[[Reduction]] with <source lang=apl inline>=</source> is the same as reduction with xor (<source lang=apl inline>≠</source>), but [[Not|inverted]] if the number of reduced elements is even. The left and right [[identity element]] for Boolean <source lang=apl inline>=</source> is 1.
[[Reduction]] with <source lang=apl inline>=</source> is the same as reduction with xor (<source lang=apl inline>≠</source>), but [[Not|inverted]] if the number of reduced elements is even. The left and right [[identity element]] for Boolean <source lang=apl inline>=</source> is 1.
Line 58: Line 60:
* [http://microapl.com/apl_help/ch_020_020_310.htm APLX]
* [http://microapl.com/apl_help/ch_020_020_310.htm APLX]
* J [https://www.jsoftware.com/help/dictionary/d000.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/eq#dyadic NuVoc]
* J [https://www.jsoftware.com/help/dictionary/d000.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/eq#dyadic NuVoc]
{{APL built-ins}}

Navigation menu