# std.float.parseFloat: fix large hex-float parsing · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/1b728e1834672848b12d10dd992b34141a38fc05)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 1b728e1834672848b12d10dd992b34141a38fc05

Requested commit: 1b728e1834672848b12d10dd992b34141a38fc05

Commit: 1b728e1834672848b12d10dd992b34141a38fc05

Tree: 11bd57e9184c281e73aa6398c82bb5d4d577e2ad

Author: Marc Tiehuis

Committer: Isaac Freund

## Message

```
std.float.parseFloat: fix large hex-float parsing

There were two primary issues at play here:
 1. The hex float prefix was not handled correctly when the stream was
    reset for the fallback parsing path, which occured when the mantissa was
    longer max mantissa digits.
 2. The implied exponent was not adjusted for hex-floats in this branch.

Additionally, some of the float parsing routines have been condensed, making
use of comptime.

closes #20275

```

## Parents

- [ffb1a6d9a75a7c8804c0e9db0e23ac54265f447c](https://git.cafe/gitcafe/zig/commit/ffb1a6d9a75a7c8804c0e9db0e23ac54265f447c?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/1b728e1834672848b12d10dd992b34141a38fc05?format=markdown)
