This content has been marked as final. Show 4 replies
860938 wrote:Without having actually tried the code my first guess would be that this is not your problem.
JNIEXPORT jdouble JNICALL Java_Test_getDouble(JNIEnv *env, jclass unused, jlong v)
double d = -2.71000;
When Test.getDouble() is called in java, NaN is returned.
Can someone tell me what is going on here and how can I fixed it?
I suspect that if I did try the code it wouldn't return the result you are seeing. Thus there would be two possibilities.
1. You are not running the code that you are posting here.
2. Something is wrong with the way you are compiling it.
If I remember I will try the code you posted.