4,494
edits
(→Documentation: BQN) |
m (Text replacement - "</source>" to "</syntaxhighlight>") |
||
Line 1: | Line 1: | ||
{{Built-in|Ceiling|⌈}} is a [[monadic]] [[scalar function]] that gives the [[wikipedia:floor and ceiling functions|ceiling]] of a real number, that is, the least integer [[Comparison tolerance|tolerantly]] [[greater than or equal to]] the given value. This operation is also known as '''round up'''. Ceiling shares the [[glyph]] <source lang=apl inline>⌈</ | {{Built-in|Ceiling|⌈}} is a [[monadic]] [[scalar function]] that gives the [[wikipedia:floor and ceiling functions|ceiling]] of a real number, that is, the least integer [[Comparison tolerance|tolerantly]] [[greater than or equal to]] the given value. This operation is also known as '''round up'''. Ceiling shares the [[glyph]] <source lang=apl inline>⌈</syntaxhighlight> with the dyadic arithmetic function [[Maximum]]. [[Comparison_with_traditional_mathematics#Prefix|Traditional mathematics]] derives [[Ken_Iverson#Floor_and_Ceiling|its notation]] and name for ceiling from APL. | ||
== Examples == | == Examples == | ||
Line 8: | Line 8: | ||
⌈2 2.8 ¯2 ¯2.8 | ⌈2 2.8 ¯2 ¯2.8 | ||
2 3 ¯2 ¯2 | 2 3 ¯2 ¯2 | ||
</ | </syntaxhighlight> | ||
== Properties == | == Properties == | ||
Line 22: | Line 22: | ||
⌈v | ⌈v | ||
1 1 2 | 1 1 2 | ||
</ | </syntaxhighlight> | ||
Ceiling is the dual to [[Floor]] by [[negate|negation]]. | Ceiling is the dual to [[Floor]] by [[negate|negation]]. | ||
Line 30: | Line 30: | ||
(⌈v)≡-⌊-v | (⌈v)≡-⌊-v | ||
1 | 1 | ||
</ | </syntaxhighlight> | ||
The extension for [[complex number|complex numbers]] is derived from [[complex Floor]] via this property. | The extension for [[complex number|complex numbers]] is derived from [[complex Floor]] via this property. | ||
Line 40: | Line 40: | ||
(⌈v)≡-⌊-v | (⌈v)≡-⌊-v | ||
1 | 1 | ||
</ | </syntaxhighlight>{{Works in|[[Dyalog APL]]}} | ||
== External links == | == External links == |