Single or Double?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi again,

Is there any rule for defining a number field to single or double? When I
want to define a field to accept money (up to now) I define it as number
single (I dont like the currency). Will this be a problem when adding the
values of this field (or get the avg)? What rules are applied for this
datatypes//fieldsizes?

Thanks in advance,

George
 
Use a Double as the default, since it gives better accuracy. Use a Single
only when performance or disk space is critical, *and* accuracy is less
important. Typically, a Single gives you the first 7 or 8 significant
figures accurately, whereas the Double gives you around 15 significant
digits.

Why don't you like Currency? As a fixed-point data type, it avoids the
problems inherent in floating-point numbers. There are some things it's not
suitable for (e.g. if you need more than 4 decimal places or monstrously
large numbers that rely on being powers of 10.) But I regularly use Currency
for non-money fields (such as measurements in metres, accurate to 1/10th of
a millimetre) just because it avoids the floating-point issues.
 
Thanks a lot Allen for your prompt reply,

Just one more thing pls? What do you mean by saying "floating-point
issues". Sorry but my mother language is Greek.

Ο χÏήστης "Allen Browne" έγγÏαψε:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top