check for LOG1P and LGAMMA