Problem with format() function to round numbers in PilotScript

Hello,

In one of my protocols I am rounding some numbers using the PilotScript function : format('%5.1f',number_to_round); 

The problem is that when rounding a number with a .5 decimal, the rounding is inconsistent. In some cases it will randomly round to the lower integer and in other cases it will round to the upper integer. (cf attachments)

Do you know any other function that enables to round numbers in a consistent way using PilotScript ? 

Thank you

Coline Monnard