meditationatae

Just another WordPress.com site

cat newreadtest48a.c

#include <stdio.h>
#include <quadmath.h>
int main(void)
{
int j;
long lastprime;
__float128 thesigmas[1000];
__float128 thelogs[1000];
char buf1[100];
char buf2[100];
__float128 epsilon;
__float128 ca_log;
__float128 sigma;
__float128 y;
__float128 gamma = 0.57721566490153286060651209008240243104Q;
__float128 f2;
__float128 delta;
FILE *in1;
FILE *in2;

f2 = (__float128) 2;

in1 = fopen(“/home/david2/eratosthenes10/June02/newreadtest28bb.txt”, “r”);

in2= fopen(“/home/david2/eratosthenes10/June02/newreadtest38bb.txt”, “r”);
for(j=0; j<1000; j++)
{
fscanf(in1, “%ld”, &lastprime);
fscanf(in1, “%s”, &buf1);
fscanf(in1, “%s”, &buf2);
epsilon = strtoflt128(buf1, NULL);
ca_log = strtoflt128(buf2, NULL);
thelogs[j] = ca_log;
}

fclose(in1);
for(j=0; j<1000; j++)
{
fscanf(in2, “%ld”, &lastprime);
fscanf(in2, “%s”, &buf1);
fscanf(in2, “%s”, &buf2);
epsilon = strtoflt128(buf1, NULL);
sigma = strtoflt128(buf2, NULL);
thesigmas[j] = sigma;
}

fclose(in2);

for(j=0; j<1000; j++)
{
ca_log = thelogs[j];
delta = expq(gamma)*logq(ca_log) – thesigmas[j];
y = logq(delta) – (0.323336Q – logq(ca_log)/f2 ) ;
printf(“%.20Qf %.20Qf\n”, logq(ca_log), y);
}
return 0;
}

Advertisements

Written by meditationatae

June 2, 2015 at 10:51 pm

Posted in History

%d bloggers like this: