Here you can find the source of single2short(float f)
public static short single2short(float f)
//package com.java2s; //License from project: Apache License public class Main { public static short single2short(float f) { return (short) (((long) f << 48) >> 48); }/*w w w . j a va2s .c o m*/ }