Normalize any value in range (-inf…+inf) to (0…1). Is it possible?
问题 If we have concrete range of max..min value it is quite easy to normalize it to 0..1 float values, but if we don't have concrete limits? Is it possible to build universal function to have output between 0 and 1? In my mind I think it is impossible but I am not math expert. I'm searching for implementation on JavaScript or PHP, but any code on C/C++/Python/Delphi is OK to provide examples ( if there are some ) 回答1: There are many ways to do this. I'll leave out mapping -inf and +inf , which