?
Solved

rnd max scale/precision

Posted on 2011-03-03
2
Medium Priority
?
331 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

770 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