Here you can find the source of toBigDecimal(double[][] a)
private static BigDecimal[][] toBigDecimal(double[][] a)
//package com.java2s; //License from project: LGPL import java.math.BigDecimal; public class Main { private static BigDecimal[][] toBigDecimal(double[][] a) { int n = a.length; BigDecimal[][] b = new BigDecimal[n][n]; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { b[i][j] = BigDecimal.valueOf(a[i][j]); }/* ww w . ja v a 2 s . co m*/ } return b; } }