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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Single data type

Status
Not open for further replies.

moki

Programmer
Dec 5, 2000
37
Can someone please explain to me why a varable defined as single with a decimal * 100 comes out as a fraction?

sample:

dim sngx as single

sngx = 8.40

debug.print sngx * 100 ' results in 839.9999

Why doesn't it result to 840?

I'm probably the only one who is missing something here.


 
Do a search on this forum for 'floating point'

This has been answered lots of times.

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top