/usr/include/paw/ntuple/qp_exe_op_num.h is in libpawlib2-dev 1:2.14.04.dfsg.2-9.1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | /*
* qp_exe_op_num.h --
* Template for the simple numeric operations.
*
* Original: 20-Jan-1995 16:57
*
* Author: Maarten Ballintijn <Maarten.Ballintijn@cern.ch>
*
* $Id: qp_exe_op_num.h,v 1.4 1996/04/23 18:38:33 maartenb Exp $
*
* $Log: qp_exe_op_num.h,v $
* Revision 1.4 1996/04/23 18:38:33 maartenb
* - Add RCS keywords
*
*
*/
case FC_PLUS + (OP_BASE):
o1 = &stack[frame[framep]];
o2 = &stack[frame[framep-1]];
POP_FRAME(1);
*((OP_TYPE *) o2) = *((OP_TYPE *) o1) + *((OP_TYPE *) o2);
break;
case FC_MINUS + (OP_BASE):
o1 = &stack[frame[framep]];
o2 = &stack[frame[framep-1]];
POP_FRAME(1);
*((OP_TYPE *) o2) = *((OP_TYPE *) o1) - *((OP_TYPE *) o2);
break;
case FC_TIMES + (OP_BASE):
o1 = &stack[frame[framep]];
o2 = &stack[frame[framep-1]];
POP_FRAME(1);
*((OP_TYPE *) o2) = *((OP_TYPE *) o1) * *((OP_TYPE *) o2);
break;
case FC_DIV + (OP_BASE):
o1 = &stack[frame[framep]];
o2 = &stack[frame[framep-1]];
POP_FRAME(1);
if ( *((OP_TYPE *) o2) == 0 ) {
sf_report( "Divide by zero\n" );
*errp = R_MATH_ERROR;
running = FALSE;
*((OP_TYPE *) o2) = 0;
} else {
*((OP_TYPE *) o2) = *((OP_TYPE *) o1) / *((OP_TYPE *) o2);
}
break;
case FC_POW + (OP_BASE):
o1 = &stack[frame[framep]];
o2 = &stack[frame[framep-1]];
POP_FRAME(1);
{
double x = *((OP_TYPE *) o1);
double y = *((OP_TYPE *) o2);
double dummy;
if ( ( x == 0. && y <= 0. ) || ( x < 0. && modf(y,&dummy) != 0. ) ) {
sf_report( "Illegal values for power: %lg**%lg\n", x, y );
*errp = R_MATH_ERROR;
running = FALSE;
*((OP_TYPE *) o2) = 0;
} else {
*((OP_TYPE *) o2) = pow( x, y );
}
}
break;
case FC_UMINUS + (OP_BASE): /* assume that signed and unsigned */
o1 = &stack[frame[framep]]; /* have the same aligment ... */
SET_FRAME_TYPE( datatype_signed[ OP_DTYPE ] );
*((OP_TYPE *) o1) = - *((OP_TYPE *) o1);
break;
case FC_MIN + (OP_BASE):
o1 = &stack[frame[framep]];
o2 = &stack[frame[framep-1]];
POP_FRAME(1);
if ( *((OP_TYPE *) o1) < *((OP_TYPE *) o2) ) {
*((OP_TYPE *) o2) = *((OP_TYPE *) o1);
}
break;
case FC_MAX + (OP_BASE):
o1 = &stack[frame[framep]];
o2 = &stack[frame[framep-1]];
POP_FRAME(1);
if ( *((OP_TYPE *) o1) > *((OP_TYPE *) o2) ) {
*((OP_TYPE *) o2) = *((OP_TYPE *) o1);
}
break;
|