Re: [RFC] libstdc++: Replace Ryu with Teju Jagua for float.

2024-08-14 Thread Patrick Palka
On Mon, 5 Aug 2024, Cassio Neri wrote: > Implement the template function teju_jagua which finds the shortest > representation of a floating-point number. The floating-point type is a > template parameter and the implementation is generic enough to handle all > floating-point types of interest, nam

Re: [RFC] libstdc++: Replace Ryu with Teju Jagua for float.

2024-08-07 Thread Cassio Neri
On top of what Jonathan said, Teju Jagua yields a smaller binary size since it needs fewer look-up tables. Regarding performance and correctness: 1) My patch passes all the tests. 2) The GitHub project of the reference implementation (*) scans all floats and the results of Teju Jagua, Ryu and Dr

Re: [RFC] libstdc++: Replace Ryu with Teju Jagua for float.

2024-08-06 Thread Jonathan Wakely
On Tue, 6 Aug 2024, 17:28 Andi Kleen, wrote: > Cassio Neri writes: > > > Implement the template function teju_jagua which finds the shortest > > representation of a floating-point number. The floating-point type is a > > template parameter and the implementation is generic enough to handle all >

Re: [RFC] libstdc++: Replace Ryu with Teju Jagua for float.

2024-08-06 Thread Andi Kleen
Cassio Neri writes: > Implement the template function teju_jagua which finds the shortest > representation of a floating-point number. The floating-point type is a > template parameter and the implementation is generic enough to handle all > floating-point types of interest, namely, IEEE 754, std

[RFC] libstdc++: Replace Ryu with Teju Jagua for float.

2024-08-05 Thread Cassio Neri
Implement the template function teju_jagua which finds the shortest representation of a floating-point number. The floating-point type is a template parameter and the implementation is generic enough to handle all floating-point types of interest, namely, IEEE 754, std::bfloat16_t, x86 80-bit and I