**Subject:** Re: bc and dc revisited.

**To:** None *<ragge@ludd.luth.se>*

**From:** Phil Nelson *<phil@pn.fdns.net>*

**List:** tech-userlevel

**Date:** 11/10/2003 11:30:54
On Monday 10 November 2003 03:18 am, ragge wrote:
> I have removed the limits that the old tools had (like 99 decimals)
> and also taught it that modern machines has ints larger than 16 bits,
> so it will now run as fast as the GNU tools.
> I have not implemented all GNU options and switches that are availabl
> but it should be fully compliant with POSIX etc.
I would object to the removal of many of the features of GNU bc. Also,
I don't think the current code is working well enough to replace GNU bc.
For example:
turn[109]$ bc -l
scale=1000
4*a(1)
3.14159265358979323846264338327950288419716939937510560000000000000000\
0000000000000000000000000000000000000000000000000000000000000000000000\
0000000000000000000000000000000000000000000000000000000000000000000000\
0000000000000000000000000000000000000000000000000000000000000000000000\
0000000000000000000000000000000000000000000000000000000000000000000000\
0000000000000000000000000000000000000000000000000000000000000000000000\
I ran many of my other tests for GNU bc and many of them didn't work on the
32V processor. Also, the math library is much slower. To show this
consider the following. I'm using the version of bc you posted for this
test, bc.library is the math library for 32V and libmath.b is the GNU bc
version.
---->~/me/bc/Test
turn[119]$ time bc bc.library jn.b
-.03329855487630566800748309439984550659781158351287
-.00648115168876276895858580295786734310987910950934
.04431532933245365649911092813736180550142494873120
-.04084340882273173036919689349257616993289838931589
-.02243471758440192810060521803721671199059663161876
-.01449122706478569886133684583938086724345975237695
real 0m32.916s
user 0m32.051s
sys 0m0.121s
---->~/me/bc/Test
turn[120]$ time bc libmath.b jn.b
-.03329855487630566800748309439984550659781158351287
-.00648115168876276895858580295786734310987910950934
.04431532933245365649911092813736180550142494873120
-.04084340882273173036919689349257616993289838931589
-.02243471758440192810060521803721671199059663161876
-.01449122706478569886133684583938086724345975237695
real 0m1.828s
user 0m1.784s
sys 0m0.000s
There are other areas where work is needed:
---->~/me/bc/Test
turn[137]$ echo "length(2^44497)" | bc
exp too big
stack empty
empty stack
save:args
---->~/me/bc/Test
turn[138]$ echo "length(2^44497)" | gbc
13395
Again, I'd like to know why it is so important to have the GPL removed from
all the tools? I understand the kernel and fully support it.
--Phil