Commit Graph

19 Commits (552791d1cf959e7f6035f43f58c6caf176ba2bc9)

Author SHA1 Message Date
Jon Harper 552791d1cf formatting: don't force the presence of ".0" for %f and %e when precision is 0
It's misleading because you can think you have more precision than you really
do when looking at the output. So instead of "1.0", we can format it as "1" or
"1.".  And instead of "1.0e+00" we can format "1e+00" or "1.e+00".  In C,
printf does not print the radix character, it's prettier. But since the factor
parser accepts both styles, and keeping the radix character gives a stronger sense
that the number is approximate, I prefer to keep the radix character..
2017-06-08 11:23:38 -07:00
Jon Harper 6061da92be formatting, allow uppercase exponent for bin floats in base 2 and 8 2017-06-08 11:23:37 -07:00
Jon Harper ccbb8116fc formatting, make %d, %o, %b work for ratios and floats 2017-06-08 11:23:37 -07:00
Jon Harper 438e22fceb formatting, fix %f and %e for ratios and integers 2017-06-08 11:23:37 -07:00
Jon Harper e1df9df735 formatting: fix missing '+' for %+e with negative exponent 2017-06-08 11:23:37 -07:00
Doug Coleman 43d6f1d3e2 factor: Retrying on the unit tests. Also normalize some syntax with FUNCTION:. 2015-07-02 17:28:17 -07:00
Doug Coleman 59f3b1ea57 Revert "factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool!"
Needs a bit more work.

This reverts commit 7e54cc2824.
2015-07-02 13:47:06 -07:00
Doug Coleman 7e54cc2824 factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool! 2015-07-02 11:36:08 -07:00
Doug Coleman 77c5783270 formatting: Welcome to the sprintf club, MSVC 2015. Fixes #1337. 2015-06-06 05:54:22 -07:00
John Benediktsson 50725002be formatting: support space prefix for numbers. 2015-04-17 17:50:00 -07:00
John Benediktsson 0287355e2a formatting: adding octal and binary format directives. 2014-08-05 09:39:50 -07:00
John Benediktsson f29aac24bb formatting: adding vprintf by request. 2013-05-14 09:23:00 -07:00
Joe Groff 943596575a use radix literals 2011-11-23 19:03:40 -08:00
Slava Pestov f26bf45b4a formatting: fix unit tests on Windows; libc's float formatting produces different output there 2010-04-15 13:49:16 -05:00
Slava Pestov 8f4210436b formatting: use the new format-float word to fix a failing test case 2010-04-13 21:24:35 -07:00
Doug Coleman 3f3d57032b Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places, minor refactoring 2009-08-13 19:21:44 -05:00
John Benediktsson fdd6dd68f2 Adding tests for sequence and assocs formatting. 2009-01-30 14:21:38 -08:00
John Benediktsson b43dce4668 Merge branch 'master' of git://factorcode.org/git/factor 2008-12-18 06:50:42 -08:00
Slava Pestov da38cd36dd Move assoc-heaps, formatting, pack, roman, porter-stemmer, soundex, cords to basis 2008-12-17 20:18:24 -06:00