Diferente pentru blog/your-bisection-search-is-wrong intre reviziile #17 si #18

Nu exista diferente intre titluri.

Diferente intre continut:

*Tomek Czajka(of topcoder fame) pointed out that my final version was buggy as well. I chose the number of iterations to be 120 but that’s way too small. It doesn't work for c = 1e60.*
A double is represented by the mantissa which consists of 52 bits and the exponent which contains 11 bits. One loop iteration either decreases the exponent of our interval by 1 or we find out a new bit of the mantissa. The maximum value of the exponent is 2^11 and the mantissa has 52 bits. Thus we need 2100 steps to figure out the answer.
A double is represented by the mantissa which consists of 52 bits and the exponent which contains 11 bits. One loop iteration either decreases the exponent of our interval by 1 or we find out a new bit of the mantissa. The maximum value of the exponent is 2^11^ and the mantissa has 52 bits. Thus we need 2100 steps to figure out the answer.
==code(python) |
def _cubicRoot(c):

Nu exista diferente intre securitate.

Topicul de forum nu a fost schimbat.