Here you can find the source of signum(long number)
public static int signum(long number)
//package com.java2s; //License from project: Apache License public class Main { public static int signum(long number) { if (number < 0) return -1; else if (number == 0) return 0; else/*from www. j av a 2s.c o m*/ return 1; } public static int signum(double d) { return (int) Math.signum(d); } }