Solved

rnd max scale/precision

Posted on 2011-03-03
2
327 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
2 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 500 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

777 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