I honestly never used $sin/$cos before. but you might want to mix them with $int. for example $int(0.000001) would return 0 (integer)