mirror of
https://github.com/xdsopl/robot36.git
synced 2026-04-06 14:53:37 +00:00
use %a instead of %g for higher precision in code generators
nice, renderscript understands hexadecimal floating point notation
This commit is contained in:
parent
58a4f0e214
commit
6e5b79696f
4 changed files with 2306 additions and 2306 deletions
|
|
@ -27,7 +27,7 @@ int main()
|
|||
printf("static const complex_t radix2_z[%d] = {\n", N / 2);
|
||||
for (int n = 0; n < N / 2; n++) {
|
||||
complex double z = cexp(dir * I * n * 2.0 * M_PI / N);
|
||||
printf("\t{ %g, %g }%s\n", creal(z), cimag(z), n < (N/2-1) ? "," : "");
|
||||
printf("\t{ %a, %a }%s\n", creal(z), cimag(z), n < (N/2-1) ? "," : "");
|
||||
}
|
||||
printf("};\n");
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ int main()
|
|||
for (int n = 0; n < N; n++)
|
||||
sum += gauss(n, N|1, o);
|
||||
for (int n = 0; n < N; n++) {
|
||||
printf("\t%g%s\n", gauss(n, N|1, o) / sum, n < (N-1) ? "," : "");
|
||||
printf("\t%a%s\n", gauss(n, N|1, o) / sum, n < (N-1) ? "," : "");
|
||||
}
|
||||
printf("};\n");
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue