Function for displaying divided difference table
static void printDiffTable ( float y [ ] [ ] , int n ) { DecimalFormat df = new DecimalFormat ( " # . # # # # " ) ; df . setRoundingMode ( RoundingMode . HALF_UP ) ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < n - i ; j ++ ) { String str1 = df . format ( y [ i ] [ j ] ) ; System . out . print ( str1 + " TABSYMBOL ▁ " ) ; } System . out . println ( " " ) ; } }