~javier-lopez/ubuntu/quantal/cdo/sru-1023329

« back to all changes in this revision

Viewing changes to src/Math.c

  • Committer: Bazaar Package Importer
  • Author(s): Alastair McKinstry
  • Date: 2010-09-22 15:58:09 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100922155809-u1d3vlmlqj02uxjt
Tags: 1.4.6.dfsg.1-1
New upstream release. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
*/
36
36
 
37
37
 
38
 
#include "cdi.h"
 
38
#include <cdi.h>
39
39
#include "cdo.h"
40
40
#include "cdo_int.h"
41
41
#include "pstream.h"
43
43
 
44
44
void *Math(void *argument)
45
45
{
46
 
  static char func[] = "Math";
 
46
  static const char *func = "Math";
47
47
  enum {ABS, FINT, FNINT, SQR, SQRT, EXP, LN, LOG10, SIN, COS, TAN, ASIN, ACOS, ATAN, POW, RECI};
48
48
  int operatorID;
49
49
  int operfunc;
80
80
  cdoOperatorAdd("reci",  RECI,  0, NULL);
81
81
 
82
82
  operatorID = cdoOperatorID();
83
 
  operfunc = cdoOperatorFunc(operatorID);
 
83
  operfunc = cdoOperatorF1(operatorID);
84
84
 
85
85
  if ( operfunc == POW )
86
86
    {
144
144
              break;
145
145
            case SQRT:
146
146
              for ( i = 0; i < gridsize; i++ )
147
 
                array2[i] = DBL_IS_EQUAL(array1[i], missval1) ? missval1 : ROOT(array1[i]);
 
147
                array2[i] = DBL_IS_EQUAL(array1[i], missval1) ? missval1 : SQRT(array1[i]);
148
148
              break;
149
149
            case EXP:
150
150
              for ( i = 0; i < gridsize; i++ )