Given a double, what is the most efficient way to calculate the precision and accuracy of the number? Ideally, I'd like to avoid for loops.
Floating point numbers are stored in binary in python. Accuracy and precision have totally different implications in binary, especially given that computers are constrained to fixed-length representations. You can demonstrate that to yourself simply by noting that the code 1e16+1 == 1e16 returns True.
You linked to Wolfram.com where precision and accuracy are discussed in terms of decimal numbers. It means nothing to talk about the position of the decimal point in a number stored in a computer in binary. To represent and manipulate decimal numbers with their real decimal precision and accuracy, you need to use python's Decimal class.
Note that you must give the Decimal class a string for it to be accurate in decimal terms. If you give it a literal number (e.g. Decimal(1.001)) you are just giving it a float, and the Decimal you create will be the precise decimal representation of python's imprecise floating point representation of 1.001.
Sadly, the Decimal class doesn't have methods to return the number of digits either side of the decimal point. However, assuming your decimal is in decimal form, you can just examine it as a string, using str(x) where x is an instance of Decimal.
Precision and Accuracy