added possibility for controlling precision in prim outputs