Here you can find the source of negate(double[] output, double[] a)
public static double[] negate(double[] output, double[] a)
//package com.java2s; //License from project: Open Source License public class Main { public static double[] negate(double[] output, double[] a) { for (int i = output.length - 1; i >= 0; i--) { output[i] = -a[i];/*from w ww . j a v a 2s. c om*/ } return output; } }