To check or print the result of a function call, you must explicitly printit
gnuplot> print floor(7.3)
7
To change a related function roundto a round only in a decimal place, use the following
round(x) = x - floor(x) < 0.5 ? floor(x) : ceil(x)
round2(x, n) = round(x*10**n)*10.0**(-n)
and name it like
gnuplot> print round2(7.3456, 1)
7.3
gnuplot> print round2(7.3456, 2)
7.35
source
share