Maybe there's some weird rounding error in your example? I got it to work fine.