I am finding it a little long winded to separate a decimal from its integer and must have missed something. This gives me more than I started with, Great for a bank or the tax man's computer.
I can either cast to an int variable or Floor() with odd results.
I actually want to obtain the 0.6 or whatever accurately. I have achieved it as shown at the bottom but wow.
B4X:
Dim w,v as Float
Dim z, y as int
w = 12.6
z = Floor(w)
Log(z) = 12
'or I could cast to int with the same result
y = w = 12
v = w - z
Log(v) = 0.6000003814697266
:) Log(z + v) = 12.6000003814697266 :)
I could Floor( (v - w) * 10 ) /10 = 0.6
No, and if it is not like a sherbet split then I will try it.
I thought regex was for strings and so it would never have occurred to me to look at that. Things get weirder and weirder, perhaps I am too old fashioned and should stick to a calculator.
It has proved to be an interesting subject. I am always grateful for input and in this instance I have found that the judicial use of casting to the right variable types coupled with Mod 1 seems to work flawlessly.
Thank you both for your input.