#include <stdio.h>
#include <math.h>
int main()
{
double u, x, y, z;
int i;
u = 1;
for (i=0; i<52; i++) u /= 2;
x = 1+u;
y = 1-u;
z = -1;
printf("%.15g\n", fma(x, y, z));
}
#include <kv/interval.hpp>
#include <kv/mpfr.hpp>
#include <kv/rmpfr.hpp>
int main()
{
int i;
kv::interval< kv::mpfr<17000> > x, y, z;
std::cout.precision(17);
x = 1.;
y = 1.;
for (i=2; i<=10000; i++) {
z = (1 + 2 * y) / (x * y * y);
std::cout << i << " " << z << "\n";
x = y;
y = z;
}
}
#include <iostream>
#include "lilib.h"
int main(){
lilib::setPrecision(5000);
LongInterval x, y, z;
int i;
x = 1.;
y = 1.;
for (i=2; i<=10000; i++) {
z = (1 + 2 * y) / (x * y * y);
std::cout << i << " " << z << "\n";
x = y;
y = z;
}
}