Here you can find the source of divide(double[] t1, double[] t2)
static public double[] divide(double[] t1, double[] t2)
//package com.java2s; //License from project: Open Source License public class Main { static public double[] divide(double[] t1, double[] t2) { if (t1.length != t2.length && t1 != null && t2 != null) { System.err.println("incorrect array multiplication"); return null; } else {/*from w w w . jav a 2 s . com*/ double[] res = new double[t2.length]; for (int i = 0; i < t1.length; i++) { if (t2[i] != 0) res[i] = t1[i] / t2[i]; else res[i] = 9999999; } return res; } } }