Icon

kn_​example_​mround_​java

Round a number value to a multiple

„MROUND function returns a number rounded to a given multiple. MROUND will round a number up or down, depending on the nearest multiple.“

try that in KNIME

Round a number value to a multiplehttps://forum.knime.com/t/round-a-number-value-to-a-multiple/11540/2 double temp_var;if (c_var1 == null) {temp_var = Double.NaN;}else {temp_var = (Math.floor(c_var1 / v_input_factor) * v_input_factor);}out_var1_floor = temp_var; double temp_var;if (c_var1 == null) {temp_var = Double.NaN;}else {temp_var = (Math.ceil(c_var1 / v_input_factor) * v_input_factor);}out_var1_ceil = temp_var; double temp_var;if (c_var1 == null) {temp_var = Double.NaN;}else {temp_var = (Math.round(c_var1 / v_input_factor) * v_input_factor);}out_var1_round = temp_var; original datafloorinput_factorceilroundround Table Creator Java Snippet Double Input Java Snippet Java Snippet Math Formula solution withR by mauuuuu5 Round a number value to a multiplehttps://forum.knime.com/t/round-a-number-value-to-a-multiple/11540/2 double temp_var;if (c_var1 == null) {temp_var = Double.NaN;}else {temp_var = (Math.floor(c_var1 / v_input_factor) * v_input_factor);}out_var1_floor = temp_var; double temp_var;if (c_var1 == null) {temp_var = Double.NaN;}else {temp_var = (Math.ceil(c_var1 / v_input_factor) * v_input_factor);}out_var1_ceil = temp_var; double temp_var;if (c_var1 == null) {temp_var = Double.NaN;}else {temp_var = (Math.round(c_var1 / v_input_factor) * v_input_factor);}out_var1_round = temp_var; original datafloorinput_factorceilroundround Table Creator Java Snippet Double Input Java Snippet Java Snippet Math Formula solution withR by mauuuuu5

Nodes

Extensions

Links