Comment #1 on issue 29 by Petteri.Aimonen: 32-bit multiplication seems to
I cannot seem to be able to reproduce this problem:
petteri@oddish:~/libfixmath$ cat test.c
#include <stdio.h>
#include <fix16.h>
int main()
{
fix16_t a = fix16_from_dbl(9.9);
fix16_t b = fix16_from_dbl(9.9);
fix16_t result = fix16_mul(a, b);
printf("%f\n", fix16_to_dbl(result));
return 0;
}
petteri@oddish:~/libfixmath$ gcc -I libfixmath test.c libfixmath/fix16.c
petteri@oddish:~/libfixmath$ ./a.out
98.009872
petteri@oddish:~/libfixmath$ gcc -I libfixmath -DFIXMATH_NO_64BIT=1 test.c
libfixmath/fix16.c
petteri@oddish:~/libfixmath$ ./a.out
98.009872
petteri@oddish:~/libfixmath$ gcc -I libfixmath -DFIXMATH_NO_64BIT=1
-DFIXMATH_OPTIMIZE_8BIT test.c libfixmath/fix16.c
petteri@oddish:~/libfixmath$ ./a.out
98.009872