From ea9c68a8a0b26e5d6d86d691974633074358c83c Mon Sep 17 00:00:00 2001
From: esangbaek <esangbaek@ajou.ac.kr>
Date: Wed, 19 Aug 2020 20:56:23 +0900
Subject: [PATCH] modified sine angle

---
 fx_s4716_longlong.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/fx_s4716_longlong.c b/fx_s4716_longlong.c
index 48136a8..c141c41 100644
--- a/fx_s4716_longlong.c
+++ b/fx_s4716_longlong.c
@@ -38,6 +38,12 @@ fx_s4716 fx_s4716_longlong_div3(fx_s4716 a, fx_s4716 b){
 	return fx_to_longlong(result);
 }
 fx_s4716 fx_s4716_longlong_sin(fx_s4716 a){
-	long long result=sinTable[a];
+	long long quotient, remain, result;
+	remain=a%180;
+	if(remain>90)
+		remain=180-remain;
+	quotient=a/180;
+
+	result=(sinTable[remain])*(pow(-1,quotient));
 	return fx_to_longlong(result);
 }
-- 
GitLab