1 /* src/native/vm/cldc1.1/java_lang_Math.c
3 Copyright (C) 2006, 2007 R. Grafl, A. Krall, C. Kruegel, C. Oates,
4 R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
5 C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, J. Wenninger,
6 Institut f. Computersprachen - TU Wien
8 This file is part of CACAO.
10 This program is free software; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License as
12 published by the Free Software Foundation; either version 2, or (at
13 your option) any later version.
15 This program is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 $Id: java_lang_VMRuntime.c 5900 2006-11-04 17:30:44Z michi $
33 #include "fdlibm/fdlibm.h"
35 #include "native/jni.h"
36 #include "native/native.h"
38 #include "native/include/java_lang_Math.h"
41 /* native methods implemented by this file ************************************/
43 static JNINativeMethod methods[] = {
44 { "ceil", "(D)D", (void *) (ptrint) &Java_java_lang_Math_ceil },
45 { "cos", "(D)D", (void *) (ptrint) &Java_java_lang_Math_cos },
46 { "floor", "(D)D", (void *) (ptrint) &Java_java_lang_Math_floor },
47 { "sin", "(D)D", (void *) (ptrint) &Java_java_lang_Math_sin },
48 { "sqrt", "(D)D", (void *) (ptrint) &Java_java_lang_Math_sqrt },
49 { "tan", "(D)D", (void *) (ptrint) &Java_java_lang_Math_tan },
53 /* _Jv_java_lang_Math_init *****************************************************
55 Register native functions.
57 *******************************************************************************/
59 void _Jv_java_lang_Math_init(void)
63 u = utf_new_char("java/lang/Math");
65 native_method_register(u, methods, NATIVE_METHODS_COUNT);
70 * Class: java/lang/Math
74 JNIEXPORT double JNICALL Java_java_lang_Math_ceil(JNIEnv *env, jclass clazz, double a)
81 * Class: java/lang/Math
85 JNIEXPORT double JNICALL Java_java_lang_Math_cos(JNIEnv *env, jclass clazz, double a)
92 * Class: java/lang/Math
96 JNIEXPORT double JNICALL Java_java_lang_Math_floor(JNIEnv *env, jclass clazz, double a)
103 * Class: java/lang/Math
107 JNIEXPORT double JNICALL Java_java_lang_Math_sin(JNIEnv *env, jclass clazz, double a)
114 * Class: java/lang/Math
118 JNIEXPORT double JNICALL Java_java_lang_Math_sqrt(JNIEnv *env, jclass clazz, double a)
125 * Class: java/lang/Math
129 JNIEXPORT double JNICALL Java_java_lang_Math_tan(JNIEnv *env, jclass clazz, double a)
136 * These are local overrides for various environment variables in Emacs.
137 * Please do not remove this and leave it at the end of the file, where
138 * Emacs will automagically detect them.
139 * ---------------------------------------------------------------------
142 * indent-tabs-mode: t
146 * vim:noexpandtab:sw=4:ts=4: