My Math Forum  

Go Back   My Math Forum > Science Forums > Computer Science

Computer Science Computer Science Forum


Thanks Tree3Thanks
  • 2 Post By weirddave
  • 1 Post By Denis
Reply
 
LinkBack Thread Tools Display Modes
April 6th, 2017, 12:53 AM   #1
Banned Camp
 
Joined: Aug 2011

Posts: 534
Thanks: 2

Random Number Generator program.

Do Random number generator program also generate
Negative and Decimal numbers?

Thanks & Regards,
Prashant S Akerkar
prashantakerkar is offline  
 
April 6th, 2017, 01:02 AM   #2
Senior Member
 
Joined: Feb 2016
From: Australia

Posts: 1,847
Thanks: 661

Math Focus: Yet to find out.
You name it, they got it.
Joppy is offline  
April 6th, 2017, 05:33 AM   #3
Senior Member
 
Joined: Apr 2014
From: UK

Posts: 967
Thanks: 344

At least it was maths related
Thanks from Benit13 and Joppy
weirddave is offline  
April 6th, 2017, 08:18 AM   #4
Math Team
 
Joined: Oct 2011
From: Ottawa Ontario, Canada

Posts: 14,597
Thanks: 1039

Well, pick at random 2 integers; assume 372 and 5923 are picked:
put 'em, side by side, with decimal point in between: 372.5923
You can be real audacious and add an "or" to get 5923.372 50% of time.
DO NOT stop there: add a random "+ or -" to get negatives 50% of time...

I am tremendously proud of myself for "inventing?" the above.
Are you jealous, Dave and Joppy?
Thanks from Benit13
Denis is offline  
April 6th, 2017, 09:47 AM   #5
Math Team
 
Joined: Oct 2011
From: Ottawa Ontario, Canada

Posts: 14,597
Thanks: 1039

Ahhh...I see yer ain't jealous Benit;
you get my benitiction!
Denis is offline  
April 6th, 2017, 09:48 AM   #6
Senior Member
 
Joined: Apr 2014
From: Glasgow

Posts: 2,166
Thanks: 738

Math Focus: Physics, mathematical modelling, numerical and computational solutions
Quote:
Originally Posted by prashantakerkar View Post
Do Random number generator program also generate
Negative and Decimal numbers?

Thanks & Regards,
Prashant S Akerkar
He's some homework for you (use Google).

Is it possible for computers, which are deterministic machines, to be able to generate non-deterministic numbers?

Have fun
Benit13 is offline  
April 7th, 2017, 04:45 AM   #7
Senior Member
 
Joined: Apr 2014
From: UK

Posts: 967
Thanks: 344

Depends how good the RNG is, it might be more efficient to pick 3725923 and divide by 10000
weirddave is offline  
Reply

  My Math Forum > Science Forums > Computer Science

Tags
decimal, generator, negative, number, program, random



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Largest and Smallest Decimal Number Computer program. prashantakerkar Applied Math 5 March 31st, 2017 07:46 AM
I'm Looking For A Random Number Generator With Variable Probabilities EvanJ Probability and Statistics 7 October 16th, 2016 08:16 AM
Random Number Generation PrayForStan Number Theory 1 November 28th, 2012 06:08 AM
Random number generator of different distributions. oldjack Advanced Statistics 0 July 11th, 2009 07:30 PM
Random number generator grbradt Advanced Statistics 6 August 7th, 2007 03:21 PM





Copyright © 2019 My Math Forum. All rights reserved.