[seqfan] Re: pari division by zero

Richard Mathar mathar at strw.leidenuniv.nl
Thu Mar 12 12:10:38 CET 2009


gg>From seqfan-bounces at list.seqfan.eu Thu Mar 12 10:26:57 2009
gg>Date: Thu, 12 Mar 2009 10:55:00 +0200
gg>From: Georgi Guninski <guninski at guninski.com>
gg>To: seqfan at seqfan.eu
gg>Subject: [seqfan]  pari division by zero
gg>
gg>pari division by zero
gg>
gg>A73408
gg>A75861
gg>A110500

The first two only show this error message if called with an index outside
the range in which they are defined. Two arguments:
i) There is no way that all of the  programming can be done with full
  error checking (in this case: parameter range checking) in the OEIS.
  This would blow up most of the code by small non-integer factors, obscure
  the arithmetics/algorithm etc. Although in an industrial style of programming,
  one would include all of this, it's not a good idea here, in particular
  as the programming language is PARI where if-then-else blocks are 
  difficult to decipher (this in contrast to an environment with
  full exception handling).
ii) The error message is good because it indicates that the function has
  been called with parameters that do not make sense.

In that sense, I'd not opt for a change in the one-liners of A73408 and A76861

RJM




More information about the SeqFan mailing list