C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Low-level float parsing functions

From: Jan Schultke <janschultke_at_[hidden]>
Date: Thu, 1 May 2025 09:31:48 +0200
> I might just be stupid here but how do you plan to handle leading zeroes in
> the fractional part of your all integers interface?

You start parsing the integer at the leftmost nonzero digit to form
the mantissa. Leading zeros don't matter in the integer part, and
don't matter in the fractional part, except that you subtract the
number of leading fraction zeros from the exponent.

In both 1.0 and 0.1, you start parsing the integer at 1, but the
exponent is one lower in the latter case.

Received on 2025-05-01 07:32:03