the map()-function screws up values if you use "bad" parameters.
In the section notes & warnings you should add this information
with a compilable example-code that demonstrates what happens.
if you try to use map in this wrong way
unsigned long rawToBeMapped = 1000000;
unsigned int mappedValue;
mappedValue = map(rawToBeMapped, 123, 255, 0, 1023);
The thread is long.
A negative value is a possible mapped value, there is nothing wrong with that.
Can you qualify if the negative value was
1/ a consequence of storing the result in a wrongly typed variable?
2/ a consequence of not understanding that map does not constrain its result?
3/ something else?
I'm unclear about the issue you are trying to nail
1 is a programming mistake. Often the compiler will issue a warning.
2. is already documented in the arduino doc