sin() doesn't work in emu (cuda 3.0 beta)

Hi,

i have some problems with sin() function in cuda 3.0 beta, when testing code in emulation mode, sin() doesn’t compute correctly:

master tests # cat sin.cu

#include <cutil_inline.h>

#include "cuda_runtime.h"

#include <unistd.h>

#include <stdlib.h>

__global__ void kernel() {

printf("sin(0.5)=%f\n",__sinf(0.5f));

   printf("sin(0.5)=%f\n",sin(0.5f));

}

main() {

	kernel<<<1,1>>>();

}

master tests # nvcc -deviceemu --device-compilation C -arch=sm_13 -lrt -L/root/NVIDIA_GPU_Computing_SDK/sdk/lib/ -L/root/NVIDIA_GPU_Computing_SDK/C/lib/  -I/root/NVIDIA_GPU_Computing_SDK/C/common/inc/  -o sin sin.cu 

master tests # ./sin

sin(0.5)=0.479426

sin(0.5)=0.479426

master tests #

the correct value is:

sin(0.5) = 0.008726535

why is it wrong? maybe i miss some library?

That is the correct answer in degrees. All C (and cuda) trigonometric functions work in radians. You program is working properly.

thank you very much