Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

JNI return double with NaN

863941May 24 2011 — edited May 24 2011
check 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

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 21 2011
Added on May 24 2011
4 comments
1,532 views