Remove a few functions the GS does not have

This commit is contained in:
Jeremy Rand 2013-07-27 00:11:42 -05:00
parent c470afc9d6
commit ee6ab8dee8
12 changed files with 8 additions and 344 deletions

View File

@ -15,9 +15,8 @@ OPS_OBJS=ops/abCOp.o ops/abCOpAdd.o ops/abCOpSubtr.o ops/abCOpMult.o \
ops/abCOpRr.o ops/abCOpAsr.o ops/abCOpInv.o ops/abCOpChs.o ops/abCOpDrop.o \
ops/abCOpSwap.o ops/abCOpSin.o ops/abCOpCos.o ops/abCOpTan.o ops/abCOpAsin.o \
ops/abCOpAcos.o ops/abCOpAtan.o ops/abCOpSq.o ops/abCOpSqrt.o ops/abCOpPi.o \
ops/abCOpLog.o ops/abCOpAlog.o ops/abCOpLn.o ops/abCOpExp.o ops/abCOpLnp1.o \
ops/abCOpExpm.o ops/abCOpSinh.o ops/abCOpAsinh.o ops/abCOpCosh.o \
ops/abCOpAcosh.o ops/abCOpTanh.o ops/abCOpAtanh.o ops/abCOpClear.o
ops/abCOpLog.o ops/abCOpAlog.o ops/abCOpLn.o ops/abCOpExp.o ops/abCOpSinh.o \
ops/abCOpCosh.o ops/abCOpTanh.o ops/abCOpClear.o
SHELL_OBJS=abCMain.o $(CALC_OBJS) $(EXPR_OBJS) $(OPS_OBJS)
@ -42,7 +41,12 @@ ops/abCOp.o: ops/abCOp.h abCError.h expr/abCExpr.h abCStack.h ops/abCOpAdd.h \
ops/abCOpSubtr.h ops/abCOpMult.h ops/abCOpDiv.h ops/abCOpPower.h \
ops/abCOpAnd.h ops/abCOpOr.h ops/abCOpXor.h ops/abCOpNot.h ops/abCOpBin.h \
ops/abCOpOct.h ops/abCOpDec.h ops/abCOpHex.h ops/abCOpStws.h ops/abCOpRcws.h \
ops/abCOpSl.h ops/abCOpRl.h ops/abCOpSr.h ops/abCOpRr.h ops/abCOpAsr.h
ops/abCOpSl.h ops/abCOpRl.h ops/abCOpSr.h ops/abCOpRr.h ops/abCOpAsr.h \
ops/abCOpAsr.h ops/abCOpInv.h ops/abCOpChs.h ops/abCOpDrop.h ops/abCOpSwap.h \
ops/abCOpSin.h ops/abCOpCos.h ops/abCOpTan.h ops/abCOpAsin.h ops/abCOpAcos.h \
ops/abCOpAtan.h ops/abCOpSq.h ops/abCOpSqrt.h ops/abCOpPi.h ops/abCOpLog.h \
ops/abCOpAlog.h ops/abCOpLn.h ops/abCOpExp.h ops/abCOpSinh.h ops/abCOpCosh.h \
ops/abCOpTanh.h ops/abCOpClear.h
ops/abCOpAdd.o: ops/abCOp.h abCError.h expr/abCExpr.h expr/abCExpReal.h expr/abCExprInt.h abCStack.h ops/abCOpAdd.h
ops/abCOpSubtr.o: ops/abCOp.h abCError.h expr/abCExpr.h expr/abCExpReal.h expr/abCExprInt.h abCStack.h ops/abCOpSubtr.h
ops/abCOpMult.o: ops/abCOp.h abCError.h expr/abCExpr.h expr/abCExpReal.h expr/abCExprInt.h abCStack.h ops/abCOpMult.h
@ -80,13 +84,8 @@ ops/abCOpLog.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal
ops/abCOpAlog.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpAlog.h
ops/abCOpLn.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpLn.h
ops/abCOpExp.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpExp.h
ops/abCOpLnp1.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpLnp1.h
ops/abCOpExpm.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpExpm.h
ops/abCOpSinh.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpSinh.h
ops/abCOpAsinh.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpAsinh.h
ops/abCOpCosh.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpCosh.h
ops/abCOpAcosh.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpAcosh.h
ops/abCOpTanh.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpTanh.h
ops/abCOpAtanh.o: ops/abCOp.h abCError.h abCStack.h expr/abCExpr.h expr/abCExpReal.h ops/abCOpAtanh.h
ops/abCOpClear.o: ops/abCOp.h abCStack.h ops/abCOpClear.h

View File

@ -41,14 +41,9 @@
#include "ops/abCOpAlog.h"
#include "ops/abCOpLn.h"
#include "ops/abCOpExp.h"
#include "ops/abCOpLnp1.h"
#include "ops/abCOpExpm.h"
#include "ops/abCOpSinh.h"
#include "ops/abCOpAsinh.h"
#include "ops/abCOpCosh.h"
#include "ops/abCOpAcosh.h"
#include "ops/abCOpTanh.h"
#include "ops/abCOpAtanh.h"
#include "ops/abCOpAnd.h"
#include "ops/abCOpOr.h"
@ -105,14 +100,9 @@ void abCalcOpInit(void)
abCalcOpAlogInit();
abCalcOpLnInit();
abCalcOpExpInit();
abCalcOpLnp1Init();
abCalcOpExpmInit();
abCalcOpSinhInit();
abCalcOpAsinhInit();
abCalcOpCoshInit();
abCalcOpAcoshInit();
abCalcOpTanhInit();
abCalcOpAtanhInit();
abCalcOpAndInit();
abCalcOpOrInit();

View File

@ -1,51 +0,0 @@
/*
abCOpAcosh.c
By: Jeremy Rand
*/
#include <math.h>
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "ops/abCOp.h"
#include "ops/abCOpAcosh.h"
#define ACOSH_NAME "ACOSH"
static void acoshExecute(void);
void abCalcOpAcoshInit(void)
{
abCalcOpRegister(ACOSH_NAME, acoshExecute);
}
void acoshExecute(void)
{
abCalcExpr result;
AB_CALC_OP_ONE_ARG(ACOSH_NAME);
if (expr->type != abCalcExprTypeReal) {
abCalcRaiseError(abCalcBadArgTypeError, ACOSH_NAME);
return;
}
if (expr->u.real < 1.0) {
abCalcRaiseError(abCalcComplexResultError, ACOSH_NAME);
return;
}
abCalcExprRealSet(&result, acosh(expr->u.real));
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpAcosh.h
By: Jeremy Rand
*/
#ifndef ABCOPACOSH_H
#define ABCOPACOSH_H
void abCalcOpAcoshInit(void);
#endif

View File

@ -1,46 +0,0 @@
/*
abCOpAsinh.c
By: Jeremy Rand
*/
#include <math.h>
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "ops/abCOp.h"
#include "ops/abCOpAsinh.h"
#define ASINH_NAME "ASINH"
static void asinhExecute(void);
void abCalcOpAsinhInit(void)
{
abCalcOpRegister(ASINH_NAME, asinhExecute);
}
void asinhExecute(void)
{
abCalcExpr result;
AB_CALC_OP_ONE_ARG(ASINH_NAME);
if (expr->type != abCalcExprTypeReal) {
abCalcRaiseError(abCalcBadArgTypeError, ASINH_NAME);
return;
}
abCalcExprRealSet(&result, asinh(expr->u.real));
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpAsinh.h
By: Jeremy Rand
*/
#ifndef ABCOPASINH_H
#define ABCOPASINH_H
void abCalcOpAsinhInit(void);
#endif

View File

@ -1,57 +0,0 @@
/*
abCOpAtanh.c
By: Jeremy Rand
*/
#include <math.h>
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "ops/abCOp.h"
#include "ops/abCOpAtanh.h"
#define ATANH_NAME "ATANH"
static void atanhExecute(void);
void abCalcOpAtanhInit(void)
{
abCalcOpRegister(ATANH_NAME, atanhExecute);
}
void atanhExecute(void)
{
abCalcExpr result;
AB_CALC_OP_ONE_ARG(ATANH_NAME);
if (expr->type != abCalcExprTypeReal) {
abCalcRaiseError(abCalcBadArgTypeError, ATANH_NAME);
return;
}
if ((expr->u.real == 1.0) ||
(expr->u.real == -1.0)) {
abCalcRaiseError(abCalcInfiniteResultError, ATANH_NAME);
return;
}
if ((expr->u.real > 1.0) ||
(expr->u.real < -1.0)) {
abCalcRaiseError(abCalcComplexResultError, ATANH_NAME);
return;
}
abCalcExprRealSet(&result, atanh(expr->u.real));
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpAtanh.h
By: Jeremy Rand
*/
#ifndef ABCOPATANH_H
#define ABCOPATANH_H
void abCalcOpAtanhInit(void);
#endif

View File

@ -1,46 +0,0 @@
/*
abCOpExpm.c
By: Jeremy Rand
*/
#include <math.h>
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "ops/abCOp.h"
#include "ops/abCOpExpm.h"
#define EXPM_NAME "EXPM"
static void expmExecute(void);
void abCalcOpExpmInit(void)
{
abCalcOpRegister(EXPM_NAME, expmExecute);
}
void expmExecute(void)
{
abCalcExpr result;
AB_CALC_OP_ONE_ARG(EXPM_NAME);
if (expr->type != abCalcExprTypeReal) {
abCalcRaiseError(abCalcBadArgTypeError, EXPM_NAME);
return;
}
abCalcExprRealSet(&result, expm1(expr->u.real));
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpExpm.h
By: Jeremy Rand
*/
#ifndef ABCOPEXPM_H
#define ABCOPEXPM_H
void abCalcOpExpmInit(void);
#endif

View File

@ -1,55 +0,0 @@
/*
abCOpLnp1.c
By: Jeremy Rand
*/
#include <math.h>
#include <stdio.h>
#include "abCError.h"
#include "abCStack.h"
#include "expr/abCExpr.h"
#include "expr/abCExpReal.h"
#include "ops/abCOp.h"
#include "ops/abCOpLnp1.h"
#define LNP1_NAME "LNP1"
static void lnp1Execute(void);
void abCalcOpLnp1Init(void)
{
abCalcOpRegister(LNP1_NAME, lnp1Execute);
}
void lnp1Execute(void)
{
abCalcExpr result;
AB_CALC_OP_ONE_ARG(LNP1_NAME);
if (expr->type != abCalcExprTypeReal) {
abCalcRaiseError(abCalcBadArgTypeError, LNP1_NAME);
return;
}
if (expr->u.real == -1.0) {
abCalcRaiseError(abCalcInfiniteResultError, LNP1_NAME);
return;
}
if (expr->u.real < -1.0) {
abCalcRaiseError(abCalcComplexResultError, LNP1_NAME);
return;
}
abCalcExprRealSet(&result, log1p(expr->u.real));
abCalcStackExprPop(NULL);
abCalcStackExprPush(&result);
}

View File

@ -1,14 +0,0 @@
/*
abCOpLnp1.h
By: Jeremy Rand
*/
#ifndef ABCOPLNP1_H
#define ABCOPLNP1_H
void abCalcOpLnp1Init(void);
#endif