jQuery introducing decimals/float errors into CSS() assignments...

jQuery introducing decimals/float errors into CSS() assignments...

Sorry if this isn't the right place but this is somewhere between a question and a possible bug report.

Noticed this earlier against the latest 1.7.2 (testing in Chrome latest public release on W7-64) - not seen anything like it before so I'm wondering if something has changed recently?

I've been testing a simple loop which moves something across the screen - but I'm seeing odd behaviour (almost certainly related to float errors) when setting CSS Properties through jQuery.

Basically I do something like this repeatedly

  1.     var val = parseInt($(myobject).css("left));
  2.     val -= 7;
  3.     $(myobject).css("left",val+"px");

If I test the value of the "left" property after that, I'll see results such as

  1.     1042
  2.     1035
  3.     1028
  4.     1020 <<<< !!!!
  5.     1013
  6.     1006
  7.     ...

Digging further, what seems to be happening is that I do this

  1.     $(myobject).css("left","1021px")
  2.     alert($(myobject).css("left"))

and what the alert shows is "1020.99876152371253716253px"

All I can think is that jQuery is internally stripping the "1021px" and assigning a non-rounded/fixed/ceiled/floored version of the number!?