isInHalfspace needs hpreal to return instead of int