Update the double/float formatters to return the shortest roundtrippable string....
commit40eb410e7366aae1ab48d2dc2bd4a9b1e92a27a1
authorTanner Gooding <tagoo@outlook.com>
Fri, 1 Feb 2019 19:58:35 +0000 (1 11:58 -0800)
committerMarek Safar <marek.safar@gmail.com>
Fri, 1 Feb 2019 21:28:08 +0000 (1 22:28 +0100)
tree062a035cf5e5821b71286acd139344569a38fec0
parent2d715b1af241639cbe251dadf1f5cc4d26e8872d
Update the double/float formatters to return the shortest roundtrippable string. (#22040)

* Updating Number.Formatting to always compute a round-trippable number by default.

* Adding a third-party notice entry for the Grisu3 reference implementation

* Fixing up the Grisu3 algorithm to better match the reference implementation (including comments, etc)

* Porting the Grisu3 implementation that generates the shortest roundtrippable sequence.

* Updating the Dragon4 algorithm to support printing the shortest roundtrippable string.

* Fixing the double/float formatters to ignore precision specifiers for 'R'

* Fixing the double/float formatters to handle +0.0 and -0.0

* Fix the casing of `point` in THIRD-PARTY-NOTICES

Co-Authored-By: tannergooding <tagoo@outlook.com>
* Fixing the double/float formatting code to consider a precision specifier of 0 to be the same as default.

* Fixing the double/float formatter so that nMaxDigits is set appropriately.

* Changing the double/float formatting logic to account for the format when determining the correct precision to request.

* Updating the double/float formatter to take the format specifier into account when determining the number of digits to request.

* Fixing the double/float formatting code to continue handling zero correctly.

* Disabling some outdated CoreFX tests.

* Responding to various feedback from the PR

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
netcore/System.Private.CoreLib/shared/System/Number.BigInteger.cs
netcore/System.Private.CoreLib/shared/System/Number.DiyFp.cs
netcore/System.Private.CoreLib/shared/System/Number.Dragon4.cs
netcore/System.Private.CoreLib/shared/System/Number.Formatting.cs
netcore/System.Private.CoreLib/shared/System/Number.Grisu3.cs