I also use EJS 4.2 However, I did not find any error. So I do not know how to help.

The [b]ay[/b] was defined as [u]double[/u] with initial value "calF(y,vy)/m-g"
It can be re-assigned to 0. without affect the code.