r5746 - in trunk/BOOK: general/genutils introduction/welcome

Bruce Dubbs bdubbs at swbell.net
Sun Mar 26 10:37:32 PST 2006

Dan Nicholson wrote:
> On 3/25/06, Randy McMurchy <randy at linuxfromscratch.org> wrote:
>> I think having tests that fail, even if it is mentioned, will cause
>> folks to ask needless questions. Please explain what benefit having
>> those tests do for the package as it is a mature package that is
>> known by all to work properly.
> I don't care if they're in or not.  I only looked into because that's
> the policy.  If they're taken out, what should I say?  Saying there's
> no test suite would be a lie.

I took a look at this and all the errors are roundoff errors at the last
digit.  For instance, the function for e(x) only has:

scale = 10

  index = 97
  val1 = 1338334719204269500461736408706115029076717.4572136445
  val2 = 1338334719204269500461736408706115029076717.45721364460012

The test runs 200 times with values 0..199 and the only problem was with
a value of 97.  In addition, there were an additional 200 tests run at
scale values of 20..60 step 10, all with no errors.  This type of
roundoff error is normal for high precision mathematical algorithms.

The only change that needs to be made to the book here is to change the
sentence:  "Some tests are known to fail, but bc is still useable
[sic]." to read: "There are a very small percentage of tests (10 of
12,144) that will indicate a roundoff error at the last digit."

I also note that we have:

for TEST in Test/{checklib,testfn}.b& do
    echo "quit" | ./bc/bc -l $TEST

but testfn.b does nothing.  It is merely a function useful for including
in other tests.  We need to change this to:

echo "quit" | ./bc/bc -l Test/checklib.b

  -- Bruce

More information about the blfs-book mailing list