Here you can find the source of abs_min(double a, double b)
public static double abs_min(double a, double b)
//package com.java2s; //License from project: Open Source License public class Main { public static double abs_min(double a, double b) { if (Math.abs(a) > Math.abs(b)) { return Math.signum(a) * b; } else {//from w ww.java 2s .com return a; } } }