Minimum: Difference between revisions

Jump to navigation Jump to search
449 bytes added ,  14:35, 14 July 2020
m
Text replacement - "http://help.dyalog.com" to "https://help.dyalog.com"
(Created page with "{{Built-in|Minimum|⌊}}, '''Min''', or '''Lesser of''' is a dyadic scalar function which returns the smaller of its two arguments. The name "Minimum...")
 
m (Text replacement - "http://help.dyalog.com" to "https://help.dyalog.com")
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Built-in|Minimum|⌊}}, '''Min''', or '''Lesser of''' is a [[dyadic]] [[scalar function]] which returns the [[Less than|smaller]] of its two [[argument]]s. The name "Minimum" is sometimes also used for the Minimum [[Reduce]] <source lang=apl inline>⌊/</source>, which returns the smallest element of a [[vector]] (this usage is related to the [[wikipedia:minimum|minimum]] of a function). Minimum is paired with [[Maximum]], which returns the greater argument rather than the smaller, and shares the glyph <source lang=apl inline>⌊</source> with the [[Floor]] function. It is not subject to [[comparison tolerance]], since the result will be exactly equal to one argument, and there is no reason to choose a smaller argument even if the two arguments are [[tolerant comparison|tolerantly]] equal. As a [[Boolean function]], Minimum is identical to [[And]].
{{Built-in|Minimum|⌊}}, '''Min''', or '''Lesser of''' is a [[dyadic]] [[scalar function]] which returns the [[Less than|smaller]] of its two [[argument]]s. The name "Minimum" is sometimes also used for the Minimum [[Reduce]] <source lang=apl inline>⌊/</source>, which returns the smallest element of a [[vector]] (this usage is related to the [[wikipedia:minimum|minimum]] of a function). Minimum is paired with [[Maximum]], which returns the greater argument rather than the smaller, and shares the glyph <source lang=apl inline>⌊</source> with the [[Floor]] function. It is not subject to [[comparison tolerance]], since the result will be exactly equal to one argument, and there is no reason to choose a larger argument even if the two arguments are [[tolerant comparison|tolerantly]] equal. As a [[Boolean function]], Minimum is identical to [[And]].


== Examples ==
== Examples ==
Line 36: Line 36:
</source>
</source>
The two solutions may differ when [[comparison tolerance]] is not zero, because Index Of uses tolerant comparison but Grade does not. The first solution will return a smaller index if an element that is tolerantly but not exactly equal to the minimum is found at that index.
The two solutions may differ when [[comparison tolerance]] is not zero, because Index Of uses tolerant comparison but Grade does not. The first solution will return a smaller index if an element that is tolerantly but not exactly equal to the minimum is found at that index.
Reducing over an empty axis yields the largest representable number, as that is the identity element for Minimum. This value is usually <source lang=apl inline>∞</source> (for dialects that support [[infinity|infinities]]) or <source lang=apl inline>1.797693135E308</source> (with 64-bit [[float]]s) or <source lang=apl inline>1E6145</source> (with 128-bit [[decimal float]]s).


== External links ==
== External links ==
Line 41: Line 43:
=== Documentation ===
=== Documentation ===


* [http://help.dyalog.com/latest/index.htm#Language/Primitive%20Functions/Minimum.htm Dyalog]
* [https://help.dyalog.com/latest/index.htm#Language/Primitive%20Functions/Minimum.htm Dyalog]
* [http://microapl.com/apl_help/ch_020_020_120.htm APLX]
* [http://microapl.com/apl_help/ch_020_020_120.htm APLX]
* J [https://www.jsoftware.com/help/dictionary/d011.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/ltdot#dyadic NuVoc]
* J [https://www.jsoftware.com/help/dictionary/d011.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/ltdot#dyadic NuVoc]


{{APL built-ins}}
{{APL built-ins}}[[Category:Primitive functions]][[Category:Scalar dyadic functions]]

Navigation menu