   # ⌈¯12.3 <=> ¯12
   # ⌈¯123  <=> ¯123
   # ⌈'a'   !!! DOMAIN ERROR
-  # ⌈12j3  !!!
+  # ⌈12j3      <=> 12j3
+  # ⌈1.2j2.3   <=> 1j3
+  # ⌈1.2j¯2.3  <=> 1j¯2
+  # ⌈¯1.2j2.3  <=> ¯1j3
+  # ⌈¯1.2j¯2.3 <=> ¯1j¯2
   # ⌈0 5 ¯5 (○1) ¯1.5 <=> 0 5 ¯5 4 ¯1
-  monad: real Math.ceil
+  monad: numeric Math.ceil,
+    (x) ->
+      [re, im] = [(Math.ceil x.re), (Math.ceil x.im)]
+      [r, i] = [re - x.re, im - x.im]
+      if r + i >= 1
+        if r >= i then re-- else im--
+      simplify re, im
 
   # Greater of (`⌈`)
   #

  # ⌊¯12.3 <=> ¯13
  # ⌊¯123  <=> ¯123
  # ⌊'a'   !!! DOMAIN ERROR
  # ⌊12j3  !!!
  # ⌊0 5 ¯5 (○1) ¯1.5   <=> 0 5 ¯5 3 ¯2
  monad: real Math.floor

  # Lesser of (`⌊`)
  #

{numeric, pervasive, real, withIdentity} = require './vhelpers'
{APLArray} = require '../array'
{simplify} = require '../complex'

@['⌊'] = withIdentity new APLArray([Infinity], []), pervasive

