axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] [#227 'random()$Integer' is a strange function] (nouve


From: anonyme
Subject: [Axiom-developer] [#227 'random()$Integer' is a strange function] (nouveau)
Date: Fri, 04 Nov 2005 04:11:44 -0600

Changes http://wiki.axiom-developer.org/227RandomIntegerIsAStrangeFunction/diff
--
Currently there is a function 'random()' for 'IntegerNumberSystem', which is 
documented to return a random number::

   random   : () -> %
      ++ random() creates a random element.

Of course, this is really a half-lie. There is no uniform distribution over the 
integers, so one wonders which distribution is used.

After a grep I found the definition for 'random()$INT' in 
interp/spad.boot.pamphlet:

(defun |random| () (random (expt 2 26)))

So, at least the documentation should change. But in fact, I don't see why such 
a function should exist at all.

Martin
--
forwarded from http://wiki.axiom-developer.org/address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]