You could do: X - Trunc_XL(X)
There's plenty of other ways to handle it when you convert it the numer to a string. You could use the LSplit function to split the string on the decimal point and return the second part. You could compare the length of the string to where the decimal point appears. If the decimal point is not present if it is a whole number, you could search for a decimal point in the string.
I'm sure there's at least a dozen other ways, but here's a few. Pick the one that makes the most sense to you.