Commit 5a03c97b authored by Over_score's avatar Over_score

Implement min and max

parent e30f8968
No preview for this file type
......@@ -76,7 +76,7 @@ SRC_WP43S = \
cxToRe.c idiv.c idivr.c \
division.c exp.c expt.c factorial.c floor.c fractionalPart.c gamma.c gcd.c \
imaginaryPart.c integerPart.c invert.c lcm.c ln.c log10.c \
log2.c magnitude.c mant.c minusOnePow.c modulo.c multiplication.c neighb.c parallel.c pcg_basic.c power.c \
log2.c magnitude.c mant.c max.c min.c minusOnePow.c modulo.c multiplication.c neighb.c parallel.c pcg_basic.c power.c \
random.c realPart.c remainder.c reToCx.c round.c roundi.c sign.c sin.c sinh.c slvq.c square.c squareRoot.c \
subtraction.c swapRealImaginary.c tan.c tanh.c toPolar.c toRect.c ulp.c unitVector.c \
wp34s.c) \
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -107,6 +107,8 @@ const funcTest_t funcTestNoParam[] = {
{"fnLogicalNot", fnLogicalNot },
{"fnM1Pow", fnM1Pow },
{"fnMagnitude", fnMagnitude },
{"fnMin", fnMin },
{"fnMax", fnMax },
{"fnMant", fnMant },
{"fnMirror", fnMirror },
{"fnMod", fnMod },
......
......@@ -54,6 +54,8 @@ initialSettings
ulp
neighb
min
max
changeSign
sign
......@@ -206,4 +208,4 @@ magnitude
unitVector
slvq
agm
\ No newline at end of file
agm
......@@ -474,12 +474,12 @@ const item_t indexOfItems[] = {
/* 350 */ { itemToBeCoded, NOPARAM, "Mat_A", "Mat A", CAT_RVAR, SLS_UNCHANGED},
/* 351 */ { itemToBeCoded, NOPARAM, "Mat_B", "Mat B", CAT_RVAR, SLS_UNCHANGED},
/* 352 */ { itemToBeCoded, NOPARAM, "Mat_X", "Mat X", CAT_FNCT, SLS_UNCHANGED},
/* 353 */ { itemToBeCoded, NOPARAM, "max", "max", CAT_FNCT, SLS_UNCHANGED},
/* 353 */ { fnMax, NOPARAM, "max", "max", CAT_FNCT, SLS_ENABLED },
/* 354 */ { fnConstant, 24, "m" STD_SUB_e, "m" STD_SUB_e, CAT_CNST, SLS_ENABLED },
/* 355 */ { fnFreeMemory, NOPARAM, "MEM?", "MEM?", CAT_FNCT, SLS_ENABLED },
/* 356 */ { itemToBeCoded, NOPARAM, "MENU", "MENU", CAT_FNCT, SLS_UNCHANGED},
/* 357 */ { itemToBeCoded, NOPARAM, "MENUS", "MENUS", CAT_MENU, SLS_UNCHANGED},
/* 358 */ { itemToBeCoded, NOPARAM, "min", "min", CAT_FNCT, SLS_UNCHANGED},
/* 358 */ { fnMin, NOPARAM, "min", "min", CAT_FNCT, SLS_ENABLED },
/* 359 */ { fnMirror, NOPARAM, "MIRROR", "MIRROR", CAT_FNCT, SLS_ENABLED },
/* 360 */ { fnCvtMiM, multiply, "mi." STD_RIGHT_ARROW "m", "mi." STD_RIGHT_ARROW "m", CAT_FNCT, SLS_ENABLED },
/* 361 */ { fnConstant, 25, "M" STD_SUB_M STD_SUB_o STD_SUB_o STD_SUB_n, "M" STD_SUB_M STD_SUB_o STD_SUB_o STD_SUB_n, CAT_CNST, SLS_ENABLED },
......
......@@ -58,6 +58,8 @@
#include "log2.h"
#include "magnitude.h"
#include "mant.h"
#include "max.h"
#include "min.h"
#include "minusOnePow.h"
#include "modulo.h"
#include "multiplication.h"
......
This diff is collapsed.
/* This file is part of 43S.
*
* 43S is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 43S is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with 43S. If not, see <http://www.gnu.org/licenses/>.
*/
/********************************************//**
* \file max.h
***********************************************/
void fnMax(uint16_t unusedButMandatoryParameter);
This diff is collapsed.
/* This file is part of 43S.
*
* 43S is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 43S is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with 43S. If not, see <http://www.gnu.org/licenses/>.
*/
/********************************************//**
* \file min.h
***********************************************/
void fnMin(uint16_t unusedButMandatoryParameter);
......@@ -169,5 +169,5 @@ void fnNeighb(uint16_t unusedParamButMandatory) {
default: {}
}
adjustResult(REGISTER_X, true, true, REGISTER_X, -1, -1);
adjustResult(REGISTER_X, true, false, REGISTER_X, -1, -1);
}
......@@ -93,5 +93,5 @@ void fnUlp(uint16_t unusedParamButMandatory) {
return;
}
adjustResult(REGISTER_X, false, true, REGISTER_X, -1, -1);
adjustResult(REGISTER_X, false, false, REGISTER_X, -1, -1);
}
......@@ -409,6 +409,12 @@
<Unit filename="src/testSuite/mant.txt">
<Option target="testSuite" />
</Unit>
<Unit filename="src/testSuite/max.txt">
<Option target="testSuite" />
</Unit>
<Unit filename="src/testSuite/min.txt">
<Option target="testSuite" />
</Unit>
<Unit filename="src/testSuite/minusOnePow.txt">
<Option target="testSuite" />
</Unit>
......@@ -1454,6 +1460,32 @@
<Option target="testSuite" />
<Option target="generateCatalogs" />
</Unit>
<Unit filename="src/wp43s/mathematics/max.c">
<Option compilerVar="CC" />
<Option target="wp43s" />
<Option target="wp43s_debug" />
<Option target="generateCatalogs" />
<Option target="testSuite" />
</Unit>
<Unit filename="src/wp43s/mathematics/max.h">
<Option target="wp43s" />
<Option target="wp43s_debug" />
<Option target="generateCatalogs" />
<Option target="testSuite" />
</Unit>
<Unit filename="src/wp43s/mathematics/min.c">
<Option compilerVar="CC" />
<Option target="wp43s" />
<Option target="wp43s_debug" />
<Option target="generateCatalogs" />
<Option target="testSuite" />
</Unit>
<Unit filename="src/wp43s/mathematics/min.h">
<Option target="wp43s" />
<Option target="wp43s_debug" />
<Option target="generateCatalogs" />
<Option target="testSuite" />
</Unit>
<Unit filename="src/wp43s/mathematics/minusOnePow.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