Saving all output to "!!{outputDirectory}!!/udf_round.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/udf_round.q >>> DESCRIBE FUNCTION round; 'tab_name' 'round(x[, d]) - round x to d decimal places' 1 row selected >>> DESCRIBE FUNCTION EXTENDED round; 'tab_name' 'round(x[, d]) - round x to d decimal places' 'Example:' ' > SELECT round(12.3456, 1) FROM src LIMIT 1;' ' 12.3'' 4 rows selected >>> >>> SELECT round(null), round(null, 0), round(125, null), round(1.0/0.0, 0), round(power(-1.0,0.5), 0) FROM src LIMIT 1; '_c0','_c1','_c2','_c3','_c4' '','','','Infinity','NaN' 1 row selected >>> >>> SELECT round(55555), round(55555, 0), round(55555, 1), round(55555, 2), round(55555, 3), round(55555, -1), round(55555, -2), round(55555, -3), round(55555, -4), round(55555, -5), round(55555, -6), round(55555, -7), round(55555, -8) FROM src LIMIT 1; '_c0','_c1','_c2','_c3','_c4','_c5','_c6','_c7','_c8','_c9','_c10','_c11','_c12' '55555','55555.0','55555.0','55555.0','55555.0','55560.0','55600.0','56000.0','60000.0','100000.0','0.0','0.0','0.0' 1 row selected >>> >>> SELECT round(125.315), round(125.315, 0), round(125.315, 1), round(125.315, 2), round(125.315, 3), round(125.315, 4), round(125.315, -1), round(125.315, -2), round(125.315, -3), round(125.315, -4), round(-125.315), round(-125.315, 0), round(-125.315, 1), round(-125.315, 2), round(-125.315, 3), round(-125.315, 4), round(-125.315, -1), round(-125.315, -2), round(-125.315, -3), round(-125.315, -4) FROM src LIMIT 1; '_c0','_c1','_c2','_c3','_c4','_c5','_c6','_c7','_c8','_c9','_c10','_c11','_c12','_c13','_c14','_c15','_c16','_c17','_c18','_c19' '125','125.0','125.3','125.32','125.315','125.315','130.0','100.0','0.0','0.0','-125','-125.0','-125.3','-125.32','-125.315','-125.315','-130.0','-100.0','0.0','0.0' 1 row selected >>> >>> SELECT round(3.141592653589793, -15), round(3.141592653589793, -16), round(3.141592653589793, -13), round(3.141592653589793, -14), round(3.141592653589793, -11), round(3.141592653589793, -12), round(3.141592653589793, -9), round(3.141592653589793, -10), round(3.141592653589793, -7), round(3.141592653589793, -8), round(3.141592653589793, -5), round(3.141592653589793, -6), round(3.141592653589793, -3), round(3.141592653589793, -4), round(3.141592653589793, -1), round(3.141592653589793, -2), round(3.141592653589793, 0), round(3.141592653589793, 1), round(3.141592653589793, 2), round(3.141592653589793, 3), round(3.141592653589793, 4), round(3.141592653589793, 5), round(3.141592653589793, 6), round(3.141592653589793, 7), round(3.141592653589793, 8), round(3.141592653589793, 9), round(3.141592653589793, 10), round(3.141592653589793, 11), round(3.141592653589793, 12), round(3.141592653589793, 13), round(3.141592653589793, 13), round(3.141592653589793, 14), round(3.141592653589793, 15), round(3.141592653589793, 16) FROM src LIMIT 1; '_c0','_c1','_c2','_c3','_c4','_c5','_c6','_c7','_c8','_c9','_c10','_c11','_c12','_c13','_c14','_c15','_c16','_c17','_c18','_c19','_c20','_c21','_c22','_c23','_c24','_c25','_c26','_c27','_c28','_c29','_c30','_c31','_c32','_c33' '0.0','0.0','0.0','0.0','0.0','0.0','0.0','0.0','0.0','0.0','0.0','0.0','0.0','0.0','0.0','0.0','3.0','3.1','3.14','3.142','3.1416','3.14159','3.141593','3.1415927','3.14159265','3.141592654','3.1415926536','3.14159265359','3.14159265359','3.1415926535898','3.1415926535898','3.14159265358979','3.141592653589793','3.141592653589793' 1 row selected >>> >>> SELECT round(1809242.3151111344, 9), round(-1809242.3151111344, 9) FROM src LIMIT 1; '_c0','_c1' '1809242.315111134','-1809242.315111134' 1 row selected >>> !record