From 1f958cfad78842ab9a1193471589231e25596cb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20E=C3=9Fer?= Date: Sat, 27 Jun 2020 15:03:19 +0000 Subject: Import new 2-clause BSD licenced implementation of the bc and dc commands 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 --- tests/bc/comp.txt | 132 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 tests/bc/comp.txt (limited to 'tests/bc/comp.txt') 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 -- cgit v1.2.3