That's just the loss in floating precision. Because floats are stored in terms of fractions you can never really get a perfect float. This is function to turn floats into strings.
Function flString(value#,points)
flString$ = str$(value#)
stringLen = len(flString$)
for x=1 to stringLen
if mid$(flString$,x)=chr$(46) then periodLoc=x
next x
existingFloat = stringLen-periodLoc
if periodLoc=0
flString$=flString$+(".")
for x=1 to points
flString$=flString$+("0")
next x
else
for x=1 to stringLen
if mid$(flString$,x)=chr$(101)
sciFlag=1
sciLoc=x
endif
next x
if sciFlag=1
sciExtent = -val(right$(flString$,(stringLen-sciLoc)))
flStringTemp$=flString$
flString$="0."
if sciExtent>points then sciExtent=points
for x=1 to sciExtent
flString$=flString$+"0"
next x
c=1
for x=1 to (points-sciExtent)
if mid$(flStringTemp$,c)=chr$(46) or mid$(flStringTemp$,c)=chr$(45) then inc c
flString$=flString$+mid$(flStringTemp$,c)
inc c
next x
else
flString$=left$(flString$,periodLoc+points)
endif
endif
Endfunction flString$
The value# argument is the float number you are passing to the function. The points argument is an integer that tells how many places to round to. For example if you passed 1.256 with 2 points, the function would return a string of "1.25".