the issue is log10(2)=x ( the values of x is 0.30102999566398114)
then 10^0.30102999566398114 should be equal to 2.0 but it is giving it as 1.9999999999999998
but for 10^0.3010299956639812 it is giving output as 2.0

Note: It is a bit different issue (although related) the one that you are asking about from peculiarities of working with float, like a + (b + c) != (a + b) + c and things like that. While the latter is inescapable. It is a feature of float. The implementations of log10 and pow do have room for improvement in terms of precision (at some cost).

Note the difference between math.log(x, 10) and math.log10(x). As a rule, you should prefer base-specific logarithm functions when available for precisely this reason: they can be better at maintaining precision than the arbitrary base log function. They can also be faster and/or provide stronger guarantees (e.g. exact representation for some values, monotonicity) than their arbitrary-base counterpart, but that all depends on the C standard library implementation that Python links to.

Hardly so. I think that from very ancient times log10 is just a thin wrapper to libmâ€™s log10.

But please note, that OP used log(2,10), not log10(2). So, you should be able to reproduce this (depends on your C stdlib implementation, not on CPython):