The $inellipse() identifier seems to be working correctly here. Note that the x and y values are the top left corner of the ellipse.

Code:
test {
  var %x = 10, %y = 10, %w = 50, %h = 50
  window -ap @test 100 100 100 100
  clear @test
  drawrect @test 3 1 %x %y %w %h
  drawrect -e @test 4 1 %x %y %w %h
  var %x2 = $calc(%x + (%w / 2))
  var %miny = $calc(%y - 5)
  var %maxy = $calc(%y + %h + 5)
  var %y2 = %miny
  while (%y2 <= %maxy) {
    var %e = $inellipse(%x2,%y2,%x,%y,%w,%h)
    echo 1 %x2 %y2 %e
    drawdot @test $iif(%e,4,1) 1 %x2 %y2
    inc %y2
  }
}