aboutsummaryrefslogtreecommitdiff
path: root/tests/bc/comp.txt
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2020-06-27 15:03:19 +0000
committerStefan Eßer <se@FreeBSD.org>2020-06-27 15:03:19 +0000
commit1f958cfad78842ab9a1193471589231e25596cb3 (patch)
tree4bbff8044605fcfff11c9d322bb6f53495e4faa7 /tests/bc/comp.txt
downloadsrc-1f958cfad78842ab9a1193471589231e25596cb3.tar.gz
src-1f958cfad78842ab9a1193471589231e25596cb3.zip
Import new 2-clause BSD licenced implementation of the bc and dc commandsvendor/bc/3.0.2
These implementations of the bc and dc programs offer a number of advantages compared to the current implementations in the FreeBSD base system: - They do not depend on external large number functions (i.e. no dependency on OpenSSL or any other large number library) - They implements all features found in GNU bc/dc (with the exception of the forking of sub-processes, which the author of this version considers as a security issue). - They are significantly faster than the current code in base (more than 2 orders of magnitude in some of my tests, e.g. for 12345^100000). - They should be fully compatible with all features and the behavior of the current implementations in FreeBSD (not formally verified). - They support POSIX message catalogs and come with localized messages in Chinese, Dutch, English, French, German, Japanese, Polish, Portugueze, and Russian. - They offer very detailed man-pages that provide far more information than the current ones. Approved by: imp Obtained from: https://git.yzena.com/gavin/bc Differential Revision: https://reviews.freebsd.org/D19982
Notes
Notes: svn path=/vendor/bc/dist/; revision=362697 svn path=/vendor/bc/3.0.2/; revision=362698; tag=vendor/bc/3.0.2
Diffstat (limited to 'tests/bc/comp.txt')
-rw-r--r--tests/bc/comp.txt132
1 files changed, 132 insertions, 0 deletions
diff --git a/tests/bc/comp.txt b/tests/bc/comp.txt
new file mode 100644
index 000000000000..73aa4508f345
--- /dev/null
+++ b/tests/bc/comp.txt
@@ -0,0 +1,132 @@
+-999999999 < -1
+-999999999 > -1
+-1000000000 < -1
+-1000000000 > -1
+-1 < -999999999
+-1 > -999999999
+-1 < -1000000000
+-1 > -1000000000
+-99999 < -1
+-99999 > -1
+-100000 < -1
+-100000 > -1
+-1 < -99999
+-1 > -99999
+-1 < -100000
+-1 > -100000
+-999999999 < -1000000000
+-999999999 > -1000000000
+-1000000000 < -999999999
+-1000000000 > -999999999
+-99999 < -100000
+-99999 > -100000
+-100000 < -99999
+-100000 > -99999
+999999999 < 1
+999999999 > 1
+1000000000 < 1
+1000000000 > 1
+1 < 999999999
+1 > 999999999
+1 < 1000000000
+1 > 1000000000
+99999 < 1
+99999 > 1
+100000 < 1
+100000 > 1
+1 < 99999
+1 > 99999
+1 < 100000
+1 > 100000
+999999999 < 1000000000
+999999999 > 1000000000
+1000000000 < 999999999
+1000000000 > 999999999
+99999 < 100000
+99999 > 100000
+100000 < 99999
+100000 > 99999
+-999999999 < 1
+-999999999 > 1
+-1000000000 < 1
+-1000000000 > 1
+-1 < 999999999
+-1 > 999999999
+-1 < 1000000000
+-1 > 1000000000
+-99999 < 1
+-99999 > 1
+-100000 < 1
+-100000 > 1
+-1 < 99999
+-1 > 99999
+-1 < 100000
+-1 > 100000
+-999999999 < 1000000000
+-999999999 > 1000000000
+-1000000000 < 999999999
+-1000000000 > 999999999
+-99999 < 100000
+-99999 > 100000
+-100000 < 99999
+-100000 > 99999
+999999999 < -1
+999999999 > -1
+1000000000 < -1
+1000000000 > -1
+1 < -999999999
+1 > -999999999
+1 < -1000000000
+1 > -1000000000
+99999 < -1
+99999 > -1
+100000 < -1
+100000 > -1
+1 < -99999
+1 > -99999
+1 < -100000
+1 > -100000
+999999999 < -1000000000
+999999999 > -1000000000
+1000000000 < -999999999
+1000000000 > -999999999
+99999 < -100000
+99999 > -100000
+100000 < -99999
+100000 > -99999
+v = 18237
+v == v
+v != v
+4 < 0
+-4 < 0
+4 > 0
+-4 > 0
+5 > 4
+-5 > 4
+5 > -4
+-5 > -4
+5 < 4
+-5 < 4
+5 < -4
+-5 < -4
+1000000000.000000001 == 999999999.000000001
+1000000000.000000001 > 999999999.000000001
+1000000000.000000001 < 999999999.000000001
+1000000000.000000001 == 1000000000.000000001
+1000000000.000000001 > 1000000000.000000001
+1000000000.000000001 < 1000000000.000000001
+1000000000.000000001 == 1000000000.00000000100000000
+1000000000.000000001 > 1000000000.00000000100000000
+1000000000.000000001 < 1000000000.00000000100000000
+1000000000.000000001 == 1000000000.000000001000000001
+1000000000.000000001 > 1000000000.000000001000000001
+1000000000.000000001 < 1000000000.000000001000000001
+999999999.000000001 == 1000000000.000000001
+999999999.000000001 > 1000000000.000000001
+999999999.000000001 < 1000000000.000000001
+1000000000.00000000100000000 == 1000000000.000000001
+1000000000.00000000100000000 > 1000000000.000000001
+1000000000.00000000100000000 < 1000000000.000000001
+1000000000.000000001000000001 == 1000000000.000000001
+1000000000.000000001000000001 > 1000000000.000000001
+1000000000.000000001000000001 < 1000000000.000000001