Fixed function mean to support complex values, added more tests to min and max.