freebsd-skq/tests/bc/length.txt
Stefan Eßer 1f958cfad7 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
2020-06-27 15:03:19 +00:00

130 lines
2.4 KiB
Plaintext

length(0)
length(1)
length(12)
length(123)
length(1234)
length(12345)
length(123456)
length(1234567)
length(12345678)
length(123456789)
length(1234567890)
length(1.0)
length(12.0)
length(123.0)
length(1234.0)
length(12345.0)
length(123456.0)
length(1234567.0)
length(12345678.0)
length(123456789.0)
length(1234567890.0)
length(.1)
length(.12)
length(.123)
length(.1234)
length(.12345)
length(.123456)
length(.1234567)
length(.12345678)
length(.123456789)
length(.1234567890)
length(.01)
length(.012)
length(.0123)
length(.01234)
length(.012345)
length(.0123456)
length(.01234567)
length(.012345678)
length(.0123456789)
length(.01234567890)
length(.001)
length(.0012)
length(.00123)
length(.001234)
length(.0012345)
length(.00123456)
length(.001234567)
length(.0012345678)
length(.00123456789)
length(.001234567890)
length(.0001)
length(.00012)
length(.000123)
length(.0001234)
length(.00012345)
length(.000123456)
length(.0001234567)
length(.00012345678)
length(.000123456789)
length(.0001234567890)
length(.00001)
length(.000012)
length(.0000123)
length(.00001234)
length(.000012345)
length(.0000123456)
length(.00001234567)
length(.000012345678)
length(.0000123456789)
length(.00001234567890)
length(.000001)
length(.0000012)
length(.00000123)
length(.000001234)
length(.0000012345)
length(.00000123456)
length(.000001234567)
length(.0000012345678)
length(.00000123456789)
length(.000001234567890)
length(.0000001)
length(.00000012)
length(.000000123)
length(.0000001234)
length(.00000012345)
length(.000000123456)
length(.0000001234567)
length(.00000012345678)
length(.000000123456789)
length(.0000001234567890)
length(.00000001)
length(.000000012)
length(.0000000123)
length(.00000001234)
length(.000000012345)
length(.0000000123456)
length(.00000001234567)
length(.000000012345678)
length(.0000000123456789)
length(.00000001234567890)
length(.000000001)
length(.0000000012)
length(.00000000123)
length(.000000001234)
length(.0000000012345)
length(.00000000123456)
length(.000000001234567)
length(.0000000012345678)
length(.00000000123456789)
length(.000000001234567890)
length(.0000000001)
length(.00000000012)
length(.000000000123)
length(.0000000001234)
length(.00000000012345)
length(.000000000123456)
length(.0000000001234567)
length(.00000000012345678)
length(.000000000123456789)
length(.0000000001234567890)
length(289.29837)
length(2893.00000)
length(289.0)
length(1802973.0000000238)
length(.000000000000000093182394080000000000)
a[0] = 0
a[5] = 0
length(a[])