What is the difference between different ways to extract the root in Python?
📁 python, пример
Root in python can be extracted in three ways x ** 0.5 , . And for the whole with the result, also math.isqrt (x) Сode>. What is the difference between them?
p.s. For example, when checking simplicity n you need to make a cycle to a square root of n . So right?
for i in range ( 2 , int (n ** 0.5 ) + 1 ): ) ... pre> We are primarily about the correctness (accuracy of calculations). Performance in second place.
Ответов пока нет.
Войдите чтобы оставить ответ
Блоги