Commit Graph

77 Commits (ab2c1503636c4e161db4f16b16b67ef32dbbc951)

Author SHA1 Message Date
John Benediktsson 1a72249983 math: using if-zero in more places. 2012-06-18 14:32:39 -07:00
John Benediktsson 8f8c00c9f5 math.parser: simplify error types. 2012-06-08 07:32:01 -07:00
John Benediktsson 82f4fa723d math.parser: add some tests for errors. 2012-06-06 15:14:52 -07:00
John Benediktsson 530ff420c7 math.parser: better error messages suggested by @erg. 2012-06-06 15:12:33 -07:00
John Benediktsson ab75394ffc math.parser: only allow 10 and 16 base for float>base. 2012-06-06 14:50:07 -07:00
Joe Groff 3f6306ef61 math.parser: hex> etc. shouldn't take radix prefix
Fixes #453
2011-12-16 17:20:05 -08:00
Doug Coleman c3dcf43e03 core/basis: trim down using lists 2011-11-30 23:15:42 -08:00
Joe Groff fde94d2cb0 math.integers: test round-to-even-on-tie behavior 2011-11-26 16:03:43 -08:00
Joe Groff 3c5fa11ede math.parser: don't accept hex float without expt
Part of #372
2011-11-26 15:15:46 -08:00
Joe Groff b38ce8a794 oops, radix prefixes shouldn't chain 2011-11-24 12:39:52 -08:00
Joe Groff 74c753ab39 math.parser: test harder 2011-11-24 12:34:50 -08:00
Joe Groff f384633dbb math.parser: reject "0x" etc. without any digits 2011-11-24 12:27:40 -08:00
Joe Groff 93e5b711a6 syntax: remove BIN: HEX: OCT: 2011-11-23 20:07:33 -08:00
Joe Groff 9cc643f907 math.parser: oops 2011-11-23 19:51:15 -08:00
Joe Groff eee483654a use radix literals 2011-11-23 19:03:40 -08:00
Joe Groff 64017175de math.parser: natively support 0b 0o 0x syntax
Closes #371
2011-11-23 18:30:22 -08:00
Joe Groff a3228dc7a7 math.parser: undo some inlining to shrink size
For #318.
2011-11-11 15:49:53 -08:00
John Benediktsson fd853f9958 Cleanup some lint warnings. 2011-10-15 19:19:44 -07:00
John Benediktsson 419f40f4ed math.parser: cleanup uses of 16/8/2 >base/base>. 2011-10-14 10:09:12 -07:00
Slava Pestov 775dbefdbc math.parser: expose a format-float primitive for use by formatting vocabulary 2010-04-13 21:21:28 -07:00
Joe Groff 2626b61df2 math.parser: support leading + on significand and exponent so string>number can be a proper superset of C strto* functions 2010-02-07 14:21:59 -08:00
Joe Groff dc8c6bf0e2 math.parser: add unit tests to ensure that "1e2" parses as 100.0 in decimal and as integer 1E2 in bases >= 15 (it does now) 2010-02-07 13:09:59 -08:00
Joe Groff dbb952889f math.parser: fix digit> bug found by Blei 2010-02-07 13:04:20 -08:00
Slava Pestov a50f184b18 math.parser: clean up and merge new-math-parser branch 2010-02-08 01:39:18 +13:00
Slava Pestov 13d64f44a2 Merge branch 'new-math-parser' of git://factorcode.org/git/factor into new-math-parser 2010-02-07 23:28:18 +13:00
Slava Pestov 21dc4e59a0 math.parser: fix docs -- maximum radix is 16 not 36 2010-01-15 08:36:40 +13:00
Joe Groff 0683045cfd new, faster one-pass number parser 2009-11-01 01:59:12 -05:00
Joe Groff f1d5f6974b remove dangling PRIVATE> from math.parser 2009-11-01 00:42:25 -05:00
Doug Coleman 82992f6dd4 reverse-here -> reverse! 2009-10-28 14:40:15 -05:00
Joe Groff d5720a0245 add some math.parser hints that slightly improve number parsing performance 2009-10-26 17:48:05 -05:00
Joe Groff 6b1f1e8589 tighten some screws in math.parser 2009-10-22 20:48:46 -05:00
Joe Groff 419b3bca9a speed up dec>float a little 2009-10-22 18:55:32 -05:00
Joe Groff 05adcf8e88 inline the trivial words in math.parser 2009-10-22 17:26:22 -05:00
Slava Pestov eb5d30e724 Fix conflict 2009-09-23 20:52:04 -05:00
Keith Lazuka 293b9704d2 docs: updated some docs to use new markup 2009-09-22 15:22:34 -04:00
Joe Groff eb4d4a24da oops, float>hex didn't preserve leading zeroes in mantissa 2009-09-20 16:48:42 -05:00
Joe Groff 2050561915 document number-base prettyprinter variable. add more docs about hex float syntax 2009-09-18 15:11:01 -05:00
Joe Groff aa2047e942 add a number-base configuration variable to prettyprint.config. set to 2 to print BIN:, 8 to print OCT:, 10 to print decimal, 16 to print HEX: 2009-09-14 15:03:05 -05:00
Slava Pestov 8cf1c488d4 math.parser: fix example 2009-09-12 21:45:57 -05:00
Slava Pestov 481a97975e math, syntax: document hexadecimal float literal syntax 2009-09-12 21:18:17 -05:00
Joe Groff b0d4051ac5 HEX: X.XXXpEEE hexadecimal float literal syntax 2009-09-11 20:11:29 -05:00
Joe Groff 0c2f6fd63c let's not forget about hex literals 2009-09-01 21:28:23 -05:00
Joe Groff 64d2459dac require numeric literals to begin and end with a digit/decimal point so that stuff like "," and "1," don't parse as numbers 2009-09-01 21:14:26 -05:00
Joe Groff 4033e46800 Merge branch 'master' of git://factorcode.org/git/factor 2009-08-14 10:55:05 -04:00
Doug Coleman 1797f389f8 add if-zero/when-zero/unless-zero to core/ and update usages 2009-08-11 17:59:40 -05:00
Joe Groff ddaa99ba89 allow commas in numeric literals 2009-08-10 19:33:27 -04:00
Slava Pestov dbd4b8ddb8 Fix test failures 2009-05-04 13:10:56 -05:00
Slava Pestov 4d438a3edd Remove cruddy string encoding/decoding code from VM 2009-05-02 13:45:38 -05:00
Slava Pestov 1c68b389cc Document special float values 2009-04-14 15:05:10 -05:00
Slava Pestov cb6f59ff5b Fix unit test failure in math.parser 2009-04-13 20:25:55 -05:00