Skip to content

Commit

Permalink
Add log10 subcommand
Browse files Browse the repository at this point in the history
  • Loading branch information
auriocus committed Jun 28, 2014
1 parent 55f75da commit e296916
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions generic/vectcl.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ static const EnsembleMap implementationMap[] = {
{"tan", NumArrayTanCmd, NULL},
{"exp", NumArrayExpCmd, NULL},
{"log", NumArrayLogCmd, NULL},
{"log10", NumArrayLog10Cmd, NULL},
{"sqrt", NumArraySqrtCmd, NULL},
{"sinh", NumArraySinhCmd, NULL},
{"cosh", NumArrayCoshCmd, NULL},
Expand Down Expand Up @@ -2340,6 +2341,15 @@ static inline double fsign(double x) {
#define CPLXOP *result = NumArray_ComplexLog(op);
#include "uniop.h"

#define CMD NumArrayLog10Cmd
#define INTRES double
#define DBLRES double
#define INTOP DBLOP
#define DBLOP *result = log10(op);
#define CPLXRES NumArray_Complex
#define CPLXOP *result = NumArray_ComplexLog(op);
#include "uniop.h"

#define CMD NumArraySqrtCmd
#define INTRES double
#define DBLRES double
Expand Down
1 change: 1 addition & 0 deletions generic/vectclInt.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ SUBCOMMAND(NumArrayCosCmd);
SUBCOMMAND(NumArrayTanCmd);
SUBCOMMAND(NumArrayExpCmd);
SUBCOMMAND(NumArrayLogCmd);
SUBCOMMAND(NumArrayLog10Cmd);
SUBCOMMAND(NumArraySqrtCmd);
SUBCOMMAND(NumArraySinhCmd);
SUBCOMMAND(NumArrayCoshCmd);
Expand Down

0 comments on commit e296916

Please sign in to comment.