mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-13 01:05:36 +00:00
sqrt
This commit is contained in:
parent
5bdf89e3f0
commit
690397e7c6
@ -35,7 +35,7 @@ void MultiShiftFunction::csv(std::ostream &out)
|
|||||||
{
|
{
|
||||||
for (double x=lo; x<hi; x*=1.05) {
|
for (double x=lo; x<hi; x*=1.05) {
|
||||||
double f = approx(x);
|
double f = approx(x);
|
||||||
double r = sqrt(x);
|
double r = std::sqrt(x);
|
||||||
out<< x<<","<<r<<","<<f<<","<<r-f<<std::endl;
|
out<< x<<","<<r<<","<<f<<","<<r-f<<std::endl;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -80,8 +80,8 @@ int main (int argc, char ** argv)
|
|||||||
InvSqrt.gnuplot(gnuplot);
|
InvSqrt.gnuplot(gnuplot);
|
||||||
|
|
||||||
double x=0.6789;
|
double x=0.6789;
|
||||||
double sx=sqrt(x);
|
double sx=std::sqrt(x);
|
||||||
double ssx=sqrt(sx);
|
double ssx=std::sqrt(sx);
|
||||||
double isx=1.0/sx;
|
double isx=1.0/sx;
|
||||||
double issx=1.0/ssx;
|
double issx=1.0/ssx;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user