Last active
May 19, 2017 02:46
-
-
Save 0V/e2dcd132d930b982927bd767f20a5540 to your computer and use it in GitHub Desktop.
1 * 2 = √√ * 2 = √√ * 2 = ... ; g++ root3.cpp -lm -std=c++11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cmath> | |
#include <iostream> | |
#include <iomanip> | |
#include <limits> | |
double excute(){ | |
double tmp = 1; | |
double current = 1; | |
while(1){ | |
current *= 2; | |
current = std::sqrt(std::sqrt(current)); | |
if(tmp == current) return current; | |
tmp = current; | |
} | |
} | |
int main(){ | |
std::cout << std::setprecision(std::numeric_limits<double>::max_digits10) | |
<< excute() << std::endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment