Here you can find the source of cos(float f)
public static final float cos(float f)
//package com.java2s; //License from project: Open Source License public class Main { private static float[] a = new float[65536]; public static final float cos(float f) { return a[(int) (f * 10430.378F + 16384.0F) & '\uffff']; }//from ww w. j a va2s. c o m }