Scenario. I have an number x=12.45678 1. I want a function to display x as a round of upto 3 decimal place as 12.457 2. Similarly truncate x at 3 decimal place as 12.456 I am using gsl library function and searched for TRUNC and ROUND function but couldn't find anything concrete -- Posted via http://www.ruby-forum.com/.