Article View: comp.std.c
Article #4782random floating point!
From: Daniel Williamson
Date: Thu, 22 Feb 1996 14:32
Date: Thu, 22 Feb 1996 14:32
6 lines
770 bytes
770 bytes
Does anybody know how to generate a random floating point number. I am using top speed c, for the work and the rand() function ad defined in the ansi standard only goes up to 32767. I suppose I could multiply it, but I'm looking for a more elegant solution to give me the full range of +ve and -ve values. Thanks for any help you can offer. Daniel
Technical Details
Message-ID:
<4ghuql$80h@bignews.shef.ac.uk>Path:
arc1-ca.pugleaf.net!bignews.shef.ac.uk!usenetShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!bignews.shef.ac.uk!usenet From: D.G.Williamson@shef.ac.uk (Daniel Williamson) Newsgroups: comp.std.c Subject: random floating point! Date: 22 Feb 1996 14:32:53 GMT Organization: Electrical Eng, University of Sheffield , UK Message-ID: <4ghuql$80h@bignews.shef.ac.uk> NNTP-Posting-Host: pc021048.shef.ac.uk Mime-Version: 1.0 Content-Type: Text/Plain; charset=US-ASCII X-Newsreader: WinVN 0.99.7