Here you can find the source of abs(double number)
public static double abs(double number)
//package com.java2s; //License from project: Open Source License public class Main { /**/* w w w. j a va2 s . co m*/ * Returns the absolute value */ public static int abs(int number) { return number < 0 ? -number : number; } /** * Returns the absolute value */ public static float abs(float number) { return number < 0.0F ? -number : number; } /** * Returns the absolute value */ public static double abs(double number) { return number < 0.0D ? -number : number; } }