Commit Graph

8 Commits

Author SHA1 Message Date
John McCall
6a09affdf6 Implement support for converting to string at "natural precision", and fix some
major bugs in long-precision conversion.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92150 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24 23:18:09 +00:00
John McCall
00e65de9d8 Add accessors for the largest-magnitude, smallest-magnitude, and
smallest-normalized-magnitude values in a given FP semantics.
Provide an APFloat-to-string conversion which I am quite ready to admit could
be much more efficient.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92126 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24 08:56:26 +00:00
Daniel Dunbar
83fecfa42c Add test for PR4873, which works for me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80965 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-03 22:57:02 +00:00
Erick Tryzelaar
c78b33bdc1 Add support for including '+' in APFloat strings, more asserts,
and many new unit tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79574 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 23:30:43 +00:00
Daniel Dunbar
cdd93d8c35 Fix two APFloat bugs in converting hexadecimal constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79540 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 17:12:33 +00:00
Erick Tryzelaar
2ad40a3663 Wrap unit test death tests in GTEST_HAS_DEATH_TEST
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79218 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17 00:55:33 +00:00
Erick Tryzelaar
33d7dd6dc8 Change APFloatTest from using ASSERTs to EXPECTs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79216 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17 00:14:11 +00:00
Erick Tryzelaar
a15d890c34 Modify APFloat to take a StringRef instead of a c string.
This also adds unit tests to APFloat that mainly tests the
string handling of APFloat, but not much else of it's api.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79210 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-16 23:36:19 +00:00