-module(bucfloat). -export([round/2]). % @doc round Number with the given Precision. -spec round(Number :: float(), Precision :: integer()) -> float(). round(Number, Precision) -> P = math:pow(10, Precision), round(Number * P) / P.