i have tested in [-7,-9,-4] and [2,-4,6], and [ 2,4,6] all are giving maximum output , then why there is error