r50c (fixed64 price)
{
  fixed rem = price %% 1;

  n = price % 1;

  rem = () {
             select ()
             {
               case rem < 0.25:         return 0;
               case 0.25 <= rem < 0.75: return 0.5;
               case 0.75 <= rem:        return 1;
             }
             else
             {
               error (ERR_NOT_A_NUMBER);
             }
           };

  return n + rem;
}