NewbieJohnny
New member
- Local time
- Today, 07:54
- Joined
- May 23, 2012
- Messages
- 4
I have a public function in a module that converts a number given in millimeters to inches. The problem is that it does not convert accuratly and I'm stumped as to why? The code is:
Public Function CvrtInch(Dia As Single)
CvrtInch = Dia / 25.4
End Function
When I run the function in the immediate window for a Dia variable of 25.4, I get an answer of 0.999999984981507. Any ideas where the inaccuracy is coming from?
Public Function CvrtInch(Dia As Single)
CvrtInch = Dia / 25.4
End Function
When I run the function in the immediate window for a Dia variable of 25.4, I get an answer of 0.999999984981507. Any ideas where the inaccuracy is coming from?