Commit ca14429a authored by Over_score's avatar Over_score

Adding files for CxToRe and ReToCx testing

parent 11b8d87e
;*************************************************************
;*************************************************************
;** **
;** CxToRe **
;** **
;*************************************************************
;*************************************************************
In: FD=0 FI=0 SD=0 RM=0 IM=2compl SS=4 WS=64 CM=RECT
Func: fnCxToRe
; Think of the 2 modes: rectangular and polar! And all error situations
;=======================================
; CxToRe(Complex16) --> Real16, Real16
;=======================================
;=======================================
; CxToRe(Complex34) --> Real34, Real34
;=======================================
;=======================================
; CxToRe(Complex16 Matrix) --> Real16 Matrix, Real16 Matrix
;=======================================
; Initial default settings
In: FD=0 ; Danger flag clear
In: FI=0 ; Complex result flag clear
In: SD=0 ; maximum significant digits
In: RM=0 ; Half even rounding mode
In: IM=2COMPL ; 2 complement's
In: SS=4 ; 4 stack registers
In: WS=64 ; Word size 64 bits
In: CM=RECT ; Complex mode rectangular
;*************************************************************
;*************************************************************
;** **
;** ReToCx **
;** **
;*************************************************************
;*************************************************************
In: FD=0 FI=0 SD=0 RM=0 IM=2compl SS=4 WS=64 CM=POLAR
Func: fnReToCx
; Think of the 2 modes: rectangular and polar! And all error situations
;=======================================
; ReToCx(Long Integer, Long Integer) --> Complex16
;=======================================
;=======================================
; ReToCx(Long Integer, Real16) --> Complex16
;=======================================
;=======================================
; ReToCx(Long Integer, Short Integer) --> Complex16 or Error, I can't remember
;=======================================
;=======================================
; ReToCx(Long Integer, Real34) --> Complex34
;=======================================
;=======================================
; ReToCx(Real16, Long Integer) --> Complex16
;=======================================
;=======================================
; ReToCx(Real16, Real16) --> Complex16
;=======================================
;=======================================
; ReToCx(Real16, Short Integer) --> Complex16 or Error, I can't remember
;=======================================
;=======================================
; ReToCx(Real16, Real34) --> Complex34 or Error, I can't remember
;=======================================
;=======================================
; ReToCx(Short Integer, Long Integer) --> Complex16
;=======================================
;=======================================
; ReToCx(Short Integer, Real16) --> Complex16 or Error, I can't remember
;=======================================
;=======================================
; ReToCx(Short Integer, Short Integer) --> Complex16 or Error, I can't remember
;=======================================
;=======================================
; ReToCx(Short Integer, Real34) --> Complex34 or Error, I can't remember
;=======================================
;=======================================
; ReToCx(Real34, Long Integer) --> Complex34
;=======================================
;=======================================
; ReToCx(Real34, Real16) --> Complex34
;=======================================
;=======================================
; ReToCx(Real34, Short Integer) --> Complex34 or Error, I can't remember
;=======================================
;=======================================
; ReToCx(Real34, Real34) --> Complex34 or Error, I can't remember
;=======================================
......@@ -62,6 +62,7 @@ const funcTest_t funcTestNoParam[] = {
{"fnCosh", fnCosh },
{"fnCube", fnCube },
{"fnCubeRoot", fnCubeRoot },
{"fnCxToRe", fnCxToRe },
{"fnCvtCToF", fnCvtCToF },
{"fnCvtDegToDms", fnCvtDegToDms },
{"fnCvtDegToRad", fnCvtDegToRad },
......@@ -109,6 +110,7 @@ const funcTest_t funcTestNoParam[] = {
{"fnPi", fnPi },
{"fnPower", fnPower },
{"fnRealPart", fnRealPart },
{"fnReToCx", fnReToCx },
{"fnRmd", fnRmd },
{"fnRollDown", fnRollDown },
{"fnRollUp", fnRollUp },
......@@ -507,6 +509,22 @@ void setParameter(char *p) {
}
}
//Setting Complex mode
else if(strcmp(l, "CM") == 0) {
if(strcmp(r, "RECT") == 0) {
complexMode = CM_RECTANGULAR;
//printf(" Set complex mode to RECT\n");
}
else if(strcmp(r, "POLAR") == 0) {
complexMode = CM_POLAR;
//printf(" Set complex mode to POLAR\n");
}
else {
printf("\nMissformed complex mode setting. The rvalue must be RECT or POLAR.\n");
abortTest();
}
}
//Setting angular mode
else if(strcmp(l, "AM") == 0) {
if(strcmp(r, "DEG") == 0) {
......@@ -1272,6 +1290,26 @@ void checkExpectedOutParameter(char *p) {
}
}
//Checking complex mode
else if(strcmp(l, "CM") == 0) {
if(strcmp(r, "RECT") == 0) {
if(complexMode != CM_RECTANGULAR) {
printf("\ncomplex mode should be RECT but it is not!\n");
abortTest();
}
}
else if(strcmp(r, "POLAR") == 0) {
if(complexMode != CM_POLAR) {
printf("\ncomplex mode should be POLAR but it is not!\n");
abortTest();
}
}
else {
printf("\nMissformed complex mode checking. The rvalue must be RECT or POLAR.\n");
abortTest();
}
}
//Checking angular mode
else if(strcmp(l, "AM") == 0) {
if(strcmp(r, "DEG") == 0) {
......
......@@ -14,6 +14,7 @@
; RM Rounding mode: 0 to 6
; SD Significant digits: 0 to 34
; EC Error Code: 0=no error or form 1 to 28
; CM Complex Mode: RECT or POLAR
; Rn Register n from 0 to 211
; Rx Register x in A,B,C,D,I,J,K,L,T,X,Y,Z
; GAP gap setting
......@@ -45,11 +46,7 @@
;
; This file is only a list of files containing the tests to perform
;keisan:
;y=12545543120284569505847489630102030405;
;x=123.456;
;IP(y/x);
;remainder(y,x)
initialSettings.txt
;debug.txt
......@@ -174,6 +171,8 @@ tanh.txt
trig.txt
conjugate.txt
reToCx.txt
cxToRe.txt
square.txt
squareRoot.txt
......
......@@ -305,6 +305,9 @@
<Unit filename="src/testSuite/cubeRoot.txt">
<Option target="testSuite" />
</Unit>
<Unit filename="src/testSuite/cxToRe.txt">
<Option target="testSuite" />
</Unit>
<Unit filename="src/testSuite/debug.txt">
<Option target="testSuite" />
</Unit>
......@@ -368,6 +371,9 @@
<Unit filename="src/testSuite/imaginaryPart.txt">
<Option target="testSuite" />
</Unit>
<Unit filename="src/testSuite/initialSettings.txt">
<Option target="testSuite" />
</Unit>
<Unit filename="src/testSuite/integerPart.txt">
<Option target="testSuite" />
</Unit>
......@@ -500,6 +506,9 @@
<Unit filename="src/testSuite/power_time.txt">
<Option target="testSuite" />
</Unit>
<Unit filename="src/testSuite/reToCx.txt">
<Option target="testSuite" />
</Unit>
<Unit filename="src/testSuite/realPart.txt">
<Option target="testSuite" />
</Unit>
......@@ -1144,6 +1153,19 @@
<Option target="testSuite" />
<Option target="generateMenuFCNS" />
</Unit>
<Unit filename="src/wp43s/mathematics/cxToRe.c">
<Option compilerVar="CC" />
<Option target="wp43s" />
<Option target="wp43s_debug" />
<Option target="generateMenuFCNS" />
<Option target="testSuite" />
</Unit>
<Unit filename="src/wp43s/mathematics/cxToRe.h">
<Option target="wp43s" />
<Option target="wp43s_debug" />
<Option target="generateMenuFCNS" />
<Option target="testSuite" />
</Unit>
<Unit filename="src/wp43s/mathematics/division.c">
<Option compilerVar="CC" />
<Option target="wp43s" />
......@@ -1436,6 +1458,19 @@
<Option target="testSuite" />
<Option target="generateMenuFCNS" />
</Unit>
<Unit filename="src/wp43s/mathematics/reToCx.c">
<Option compilerVar="CC" />
<Option target="wp43s" />
<Option target="wp43s_debug" />
<Option target="generateMenuFCNS" />
<Option target="testSuite" />
</Unit>
<Unit filename="src/wp43s/mathematics/reToCx.h">
<Option target="wp43s" />
<Option target="wp43s_debug" />
<Option target="generateMenuFCNS" />
<Option target="testSuite" />
</Unit>
<Unit filename="src/wp43s/mathematics/realPart.c">
<Option compilerVar="CC" />
<Option target="wp43s" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment