18 static double i_round(
double x,
double step,
double start)
30 int f_round(
int argc,
const int *argt,
void **args)
32 const DCELL *arg1 = args[1];
56 DCELL x = i_round(arg1[i], 1.0, 0.0);
57 if (
x > 2147483647.0 ||
x < -2147483647.0)
66 const DCELL *arg2 = args[2];
78 DCELL x = i_round(arg1[i], arg2[i], 0.0);
79 if (
x > 2147483647.0 ||
x < -2147483647.0)
96 res[i] = (
FCELL)i_round(arg1[i], arg2[i], 0.0);
100 DCELL *res = args[0];
108 res[i] = (
DCELL)i_round(arg1[i], arg2[i], 0.0);
115 else if (argc == 3) {
116 const DCELL *arg2 = args[2];
117 const DCELL *arg3 = args[3];
123 for (i = 0; i <
columns; i++) {
131 DCELL x = i_round(arg1[i], arg2[i], arg3[i]);
132 if (
x > 2147483647.0 ||
x < -2147483647.0)
141 FCELL *res = args[0];
151 res[i] = (
FCELL)i_round(arg1[i], arg2[i], arg3[i]);
155 DCELL *res = args[0];
165 res[i] = (
DCELL)i_round(arg1[i], arg2[i], arg3[i]);
184 if (argc > 1 && argt[0] < argt[2])
186 if (argc > 2 && argt[0] < argt[3])
int c_round(int argc, int *argt)
int f_round(int argc, const int *argt, void **args)