Skip to content
Snippets Groups Projects
Commit 3d653a88 authored by 이화진's avatar 이화진
Browse files

test.c

parent 5b968e7b
No related branches found
No related tags found
No related merge requests found
#include "fx_s1516_double.h" #include "fx_s1516_double.h"
#define fx_mul(a, b) ((a)*(b)) #define fx_mul(a, b) ((a)*(b))
...@@ -15,7 +15,7 @@ int main() ...@@ -15,7 +15,7 @@ int main()
double fa = fx_to_double(a); double fa = fx_to_double(a);
double fb = fx_to_double(b); double fb = fx_to_double(b);
printf("a : %d b : %d fa : %lf fb : %lf\noriginal a : %lf original b : %lf\n\n", a, b, fa, fb, double_to_fx(fa), double_to_fx(fb)); printf("a : %d b : %d\nfa : %lf fb : %lf\noriginal a : %lf original b : %lf\n\n", a, b, fa, fb, double_to_fx(fa), double_to_fx(fb));
printf("Add : %-15d %lf\n", a + b, fx_s1516_add(fa, fb)); printf("Add : %-15d %lf\n", a + b, fx_s1516_add(fa, fb));
printf("Sub : %-15d %lf\n", a - b, fx_s1516_sub(fa, fb)); printf("Sub : %-15d %lf\n", a - b, fx_s1516_sub(fa, fb));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment