[Gambas-user] A question about how "Frac" works

Santiago Oberto santiago_j_oberto at ...1877...
Fri Dec 23 16:34:12 CET 2011


Good Morning!

Recently I have been devoloping an application in wich I needed to use
several strings and numbers like if they were strings.

I have been having a problem with this issue:

I realized that when trying to use frac(my_float_number) I don't get the
desired result. For instance:

Print CString(Frac(5.025)) returns 0.0250000000000004 when I expected to
get 0.025...

Is this a common behaviour of this function and this is not suited for
the pourpose I persuit?

I am using Gambas 2.99.3 in a Fedora 14 32-bits Enviroment.

Thanks in advanced!





More information about the User mailing list