MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Creating a Random Function to Select an Irrational

  • To: mathgroup at
  • Subject: [mg102255] Re: Creating a Random Function to Select an Irrational
  • From: BenT <brtubb at>
  • Date: Mon, 3 Aug 2009 05:45:17 -0400 (EDT)
  • References: <> <>

To Andrzej Kozlowski,

I have just read all the replies to my original email, and especially
the several you made "replying" to yourself <g>. I have since visited
a site called RANDOM.ORG which defines both "pseudo" and "true" random
numbers, for which, of the second type they claim can be generated
from their site based on atmospheric noise. Although I am not
interested in cryptograpy or statistic probabilities for which
"random" numbers are typically used, if not "relied" on, my biggest
concern, that your use of WorkingPrecision partly addresses, is the
prevention of repeating digits within the "random" value which would
imply some sort of "rationality" to the number. As to matters of
"regularity" (and "coordination"), I'll be using Joseph Schillinger's
methodologies for resultants of interference with distribution and
involution groups with and without "fractioning" around an "axis of

Schillinger was notably the author of two books which I'm using for
developing my Mathematica "inspired" efforts for algorithmic music
composition. The books are "The Schillinger Method of Musical
Composition" and "The Mathematical Basis of the Arts" -- both of which
I'm been studying for over thirty years.

In any case, I do appreciate you taking the time to reply.

Another "definition" which you implied, could also be used, that
hadn't occurred to me <g> and more than provides me with what I want;
besides which the "probability" of their being a repeating sequence of
numbers is also virtually zero -- and this "method" is much easier to
implement, and runs faster <g>.

	For[dvs = "";x = 1,x < digits, x++,
	dvs = dvs <> ToString[RandomInteger[base-1]] <> ","];
dvs = dvs <> ToString[RandomInteger[base-1]]]

(* testing the function definition *)


For all bases greater than 10, their base 10 "digit" values are fine
for my use.

Actually, it has occurred to me that using the above in conjunction
with RealDigits and FromDigits, that random real numbers (in any base)
of any range and decimal "precision" can be generated from integers
only. I haven't quite figured out how to take the "rnd" string output
and convert it back into one number, but I'm working on it, since the
output must fist be redefined as a list with integer elements.

I've tried the following code to treat the values directly as numbers
for a list, but cannot figure out how to correct the code. The error
refers to the array element 101 which is not used in the "For"

rnd[digits_Integer, base_Integer] :=
  Module[{dvs, dv},
   For[Array[dvs, digits]; dv = {}; x = 1, x <= digits, x++,
    dvs[x] = RandomInteger[base - 1]];
   dv[[x]] = dvs[x]];dv

In[79]:= rnd[100,7]
During evaluation of In[79]:= Set::partw: Part 101 of {} does not
exist. >>
Out[79]= dvs$3853[101]

- - - -
using Mathematica 7

  • Prev by Date: Re: publicon
  • Next by Date: Re: Assume and $Assumptions and Results
  • Previous by thread: Re: Re: Creating a Random Function to Select an Irrational
  • Next by thread: Re: Re: Creating a Random Function to Select an Irrational