Share My Creation Random Number - Normal Distribution Server

Hi All,

I have made the fast normal distribution random number generator. The server is named randomNoGen.exe and takes one parameter the port number. Like speedySpline if you don't provide a parameter the port defaults to 27015. The example test app is using 27016.

Basically you send a command: 1, the mean and the standard deviation and you get back the values as doubles. The random number generator is seeded with the computer clock so you will get a different set of number for each run. If you wish to use the same number set for different runs of you program then get the numbers once and save that number set to a file.

The raw results of a single run for 20,000 Values. As you can see it takes about 0.35 seconds to do 20,000 points. The second screen shot shows a histogram of that data.

randNorm30000.png


randNorm30000Histogram.png



As you can see the data is pretty close: mean given = 1.0 data mean = 0.999, standard deviation given = 2.5 data SD = 2.515

Sadly I can't provide the source code for the random number algorithm as it is proprietary, however I have attached the B4J test program which include randomNoGen.exe in the objects directory.

Hope you find this useful.

Best regards
Rob
 

Attachments

  • randomNoTest_002.zip
    38 KB · Views: 264

rgarnett1955

Active Member
Licensed User
Longtime User
Very disrespectful and I'm sorry that I replied to your thread. Will not happen again.

Lets see: https://www.b4x.com/android/forum/pages/results/?query=encryption+library&prefix=0

View attachment 107329

Excellent results.
Hi Erel,

Sorry if you were upset by my comment. But I was only conveying my own experience trying to find stuff in the forum to Andrea who said she had trouble finding stuff on it. I wasn't attacking you I was recounting my experience and opinion of the forum search function.

I have spent a lot of time and a lot of frustration with the forum. Particularly trying to track down libraries. If you think that the forum software is unimproveable you may be right; however, perhaps you could carry out a survey of users to find out what they like and dislike about the B4X ecosystem, including the forum. You may learn something about users experince that challenges the view you appear to hold.

In fact the problem was that Andrew hadn't saved the library as a zip, but saved it in a zipped B4A example. That was what what was confusing.

I have been told by certain people on this forum that I have produced inefficient code. I find that disrespectful, but I don't get all bent out of shape over it. In fact I think you may have been one of the perpetrators of this egregious transgression. I've also experienced sarcasm from people in the forum for programming in C. I haven't refused anyone assistance or regretted helping because of this.

You are obviously a very clever fellow, who is an expert in Java and obviously B4X. Sadly we can't all be as clever as you and have your B4X experience. (How's your large thermal power station experience by the way, mine's really good fortytwo years of it).

I'm not the brightest bulb in the chandelier, but I like programming and I do my best, I have also continued to contribute to B4X financially even after B4A became free. I will continue top do so and where I think stuff is good I will say so and where I don't I will say so as well. I will provide constructive comments if asked to do so.

In this case I was commiserating with a fellow user who had experinced some of my frustrations. She was very polite about it; I was not.

I don't like being patronized and I feel a continuing element of this in this forum. By reacting in the way you have with your search example you have exhibited an extremely patronizing attitude that does not acknowledge the difficulties experienced by lesser mortals and the resulting frustration they may experience. In spite of this I will soldier on; I won't take my bat and ball and go home.


Best regards
Rob
 
Top