Skip to content

Instantly share code, notes, and snippets.

@VOID001 VOID001/3.26.cpp
Created Dec 1, 2014

Embed
What would you like to do?
/*************************************************************************
> File Name: 3.26.cpp
> Author: VOID_133
> ###################
> Mail: ###################
> Created Time: 2014年12月01日 星期一 17时39分20秒
************************************************************************/
typedef struct data{
double A;
double p;
}Data;
typedef Data ElemType;
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<vector>
#include<cstring>
#include<map>
#include<queue>
#include<stack>
#include<string>
#include<cstdlib>
#include<ctime>
#include<set>
using namespace std;
double A,p;
const double e=2.718281828459;
int main(void)
{
}
double mysqrt_recursive(double A,double p,double e)
{
if(p*p-A>-e && p*p-A<e) return p;
else return mysqrt_recursive(A,0.5*(p+A/p),e);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.