[llvm] [APFloat] Add APFloat::format (PR #99088)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 16 15:59:41 PDT 2024
Ariel-Burton wrote:
> What exactly is different between toString and format? Both routines support both fixed and scientific-style output, and they both use a constant "precision". There are minor differences in some specific usages, but I'd rather slightly extend the toString API, instead of maintaining two implementations of string conversion.
>
> > With respect to considering to_chars-like functionality
>
> You mean, the round-trip precision stuff? Sure, we don't need to do that here.
As I said above, it's some time since I wrote format and some of he details elude me. I was unable to reconcile the differences between `OS << F.toString()` and `OS << F.convertToDouble()` by tweaking the parameters to toString.
https://github.com/llvm/llvm-project/pull/99088
More information about the llvm-commits
mailing list