Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Floating Point Number Types - Is single A floating Point?

Status
Not open for further replies.

Ogart

Technical User
Mar 26, 2003
104
US
Really supremely dumb question:

My understanding is that "Double" number types are floating point, so one introduces a bit of error in calculations when using said number type.

1. Is "Single" a floating point number type?
2. For the sake of precision, is it best to establish a datatype of say decimal with a bunch of decimal places?

Appreciate the thoughts. -->Just because you can, doesn't mean you should.
 
Hi,
There are NO DUMB questions, only dumb assumptions that are incorrect. LOL

According to Visual Basic help, both the Single and Double are floating point numbers. Personally, I use code to limit the number of decimal places displayed or printed, using the format property. HTH, [pc2]
Randy Smith
California Teachers Association
 
Both Single and Double are floating point numbers, the only difference is the precision used to store the number. I would only use single if I know there will be alot of data (it saves some space) and I know the precision of the data is within the range that Single can handle. A quick way to get info on this, is when you are in Table Design view, Click on the Field Size property field and hit F1 for help. (Works in Access 97 anyway).

As Randy says, You can set the Format property to display the value the way you want, but internally Access will keep the full precision of the number.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top