I\'m creating some functions to do things like the \"separated sum\" of negative and positive number, kahan, pairwise and other stuff where it doesn\'t matter the order I take t
Try to store xs(i,j) inside a temporary variable inside the loop so you only call the function once.