{ { "java.lang.Math" }, { "min" }, min_builtin, 0 },
{ { "java.lang.Math" }, { "max" }, max_builtin, 0 },
{ { "java.lang.Math" }, { "abs" }, abs_builtin, 0 },
+ { { "java.lang.Math" }, { "acos" }, NULL, BUILT_IN_ACOS },
+ { { "java.lang.Math" }, { "asin" }, NULL, BUILT_IN_ASIN },
{ { "java.lang.Math" }, { "atan" }, NULL, BUILT_IN_ATAN },
{ { "java.lang.Math" }, { "atan2" }, NULL, BUILT_IN_ATAN2 },
+ { { "java.lang.Math" }, { "ceil" }, NULL, BUILT_IN_CEIL },
{ { "java.lang.Math" }, { "cos" }, NULL, BUILT_IN_COS },
{ { "java.lang.Math" }, { "exp" }, NULL, BUILT_IN_EXP },
+ { { "java.lang.Math" }, { "floor" }, NULL, BUILT_IN_FLOOR },
{ { "java.lang.Math" }, { "log" }, NULL, BUILT_IN_LOG },
{ { "java.lang.Math" }, { "pow" }, NULL, BUILT_IN_POW },
{ { "java.lang.Math" }, { "sin" }, NULL, BUILT_IN_SIN },
define_builtin (BUILT_IN_FMODF, "__builtin_fmodf",
float_ftype_float_float, "fmodf");
+ define_builtin (BUILT_IN_ACOS, "__builtin_acos",
+ double_ftype_double, "_ZN4java4lang4Math4acosEd");
+ define_builtin (BUILT_IN_ASIN, "__builtin_asin",
+ double_ftype_double, "_ZN4java4lang4Math4asinEd");
define_builtin (BUILT_IN_ATAN, "__builtin_atan",
double_ftype_double, "_ZN4java4lang4Math4atanEd");
define_builtin (BUILT_IN_ATAN2, "__builtin_atan2",
double_ftype_double_double, "_ZN4java4lang4Math5atan2Edd");
+ define_builtin (BUILT_IN_CEIL, "__builtin_ceil",
+ double_ftype_double, "_ZN4java4lang4Math4ceilEd");
define_builtin (BUILT_IN_COS, "__builtin_cos",
double_ftype_double, "_ZN4java4lang4Math3cosEd");
define_builtin (BUILT_IN_EXP, "__builtin_exp",
double_ftype_double, "_ZN4java4lang4Math3expEd");
+ define_builtin (BUILT_IN_FLOOR, "__builtin_floor",
+ double_ftype_double, "_ZN4java4lang4Math5floorEd");
define_builtin (BUILT_IN_LOG, "__builtin_log",
double_ftype_double, "_ZN4java4lang4Math3logEd");
define_builtin (BUILT_IN_POW, "__builtin_pow",
return Math.abs(x);
}
+ static double acos(double x)
+ {
+ return Math.acos(x);
+ }
+
+ static double asin(double x)
+ {
+ return Math.asin(x);
+ }
+
static double atan(double x)
{
return Math.atan(x);
return Math.atan2(x,y);
}
+ static double ceil(double x)
+ {
+ return Math.ceil(x);
+ }
+
static double cos(double x)
{
return Math.cos(x);
return Math.exp(x);
}
+ static double floor(double x)
+ {
+ return Math.floor(x);
+ }
+
static double log(double x)
{
return Math.log(x);
public static void main(String argv[])
{
- double sum = abs (1.0) + atan (1.0) + atan2 (1.0, 1.0) + cos (1.0)
- + exp (1.0) + log(1.0) + max(1.0, 1.0) + min (1.0, 1.0)
+ double sum = abs (1.0) + acos (1.0) + asin (1.0) + atan (1.0)
+ + atan2 (1.0, 1.0) + ceil (1.0) + cos (1.0) + exp (1.0)
+ + floor (1.0) + log(1.0) + max(1.0, 1.0) + min (1.0, 1.0)
+ pow (1.0, 1.0) + sin (1.0) + sqrt(1.0) + tan(1.0);
}
}