[libcxx-commits] [PATCH] D70631: Microsoft's floating-point to_chars powered by Ryu and Ryu Printf

Jorg Brown via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Dec 3 15:05:30 PST 2019


jorgbrown added a comment.

In D70631#1761886 <https://reviews.llvm.org/D70631#1761886>, @expnkx wrote:

> assuming long double is 64 bits is stupid.


I agree, actually.  We'll fix this shortly afterward.

> Also why I do not use VC. 64 bits long double and no any kind of assembly allowed is a joke. 
>  They could not prove the algorithm is right as well since Ryu only provides a small part of algorithm.

Can you prove the algorithm wrong?  I was on the way to my own charconv implementation, and forced to give it up because the implementation in VC was both faster and more correct.  (Specifically, there were rare cases where VC was producing one less digit.)

> charconv is a mistake. It does not worth the effort for implementing this. It does not make your code faster since most problems are iostreams and stdio.h's problem.

But both iostream and stdio.h are much, much slower than this code.  A factor of 10 or more.

> There are NO algorithms on the world to make it correct including Ryu (Ryu is not panacea although STL keeps spreading false information).

You sound very convinced of this, so I'm hoping you have some examples where this implementation produces incorrect results?  Certainly, we could use the test cases.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70631/new/

https://reviews.llvm.org/D70631





More information about the libcxx-commits mailing list