From 3fbe5b9a0116475845654a32c5edc6493db5814d Mon Sep 17 00:00:00 2001 From: Eric Scharff Date: Thu, 11 Oct 2007 16:41:52 -0600 Subject: [PATCH] Add Math.pow() and Math.sqrt() native peers --- classpath/java-lang.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/classpath/java-lang.cpp b/classpath/java-lang.cpp index dac022c5d2..7d4a6259ef 100644 --- a/classpath/java-lang.cpp +++ b/classpath/java-lang.cpp @@ -81,6 +81,18 @@ Java_java_lang_System_doMapLibraryName(JNIEnv* e, jclass, jstring name) return r; } +extern "C" JNIEXPORT jdouble JNICALL +Java_java_lang_Math_sqrt(JNIEnv*, jclass, jdouble val) +{ + return sqrt(val); +} + +extern "C" JNIEXPORT jdouble JNICALL +Java_java_lang_Math_pow(JNIEnv*, jclass, jdouble val, jdouble exp) +{ + return pow(val, exp); +} + extern "C" JNIEXPORT jdouble JNICALL Java_java_lang_Math_floor(JNIEnv*, jclass, jdouble val) {