in reply to Re^2: Behaviour of int() unexpected
in thread Behaviour of int() unexpected
But this would be the most logical way to encode a float number if you ask me.
What you describe is essentially what Math::BigFloat does.
If you use Math::BigFloat, then you won't be disappointed by the results you get. (Performance is comparatively sluggish - though perhaps not to an extent that it becomes an issue.)
Cheers,
Rob