lib: implements `Float::to_precision` in a non native way