how to write a reciprocal function - Search