develooper Front page | perl.perl5.porters | Postings from January 2001

Re: [PATCH: perl@8342] lib/bigfloat.t FAILED at test 351

From:
Jarkko Hietaniemi
Date:
January 11, 2001 13:16
Subject:
Re: [PATCH: perl@8342] lib/bigfloat.t FAILED at test 351
Message ID:
20010111151637.A5119@chaos.wustl.edu
> I interpreted the patch as applying to lib/bigint.pl and
> lib/Math/BigInt.pm, yet you refer to "tweaking test scripts".  The patch

Oops.  Sorry, my mistake.

But tweaking the libraries is not much better than tweaking the(ir)
test script.

> did not seem to mention any *.t file nor the t nor t/lib directories.
> 
> None the less switching C<($y * 1e-5) * 1e5> to C<($y / 1e5) * 1e5> 
> should be a performance hit on architectures whose fp division is
> considerable slower than fp multiplication.  Would you prefer that there

That, too.

> be new extracted versions of those lib files such as lib/bigint_pl.PL
> and lib/Math/BigInt_pm.PL?  That might look in part like:
> 
> use Config;
> 
> if ($Config{'fp_divide_broken'} eq 'define') {
>     print OUT '$prod - ($car = int($prod / 1e5)) * 1e5;';
> }
> else {
>     print OUT '$prod - ($car = int($prod * 1e-5)) * 1e5;';
> }
> 
> or somesuch?

Somesuch would be nicer.  And as I said, this could a BEGIN block
decision, too.

> 
> Peter Prymmer
> 
> 

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About