JNI return double with NaN
863941May 24 2011 — edited May 24 2011check my code first.
JNIEXPORT jdouble JNICALL Java_Test_getDouble(JNIEnv *env, jclass unused, jlong v)
{
double d = -2.71000;
return (jdouble)d;
}
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 am using MIPS gcc compiler (mips-linux-gnu-gcc) along with the option -msoft-float.
Thanks in advance.
Sam