Function for calculating divided difference table
def dividedDiffTable ( x , y , n ) : NEW_LINE INDENT for i in range ( 1 , n ) : NEW_LINE INDENT for j in range ( n - i ) : NEW_LINE INDENT y [ j ] [ i ] = ( ( y [ j ] [ i - 1 ] - y [ j + 1 ] [ i - 1 ] ) / ( x [ j ] - x [ i + j ] ) ) ; NEW_LINE DEDENT DEDENT return y ; NEW_LINE DEDENT