- Timestamp:
- Dec 2, 2008, 6:24:28 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20081124/Ohana/src/opihi/lib.shell/stack_math.c
r20856 r20873 819 819 } \ 820 820 if ((FTYPE == 's') && (V1->type == 's')) { \ 821 opihi_int M1 = V1[0]. FltValue; \821 opihi_int M1 = V1[0].IntValue; \ 822 822 OUT[0].type = 's'; \ 823 823 OUT[0].IntValue = OP; \ … … 855 855 if (!strcmp (op, "rnd")) S_FUNC(M1*0.0 + drand48(), 'S'); 856 856 if (!strcmp (op, "not")) S_FUNC(!(M1), 's'); 857 if (!strcmp (op, "--")) S_FUNC(- (M1), 's');857 if (!strcmp (op, "--")) S_FUNC(-1*M1, 's'); // NOTE: opihi_int is signed, 858 858 if (!strcmp (op, "isinf")) S_FUNC(!finite(M1), 'S'); // XXX modify in future 859 859 if (!strcmp (op, "isnan")) S_FUNC(isnan(M1), 'S'); // XXX modify in future … … 939 939 if (!strcmp (op, "zero")) V_FUNC(0, 's'); 940 940 if (!strcmp (op, "not")) V_FUNC(!(*M1), 's'); 941 if (!strcmp (op, "--")) V_FUNC(- (*M1), 's');941 if (!strcmp (op, "--")) V_FUNC(-1*(*M1), 's'); // NOTE: opihi_int is signed 942 942 if (!strcmp (op, "isinf")) V_FUNC(!finite(*M1), 'S'); 943 943 if (!strcmp (op, "isnan")) V_FUNC(isnan(*M1), 'S'); … … 980 980 if (!strcmp (op, "=")) { } 981 981 if (!strcmp (op, "abs")) { for (i = 0; i < Nx*Ny; i++, out++, M1++) { *out = fabs(*M1); }} 982 if (!strcmp (op, "int")) { for (i = 0; i < Nx*Ny; i++, out++, M1++) { *out = ( float)(int)(*M1); }}982 if (!strcmp (op, "int")) { for (i = 0; i < Nx*Ny; i++, out++, M1++) { *out = (opihi_flt)(int)(*M1); }} 983 983 if (!strcmp (op, "exp")) { for (i = 0; i < Nx*Ny; i++, out++, M1++) { *out = exp(*M1); }} 984 984 if (!strcmp (op, "ten")) { for (i = 0; i < Nx*Ny; i++, out++, M1++) { *out = pow(10.0,*M1); }}
Note:
See TracChangeset
for help on using the changeset viewer.
