use different way to print logical to avoid libstdc++ bug