[llvm] [APFloat] Add APFloat::format (PR #99088)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 16 15:00:58 PDT 2024


Ariel-Burton wrote:

> Can any of the code be shared with toString?
> 
> Do we really want to mimic the old llvm::write_double API, as opposed to doing something closer to std::to_chars?

format was introduced because toString didn't give the required functionality.

One place format is intended to be used is, for example,

```
APFloat F;
.
.
OS << F.convertToDouble();
```



https://github.com/llvm/llvm-project/pull/99088


More information about the llvm-commits mailing list