Added recip_length function