There's some float rounding issues; this is good enough anyway.