Re: ran 3 trials of 100K to check the recovery of a rational number from its decimal

Bill Allombert <[email protected]>
Newsgroups gmane.comp.mathematics.pari.user
Message-ID <aEFrVa2fZAtu_ErE@seventeen>
On Wed, Jun 04, 2025 at 11:05:03PM -0700, American Citizen wrote:
> And somewhat irritatingly, I got a zero from the random(N) function call,
> which resulted in a zero in the denominator, so I had to watch out for that.

You can use random([1,N]) if you need a random number x so that 1<=x<=N.

Cheers,
Bill.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.