Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Mar 9, 2007, 09:26 AM   #1
vgoklani
macrumors regular
 
Join Date: Jul 2004
Send a message via AIM to vgoklani
Generating normally distributed random numbers in C++

Hi,

I would like to generate normally distributed (as opposed to uniformly distributed) random numbers in C++ - is there a library function that would accomplish this? I am using the g++ compiler that comes installed with XCode.
vgoklani is offline   0 Reply With Quote
Old Mar 9, 2007, 09:56 AM   #2
Eraserhead
macrumors G4
 
Eraserhead's Avatar
 
Join Date: Nov 2005
Location: UK
Quote:
Originally Posted by vgoklani View Post
Hi,

I would like to generate normally distributed (as opposed to uniformly distributed) random numbers in C++ - is there a library function that would accomplish this? I am using the g++ compiler that comes installed with XCode.
Hmm, you could easily write your own code.

Look at this page. It gives a formula for how to do it.
Eraserhead is offline   0 Reply With Quote
Old Mar 9, 2007, 11:23 AM   #3
vgoklani
Thread Starter
macrumors regular
 
Join Date: Jul 2004
Send a message via AIM to vgoklani
I thought about using Numerical Recipes, but thanks for the link!
vgoklani is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
My keychain access shows random numbers and letters for my passwords, please help :) xcstryder OS X Mavericks (10.9) 1 Apr 15, 2014 12:33 AM
Advanced Search starts with lots of "random" numbers as keywords simsaladimbamba Site and Forum Feedback 6 Feb 18, 2014 10:32 PM
How to generate quality random numbers in bulk? Qaanol Mac Programming 7 Jul 21, 2013 01:46 PM
Distributed computing deepankardey Distributed Computing 1 Jun 29, 2013 02:40 AM

Forum Jump

All times are GMT -5. The time now is 02:16 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC