Percentages Help

  • Thread starter Thread starter Stephen Lynch
  • Start date Start date
S

Stephen Lynch

I have set a few fields Percentage1, Percentage 2 and so on as TYPE single.

when I enter the as such

Percentage1 .25
Percentage2 .28

It adds up to 0.529999971389771. What gives here?

I need it to be precise for error checking that I am doing it there a
different way to code the percent type?
 
Stephen said:
I have set a few fields Percentage1, Percentage 2 and so on as TYPE
single.
when I enter the as such

Percentage1 .25
Percentage2 .28

It adds up to 0.529999971389771. What gives here?

I need it to be precise for error checking that I am doing it there a
different way to code the percent type?

Single and Double are not precise types. If you need that use Decimal or
Currency.
 
If you want more precision you should use double, not single. See if that
takes care of it. But occasionally a number will end up being off by some
small fraction.
 
Back
Top