FS-8852 change stop condition in for loop

Now we use predefined table length instead
of hardcoded computation in stop condition
of for loop.
This commit is contained in:
Piotr Gregor 2016-02-20 18:02:16 +00:00
parent 3bd26eaa6b
commit 1e8d315178
1 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ extern void compute_table(void)
acos_table_file = fopen(ACOS_TABLE_FILENAME, "w"); acos_table_file = fopen(ACOS_TABLE_FILENAME, "w");
for (i = 0; i < (1 << 25); i++) { for (i = 0; i < ACOS_TABLE_LENGTH; i++) {
f = acosf(float_from_index(i)); f = acosf(float_from_index(i));
ret = fwrite(&f, sizeof(f), 1, acos_table_file); ret = fwrite(&f, sizeof(f), 1, acos_table_file);
assert(ret != 0); assert(ret != 0);