in reply to My first JAPH
The main place where Z29 appears is in the a() subroutine where you generate a hash %h whose keys are elements of Z29 and whose values are the discrete logarithms of those elements. But then you immediately turn around and use values on %h, which extracts the logs, but not in any mathematically interesting order. The order is determined by the order in which the Z29 elements happen to appear in the Perl hash, which is dependent on the hashing function that Perl uses.
This is why the program doesn't work except under 5.6.0: The Perl hash function changed in 5.6.0, and the order of the items in the return value of a() depends on this hash function.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: My first JAPH
by rpc (Monk) on Nov 21, 2000 at 01:58 UTC | |
by Dominus (Parson) on Nov 21, 2000 at 02:49 UTC |