fix floating point accuracy woes on certain hardware platforms