sectionally smooth function