64 bit long long is ~19 digits so for mantissa it should be sufficient. And yes if overflow occurs digits get lost.

one can use taylor series (tuned to work in integer domain) or for sqrt you can use the inverse.

y == sqrt(x) ==> y * y == x;

OK this will probably give an 32 bit integer ~9.5 digits

To get full 64 bit precision there are other relations known about squares can be used to increase precision

x == (a + b) * (a + b) == a*a + 2ab + b*b [1]

so if x is 64 bit we can find (binary search) a 32 bit a so that a*a <= x [2] and (a+1)*(a+1) > x [3]

we can rewrite [1] to

x -a*a == 2ab + b*b [4]

note that a is known in the above equation.

What can we say about b?

not much directly, but we know something about x - a*a

According to [2] a*a < = x*

According to [3] x < aa + 2a + 1

so 0 <= x - a*a < 2a + 1 [5]

so 0 <= 2ab + b*b < 2a + 1 [6]

as a is 32 bit ==> 2a + 1 is at most 33 bit ==> b is at most 16 bit (a smaller error remains).

this can be found with binary search again, leaving a remaining error that is 8 bit, 4 bit, 2 bit 1 bit.

adding up all those giving a 63 bit result ~19 digits.

Not trivial but doable.