- From: Nick Thompson <ncthom91@gmail.com>
- Date: Mon, 14 Jan 2013 12:03:07 -0500
- To: Ray Bellis <ray@bellis.me.uk>
- Cc: My Cloud Player <info@mycloudplayers.com>, public-audio@w3.org
Received on Monday, 14 January 2013 17:03:39 UTC
Ray said it, it's a numbers thing. I just took the time to read up on them, so I have a few resources you might find helpful: http://blog.greweb.fr/2013/01/be-careful-with-js-numbers/ http://www.amazon.com/Effective-JavaScript-Specific-Software-Development/dp/0321812182(the free sample "look inside!" chapter covers numbers). Best, Nick On Mon, Jan 14, 2013 at 10:57 AM, Ray Bellis <ray@bellis.me.uk> wrote: > On 14/01/2013 13:00, My Cloud Player wrote: > > > I have one question about playback rate on <audio> element. > > I've noticed that when i set the playbackRate of audio element lets > > say to: 0.9, the getter is returning something like 0.9000000034 for > > example. Opposite of rounding :) > > That looks like normal floating point precision error. > > 0.9 can't be expressed exactly in floating point, so you get that > "inaccurate" number instead. > > Ray > > >
Received on Monday, 14 January 2013 17:03:39 UTC