Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- for (( i = -32; i <=300 ; i+=1 ));
- do
- echo "$i" | ./a.out > prog_c.txt
- echo "scale=40;c(2^$i)" | bc -l > prog_bc.txt
- echo "scale=40;a="`cat valC.txt`"-("`cat valBC.txt`");if(0>a)a*=-1;a" | bc -l >> essaye.csv
- echo "$i"
- done
- #include <stdio.h>
- #include <math.h>
- #include <stdlib.h>
- int main(void) {
- long double a;
- scanf("%Lf", &a);
- printf("%.40Lf\n", cosl(powl(2,a)));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement