[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

rnd max scale/precision

Posted on 2011-03-03
2
Medium Priority
?
334 Views
Last Modified: 2012-08-14
http://office.microsoft.com/en-us/access-help/rnd-function-HA001228901.aspx
does not tell how much precision/scale is guaranteed on plain rnd

like could or would it be 0.12345678 or 0.1234567890 or 0.123456789012 etc

can this be controlled or set using a switch in access?

thanks
0
Comment
Question by:anushahanna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 2000 total points
ID: 35034483
rnd() returns a Single.

The defined range for single is
–3402823E38 to –1.401298E–45 or 1.401298E–45 to 3.402823E38
rnd() obviously doesn't use the whole range as it only returns a number between 0 and 1


I'm not sure wheteher this range definition means that there can never be more than 7 significant digits, but certainly I've never seen a result with more than 7.

However you also have to bear in mind that using rnd() you can get results like..
 5.623686E-02

If you were using rnd() to get unique IDs then this result is going to give you problems. ( I'm just linking this Q with others you have been posting lately).


0
 
LVL 6

Author Comment

by:anushahanna
ID: 35037467
hmm.. at least we tried..

thanks Peter.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question