David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> I don't really agree that it will work fine in all cases though. If
> the numeric has more than 1000 digits left of the decimal point then
> the method won't work at all.
But what we're talking about is starting from a float4 or float8
input, so it can't be more than ~308 digits.
regards, tom lane