| Daniel Rock 2006-11-26, 7:18 pm |
| Michael Paoli <michael1cat@yahoo.com> wrote:
> That's a nice theory, but may implementations of bc(1) are fairly
> limited in their precision - and well before CPU or memory become the
> practical limiting factors. I've seen many bc(1) implementations that
> bomb out (typically core dumping) somewhere in the range of 20 to 55
> for scale. E.g. try:
> $ echo 'scale=60;4*a(1)' | bc -l
> on some various implementations and see what you get. There are many
> that can't handle that.
Then this bc is broken. According to POSIX/SUSv3 bc has to support at
least a scale of 99:
http://www.opengroup.org/onlinepubs...s/limits.h.html
(see BC_SCALE_MAX, resp. _POSIX2_BC_SCALE_MAX)
--
Daniel
|