History log of /llvm-project/libc/src/__support/float_to_string.h (Results 1 – 25 of 50)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4
# 7302c8db 12-Nov-2024 Nick Desaulniers <nickdesaulniers@users.noreply.github.com>

[libc][i386] FPBit support for 96b long double (#115084)

`long double` is haunted on most architectures, but it is especially so on
i386-linux-gnu. While have 80b of significant data, on i386-linux-

[libc][i386] FPBit support for 96b long double (#115084)

`long double` is haunted on most architectures, but it is especially so on
i386-linux-gnu. While have 80b of significant data, on i386-linux-gnu this type
has 96b of storage.

Fixes for supporting printf family of conversions for `long double` on
i386-linux-gnu. This allows the libc-stdlib-tests and libc_stdio_unittests
ninja target tests to pass on i386-linux-gnu.

Fixes: #110894
Link: #93709
Co-authored-by: Michael Jones <michaelrj@google.com>

show more ...


Revision tags: llvmorg-19.1.3, llvmorg-19.1.2
# e1d64b76 02-Oct-2024 Michael Jones <michaelrj@google.com>

[libc] Enable dyadic float for float printf (#110765)

Dyadic floats were an existing option for float to string conversion,
but it had become stale. This patch fixes it up as well as adding proper
c

[libc] Enable dyadic float for float printf (#110765)

Dyadic floats were an existing option for float to string conversion,
but it had become stale. This patch fixes it up as well as adding proper
config options and test support. Due to the test changes this is a
followup to #110759

show more ...


Revision tags: llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init
# 5ff3ff33 12-Jul-2024 Petr Hosek <phosek@google.com>

[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597)

This is a part of #97655.


# ce9035f5 12-Jul-2024 Mehdi Amini <joker.eph@gmail.com>

Revert "[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration" (#98593)

Reverts llvm/llvm-project#98075

bots are broken


# 3f30effe 11-Jul-2024 Petr Hosek <phosek@google.com>

[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98075)

This is a part of #97655.


Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4
# 09efe848 06-Apr-2024 Guillaume Chatelet <gchatelet@google.com>

[libc][NFC] Rename `UInt.h` to `big_int.h` and `UInt128.h` to `uint128.h` for consistency (#87808)


# 71c3f5d6 04-Apr-2024 Guillaume Chatelet <gchatelet@google.com>

[reland][libc] Refactor `BigInt` (#87613)

This is a reland of #86137 with a fix for platforms / compiler that do
not support trivially constructible int128 types.


# 12735916 04-Apr-2024 Guillaume Chatelet <gchatelet@google.com>

Revert "[libc] Refactor `BigInt`" (#87612)

Reverts llvm/llvm-project#86137

Some aarch64 compilers seem to consider that `uint128_t` is not
`is_trivially_constructible` which prevents `bit_cast`-

Revert "[libc] Refactor `BigInt`" (#87612)

Reverts llvm/llvm-project#86137

Some aarch64 compilers seem to consider that `uint128_t` is not
`is_trivially_constructible` which prevents `bit_cast`-ing.

show more ...


# a2306b65 04-Apr-2024 Guillaume Chatelet <gchatelet@google.com>

[libc] Refactor `BigInt` (#86137)

This patch moves most of the multiprecision logic to the `multiword`
namespace and simplifies some logic in `BigInt`. It also fully
implements the mask and count

[libc] Refactor `BigInt` (#86137)

This patch moves most of the multiprecision logic to the `multiword`
namespace and simplifies some logic in `BigInt`. It also fully
implements the mask and count functions and increases test coverage.

`math_extras.h` is also reworked to make it more concise.

show more ...


Revision tags: llvmorg-18.1.3, llvmorg-18.1.2
# 6a8e6c9a 08-Mar-2024 Guillaume Chatelet <gchatelet@google.com>

[libc][NFC] Move `BigInt` out of the `cpp` namespace (#84445)

As noted in
https://github.com/llvm/llvm-project/pull/84035#discussion_r1516817755
only files under the CPP folder should be in the `c

[libc][NFC] Move `BigInt` out of the `cpp` namespace (#84445)

As noted in
https://github.com/llvm/llvm-project/pull/84035#discussion_r1516817755
only files under the CPP folder should be in the `cpp` namespace.

show more ...


Revision tags: llvmorg-18.1.1
# 245d669f 07-Mar-2024 Guillaume Chatelet <gchatelet@google.com>

[reland][libc] Remove UB specializations of type traits for `BigInt` (#84299)

Note: This is a reland of #84035.

The standard specifies that it it UB to specialize the following traits:
- `std::

[reland][libc] Remove UB specializations of type traits for `BigInt` (#84299)

Note: This is a reland of #84035.

The standard specifies that it it UB to specialize the following traits:
- `std::is_integral`
- `std::is_unsigned`
- `std::make_unsigned`
- `std::make_signed`

This patch:
- Removes specializations for `BigInt`
- Transforms SFINAE for `bit.h` functions from template parameter to
return type (This makes specialization easier).
- Adds `BigInt` specialization for `bit.h` functions.
- Fixes code depending on previous specializations.

show more ...


# 27844cb2 07-Mar-2024 Guillaume Chatelet <gchatelet@google.com>

Revert "[libc] Remove UB specializations of type traits for `BigInt`" (#84297)

Reverts llvm/llvm-project#84035

Several bots are failing:
- https://lab.llvm.org/buildbot/#/builders/223/builds/37

Revert "[libc] Remove UB specializations of type traits for `BigInt`" (#84297)

Reverts llvm/llvm-project#84035

Several bots are failing:
- https://lab.llvm.org/buildbot/#/builders/223/builds/37522
- https://lab.llvm.org/buildbot/#/builders/162/builds/51978
- https://lab.llvm.org/buildbot/#/builders/163/builds/52560
- https://lab.llvm.org/buildbot/#/builders/250/builds/19619

show more ...


# 84f483db 07-Mar-2024 Guillaume Chatelet <gchatelet@google.com>

[libc] Remove UB specializations of type traits for `BigInt` (#84035)

The standard specifies that it it UB to specialize the following traits:
- `std::is_integral`
- `std::is_unsigned`
- `std:

[libc] Remove UB specializations of type traits for `BigInt` (#84035)

The standard specifies that it it UB to specialize the following traits:
- `std::is_integral`
- `std::is_unsigned`
- `std::make_unsigned`
- `std::make_signed`

This patch:
- Removes specializations for `BigInt`
- Transforms SFINAE for `bit.h` functions from template parameter to
return type (This makes specialization easier).
- Adds `BigInt` specialization for `bit.h` functions.
- Fixes code depending on previous specializations.

show more ...


# f7d4236a 04-Mar-2024 Guillaume Chatelet <gchatelet@google.com>

[libc][NFC] Rename `LIBC_LONG_DOUBLE_IS_` macros (#83399)

Umbrella bug #83182


Revision tags: llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3
# 4e005515 13-Feb-2024 lntue <35648136+lntue@users.noreply.github.com>

[libc] Allow BigInt class to use base word types other than uint64_t. (#81634)

This will allow DyadicFloat class to replace NormalFloat class.


Revision tags: llvmorg-18.1.0-rc2
# 6812bc40 06-Feb-2024 michaelrj-google <71531609+michaelrj-google@users.noreply.github.com>

[libc] Fix off by one in long double buffer size (#80889)

The size for the long double BLOCK_BUFFER_LEN is calculated based on the
properties of the long double type. Somewhere in the calculation, t

[libc] Fix off by one in long double buffer size (#80889)

The size for the long double BLOCK_BUFFER_LEN is calculated based on the
properties of the long double type. Somewhere in the calculation, the
result was mis-rounded so that the buffer was one element too small.
This patch fixes the issue and adds asserts to catch it sooner in the
future.

show more ...


Revision tags: llvmorg-18.1.0-rc1
# 8a0ff194 25-Jan-2024 michaelrj-google <71531609+michaelrj-google@users.noreply.github.com>

[libc] Fix type warning on gcc in float to str (#79482)

Minor cast warning that was missed in previous patch. Fixed with
explicit cast.


# a621198a 25-Jan-2024 michaelrj-google <71531609+michaelrj-google@users.noreply.github.com>

[libc] Move printf long double to simple calc (#75414)

The Ryu algorithm is very fast with its table, but that table grows too
large for long doubles. This patch adds a method of calculating the
dig

[libc] Move printf long double to simple calc (#75414)

The Ryu algorithm is very fast with its table, but that table grows too
large for long doubles. This patch adds a method of calculating the
digits of long doubles using just wide integers and fast modulo
operations. This results in significant performance improvements vs the
previous int calc mode, while taking up a similar amound of peak memory.
It will be slow in some %e/%g cases, but reasonable fast for %f with no
loss of accuracy.

show more ...


Revision tags: llvmorg-19-init
# 11ec512f 18-Jan-2024 Guillaume Chatelet <gchatelet@google.com>

[libc][NFC] Introduce a Sign type for FPBits (#78500)

Another patch is needed to cover `DyadicFloat` and `NormalFloat`
constructors.


# c09e6905 03-Jan-2024 Guillaume Chatelet <gchatelet@google.com>

[libc][NFC] Remove `FloatProperties` (#76508)

Access is now done through `FPBits` exclusively.
This patch also renames a few internal structs and uses `T` instead of
`FP` as a template parameter.


# 3546f4da 15-Dec-2023 Guillaume Chatelet <gchatelet@google.com>

[libc][NFC] Rename `MANTISSA_WIDTH` in `FRACTION_LEN` (#75489)

This one might be a bit controversial since the terminology has been
introduced from the start but I think `FRACTION_LEN` is a better

[libc][NFC] Rename `MANTISSA_WIDTH` in `FRACTION_LEN` (#75489)

This one might be a bit controversial since the terminology has been
introduced from the start but I think `FRACTION_LEN` is a better name
here. AFAICT it really is "the number of bits after the decimal dot when
the number is in normal form."

`MANTISSA_WIDTH` is less precise as it's unclear whether we take the
leading bit into account.
This patch also renames most of the properties to use the `_LEN` suffix
and fixes useless casts or variables.

show more ...


# 493cc71d 14-Dec-2023 Guillaume Chatelet <gchatelet@google.com>

[libc][NFC] Remove MantissaWidth traits (#75458)

Same as #75362, the traits does not bring a lot of value over
`FloatProperties::MANTISSA_WIDTH` (or `FPBits::MANTISSA_WIDTH`).


# f22a65c1 12-Dec-2023 Guillaume Chatelet <gchatelet@google.com>

[libc][NFC] Reuse `FloatProperties` constant instead of creating new ones (#75187)

Also exposes a bit more of `FloatProperties` and adds documentation.
This should have been several patches but I w

[libc][NFC] Reuse `FloatProperties` constant instead of creating new ones (#75187)

Also exposes a bit more of `FloatProperties` and adds documentation.
This should have been several patches but I was lazy.

show more ...


# 05420a17 08-Dec-2023 Guillaume Chatelet <gchatelet@google.com>

Revert "[libc] Make BigInt bit_cast-able to compatible types" (#74887)

This reverts the following commits:
- a539a090009378ecfcfbfaaa280eeac8f5b9d695
- 31316b3f8511d659cc14ebc72fb2b226f78478a9

Revert "[libc] Make BigInt bit_cast-able to compatible types" (#74887)

This reverts the following commits:
- a539a090009378ecfcfbfaaa280eeac8f5b9d695
- 31316b3f8511d659cc14ebc72fb2b226f78478a9

Rationale for revert:
https://github.com/llvm/llvm-project/issues/74258#issuecomment-1847836861

show more ...


# a539a090 08-Dec-2023 Guillaume Chatelet <gchatelet@google.com>

[libc] Fix missing UInt initialization (#74869)

Fix forward for #74862


12