map() issues with a temporary solution

More people might be able to help you if you post your full code.

map() is an integer function so your issues may be coming from truncation if you're trying to divide small numbers by large ones.