Skip to content
Snippets Groups Projects
Commit 731e936a authored by HwangJungmok's avatar HwangJungmok
Browse files

Edit Makefile

parent 2a93598b
No related branches found
No related tags found
1 merge request!10Edit Makefile
SRCS := fx_3132.c SRCS := test.c fx_3132.c
OBJS := $(SRCS:.c=.o) OBJS := $(SRCS:.c=.o)
CC := gcc CC := gcc
CFLAGS := -c -Wall CFLAGS := -c -Wall
fx_3132 : $(OBJS) fx_3132 : $(OBJS)
$(CC) -o $@ $^ $(CC) -o $@ $^ -lm
clean : clean :
-rm $(OBJS) -rm $(OBJS)
......
a.exe 0 → 100644
File added
...@@ -2,19 +2,19 @@ ...@@ -2,19 +2,19 @@
#include <math.h> #include <math.h>
#include "fx_s3132.h" #include "fx_s3132.h"
fx_3132 sine(fx_3132 a) { fx_3132 sin2(fx_3132 a) {
return double_to_fx(sin(fx_to_double(a))); return double_to_fx(sin(fx_to_double(a)));
}; };
fx_3132 sqrt1(fx_3132 a) { fx_3132 sqrt2(fx_3132 a) {
return double_to_fx(sqrt(fx_to_double(a))); return double_to_fx(sqrt(fx_to_double(a)));
}; };
fx_3132 power(fx_3132 a, fx_3132 b) { fx_3132 power2(fx_3132 a, fx_3132 b) {
return double_to_fx(pow(fx_to_double(a), fx_to_double(b))); return double_to_fx(pow(fx_to_double(a), fx_to_double(b)));
}; };
fx_3132 pi() { fx_3132 pi2() {
return double_to_fx(fx_to_double(fx_PI)); return double_to_fx(fx_to_double(PI));
}; };
fx_3132 piReverse() { fx_3132 piReverse2() {
return double_to_fx((fx_to_double(1 / fx_PI))); return double_to_fx((fx_to_double(1 / PI)));
}; };
...@@ -18,3 +18,11 @@ ...@@ -18,3 +18,11 @@
#define fx_PI_Reverse() (double_to_fx((1/PI))) #define fx_PI_Reverse() (double_to_fx((1/PI)))
typedef long long fx_3132; typedef long long fx_3132;
fx_3132 sin2(fx_3132 a);
fx_3132 sqrt2(fx_3132 a);
fx_3132 power2(fx_3132 a, fx_3132 b);
fx_3132 piReverse2();
fx_3132 pi2();
#include <stdio.h> #include <stdio.h>
#include <math.h>
#include "fx_s3132.h" #include "fx_s3132.h"
int main() { int main() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment