test_bound.cc: avoid loss of precision caused by conversion from double to int