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]


From: wyscc
Subject: [Axiom-developer] [#227 'random()$Integer' is a strange function]
Date: Mon, 14 Nov 2005 04:06:00 -0600

Changes http://wiki.axiom-developer.org/227RandomIntegerIsAStrangeFunction/diff
--

??changed:
-Are you serious?  random() is a categorical specification and it is not 
possible to be more specific without knowing the domain. It is certainly useful 
in creating derived random functions that are more meaningful such as random(n) 
or random(m,n). It does not mean that n is limited to 2^26. A grep for 
random()$INT shows uses in other domains (such as Float, Fraction Integer). 
There are many algorithms (like factoring integers) that use monte carlo 
methods.
'random()' is a categorical specification and it is not possible to be more 
specific without knowing the domain. It is certainly useful in creating derived 
random functions that are more meaningful such as 'random(n)' or 'random(m,n)'. 
It does not mean that 'n' is limited to $2^{26}$. A grep for 'random()\$INT' 
shows uses in other domains (such as Float, Fraction Integer). There are many 
algorithms (like factoring integers) that use monte carlo methods.

??changed:
-It should be the responsibility of each domain to be specific on what random() 
exactly does and the algorithm used, but not at the category level. So for 
random()$INT, yes, the documentation should say the random number lies between 
1 and 2^26. But that is not crucial since developers know that, and for users, 
there is random(n)$INT for any n (also implemented in Lisp), which one should 
use instead in applications.
It should be the responsibility of each domain to be specific on what random() 
exactly does and the algorithm used, but not at the category level. So for 
'random()\$INT', yes, the documentation should say the random number lies 
between '1' and $2^{26}$. But that is not crucial since developers know that, 
and for users, there is 'random(n)\$INT' for any 'n' (also implemented in 
Lisp), which one should use instead in applications.

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




reply via email to

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