49 round(sqrt(5) - sqrt(2));
55 (declare(n,integer),0);
85 (remove(n,integer),0);
91 (declare(o,odd), declare(o,integer),0);
103 (declare(e,even), declare(e,integer),0);
112 (remove(o,odd), remove(o,integer), remove(e,even), remove(e,integer),0);
115 round(x) + round(-x);
118 round(a-b) + round(b-a);
124 round(round(rat(a)));
133 map('round,[inf, minf, und, ind]);
134 [inf, minf, und, ind]$
184 truncate(sqrt(5) - sqrt(2));
187 truncate(sqrt(1932));
190 (declare(n,integer),0);
208 (remove(n,integer),0);
214 truncate(x) + truncate(-x);
217 truncate(a-b) + truncate(b-a);
220 truncate(truncate(a));
223 truncate(truncate(rat(a)));
229 truncate(ceiling(x));
232 map('truncate,[inf, minf, und, ind]);
233 [inf, minf, und, ind]$
238 (tellsimp(truncate(x),%pi),0);
244 (tellsimp(round(x), sqrt(3)),0);
253 truncate(-truncate(-x));
275 /* check for noun /verb weirdness */
289 'round(-x) + round(x);
292 'truncate(-x) + truncate(x);
295 /* regression tests for SF bug 1867942 */
297 map('round, [1.b0, 1.1b1, 1.11b2, 10.b-1, 100.b-2]);
300 map('round, [-1.b0, -1.1b1, -1.11b2, -10.b-1, -100.b-2]);
303 map('round, [1.0, 1.1d1, 1.11d2, 10.d-1, 100.d-2]);
306 map('round, [-1.0, -1.1d1, -1.11d2, -10.d-1, -100.d-2]);