News for hackers. Stuff that matters.
Re:Show HN: Floating point arithmetic types in C++ for any s... by amelius on Tuesday October 22, 2024 @04:25AM (#41912300)
Isn't this in libgmp already?

https://gmplib.org/

Re:Show HN: Floating point arithmetic types in C++ for any s... by Archit3ch on Tuesday October 22, 2024 @04:51AM (#41912409)
GMP doesn't do arbitrary exponents.
Re:Show HN: Floating point arithmetic types in C++ for any s... by amelius on Tuesday October 22, 2024 @05:06AM (#41912498)
Indeed, thanks.
Re:Show HN: Floating point arithmetic types in C++ for any s... by Archit3ch on Tuesday October 22, 2024 @09:33AM (#41914101)
Slight correction, while the exponent is indeed fixed, it is larger than a f32/f64 exponent: https://gmplib.org/manual/Floating_002dpoint-Functions

However, this is not exposed in all GMP wrappers.

Re:Show HN: Floating point arithmetic types in C++ for any s... by seg_fault on Tuesday October 22, 2024 @01:57PM (#41916884)
If I understand this correctly GMP has a flexible mantissa with no limitations during runtime.

In fas you have to specify the sizes (of mantissa and exponent) during compile time. So the size of this type is fixed. Thus, there is no heap involved.