int periodic_in(term t, term x, term *period); int period_aux(term t, term x, term period,term *ans, term *next);