Problems in lat/lon to X/Y translation !!!

Hi all,
I’m following the formulas at and also testing values at page but I found the next problem:

For level=2 there are 4x4 tiles in the map, that means Y axis takes values from [0,1,2,3] that in degress are aprox. [85, 42.5, 0, -42.5, -85].
This way I lat=66 degrees must be in tile y=0 but formulas and also the JavaScript test page returns me y=1.

Please, what is the problem or what I’m thinking in the wrong way.

Thanks in advice.