[algorithms] fixes error in gram_schmidt call
[algorithms] fixes newton default arg handling