Two util functions for floats & doubles