0

Hi,

Has anyone had the following problem?

When I run the following code (just using Notepad and my DOS prompt):

```
public class MathFunctionsApp2
{
public static void main(String[] args)
{
int b = -50;
double x = 25.0;
double y = 3.0;
double z = 4.0;
System.out.println("cbrt(x) = "+ Math.cbrt(x));
System.out.println("hypot(y,z) = "+ Math.hypot(y,z));
System.out.println("log10(y) = "+ Math.log10(y));
System.out.println("signum(b) = "+ Math.signum(b));
}
}
```

It won't compile - it doesn't like SOME of the mathematical functions provided by the Math Class. (See error note below)

```
MathFunctionsApp2.java:13: cannot resolve symbol
symbol : method cbrt (double)
location: class java.lang.Math
System.out.println("cbrt(x) = "+ Math.cbrt(x));
^
MathFunctionsApp2.java:15: cannot resolve symbol
symbol : method hypot (double,double)
location: class java.lang.Math
System.out.println("hypot(y,z) = "+ Math.hypot(y,z));
^
MathFunctionsApp2.java:17: cannot resolve symbol
symbol : method log10 (double)
location: class java.lang.Math
System.out.println("log10(y) = "+ Math.log10(y));
^
MathFunctionsApp2.java:19: cannot resolve symbol
symbol : method signum (int)
location: class java.lang.Math
System.out.println("signum(b) = "+ Math.signum(b));
^
4 errors
```

However, it will accept some of the other Mathematical functions, such as sqrt, max, exp, etc. (I just didn't include them here - but they do work!)

Oh, and I also CAN get it to run if I just use TextPad.

Would love any advice I can get!

Thanks.

*Edited 3 Years Ago by pyTony*: fixed formating