Opened 15 months ago
Closed 15 months ago
Last modified 13 months ago
New minor version.
This is a production release with a bug fix for Linux, new translations, and new
There is only one new feature: bc now has a built-in pseudo-random number
The PRNG is seeded, making it useful for applications where
/dev/urandom does not work because output needs to be reproducible. However,
it also uses /dev/urandom to seed itself by default, so it will start with a
good seed by default.
It also outputs 32-bits on 32-bit platforms and 64-bits on 64-bit platforms, far
better than the 15 bits of C's rand() and bash's $RANDOM.
IMPORTANT: read the [bc manual] and the [dc manual] to find out
exactly what guarantees the PRNG provides. The underlying implementation is not
guaranteed to stay the same, but the guarantees that it provides are guaranteed
to stay the same regardless of the implementation.*
On top of that, four functions were added to bc's [extended math library]
to make using the PRNG easier:
In addition, the PRNG can take a bound, and when it gets a bound, it
automatically adjusts to remove bias. It can also generate numbers of arbitrary
size. (As of the time of release, the largest pseudo-random number generated by
this bc was generated with a bound of 2^(2^20).)
Now version 2.7.1.
Now version 2.7.2.
This is a production release with one major bug fix.
The length() built-in function can take either a number or an array. If it
takes an array, it returns the length of the array. Arrays can be passed by
reference. The bug is that the length() function would not properly
dereference arrays that were references. This is a bug that affects all users.
ALL USERS SHOULD UPDATE bc.
This is a production release with fixes for new locales and fixes for compiler
warnings on FreeBSD.
Fixed at revision 11840.
Powered by Trac 1.5.3.dev0
By Edgewall Software
© 1998-2021 Gerard Beekmans.