handling both main floating point formats