added lru_cahce in some Math functions. will be needed for ai