John Benediktsson
0fddbc2af1
formatting: revert change to %d, %o, %b, %x for now.
...
We should have a format character in the future to format using our Factor
binary, octal, and hex parser. Maybe using the "alternate form" format
character like Python does? And if we do that, maybe print the 0b, 0o, 0x
prefixes? TBD.
2017-06-10 13:33:01 -07:00
Jon Harper
1dceb069ad
formatting: fix bug when using %e and the number rounds up in magnitude
...
99/10 0 format-scientific-simple was outputting 1.0e0 because
the mantissa was rounded up, so it had one extra character, and
the exponent was wrong.
2017-06-08 11:23:38 -07:00
Jon Harper
4df21818f5
formatting: change %.0f and %.0e to remove the radix character. It's more standard.
2017-06-08 11:23:38 -07:00
Jon Harper
756184607b
formatting: make these tests actually test the expected code path
2017-06-08 11:23:38 -07:00
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
762b22e1a8
formatting-docs, document ' ' as an alternative to '+' for positive numbers sign prefixing
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
Alexander Iljin
2ffa446f5b
*-docs: replace double spaces with single spaces
...
Code examples and other places where multiple spaces were used to align
text were left intact.
2017-06-05 13:16:07 -07:00
Björn Lindqvist
f9b9ce20f2
calendar.english: new vocab for english names for days and months
...
This moves all the english-centric words from the calendar vocab which
was getting kind of big to calendar.english. It should make it easier to
see which vocabs make language assumptions.
2017-01-03 15:48:08 +01:00
John Benediktsson
498285d7dd
unicode: make this the API for all unicode things.
2016-03-30 23:29:48 -07:00
Jon Harper
cac9b58f11
formatting, format numbers with C locale and document that it's english only
2016-03-08 07:55:25 -08:00
Jon Harper
19fadb6c96
prettyprinter, locale independant float printing
2016-03-08 07:55:25 -08:00
Jon Harper
6ee9fad443
formatting: fix docs for padding and use a better example
...
Make the padding number coherent between the example and the docs.
Also bump it from 3 to 10 because [[3.14 "%'#5f" printf]] is "3.140000"
because the default precision is 6.
2015-08-30 18:43:59 +02:00
John Benediktsson
ceb75057da
change ERROR: words from throw-foo back to foo.
2015-08-13 16:13:05 -07:00
Doug Coleman
b6be8685c3
basis: ERROR: changes.
2015-08-13 03:20:39 -07:00
John Benediktsson
c25fb5f55e
update some more MACRO: effects.
2015-07-19 11:42:46 -07:00
Doug Coleman
2c257f399c
factor: Rename MACRO: and MACRO: to have quot as the output in stack effects.
2015-07-18 22:16:11 -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
John Benediktsson
1723544b56
formatting: use nappend-as in sprintf.
2015-06-06 09:28:01 -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
76761b2e59
more minor cleanup.
2014-11-30 19:26:23 -08:00
John Benediktsson
a80540fdee
formatting: specify integer instead of fixnum as bignums are supported.
2014-09-04 09:35:15 -07:00
John Benediktsson
87433a4585
``swap drop`` is ``nip``.
2014-08-05 10:31:42 -07:00
John Benediktsson
0287355e2a
formatting: adding octal and binary format directives.
2014-08-05 09:39:50 -07:00
John Benediktsson
380251308e
formatting: faster strftime and make parse-strftime match parse-printf.
2014-05-20 16:11:32 -07:00
John Benediktsson
6e0a9fdf1f
formatting: make printf faster.
2014-02-10 20:39:08 -08:00
Björn Lindqvist
a82dc84f2d
formatting: new format specifier for unparsed representation
2014-02-09 21:09:24 -08:00
John Benediktsson
f29aac24bb
formatting: adding vprintf by request.
2013-05-14 09:23:00 -07:00
John Benediktsson
55a230f368
formatting: use $snippet to make format strings stand out in docs.
2012-09-24 09:48:58 -07:00
John Benediktsson
fa0a0939f9
formatting: some cleanup, minor performance improvements.
2012-07-20 09:41:05 -07:00
Joe Groff
943596575a
use radix literals
2011-11-23 19:03:40 -08:00
John Benediktsson
340e69aef3
formatting: improve summary.txt.
2011-11-12 16:18:39 -08:00
Slava Pestov
2ace3c5956
formatting: remove platform-specific example
2010-04-15 16:14:29 -05: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
Slava Pestov
050d042449
formatting: fix docs
2010-02-23 21:21:16 +13:00
Keith Lazuka
405e5d015b
docs: change $subsection to $subsections
2009-10-02 12:15:48 -04:00
Doug Coleman
7c92ab1ea5
move if-zero etc to math, remove 1-/1+ from math
2009-08-14 14:27:23 -05: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
Doug Coleman
4fef246ca4
add 10^ to math.functions and update usages
2009-08-11 18:00:24 -05:00
John Benediktsson
67ff15a3de
Merge branch 'master' of git://factorcode.org/git/factor
2009-05-16 15:56:06 -07:00
Slava Pestov
b62630b5ac
Updating code in basis and extra for stricter vocab search path semantics
2009-05-14 23:23:06 -05:00
John Benediktsson
e6448b4126
Merge branch 'master' of git://factorcode.org/git/factor
2009-05-04 12:49:13 +00:00
Joe Groff
bc07c075e7
Merge branch 'master' of git://factorcode.org/git/factor
...
Conflicts:
extra/spheres/spheres.factor
2009-05-03 17:23:14 -05:00