# Error: cannot find symbol

1. Oct 12, 2015

### whatisreality

My program says it doesn't recognise the symbol signum(double) or sqrt(double)! I have definitely done the whole import java.lang.Math; thing. And signum and sqrt aren't symbols anyway. Is that too vague? I can post the actual code.

It's only my second week learning java, so it's supposed to be pretty straightforward stuff.

2. Oct 12, 2015

### Borg

Yes, the source code and imports would help.

3. Oct 12, 2015

### Staff: Mentor

I'm guessing that when you compile your code, the compiler isn't able to find the library code. The term "symbol" is computerese for the name of a variable, function, what-have-you, not a symbol such as $\Sigma$ or $\int$. Even if your source code has a line where you import some library, if your installation isn't set up correctly, the compiler won't be able to find the code for functions you're importing.

4. Oct 13, 2015

### Staff: Mentor

Are you trying to use the actual symbol $\sqrt ()$ in your source code instead of Math.sqrt()?

Java supports unicode but it doesn't support using the $\sqrt()$ symbol or +- signum as valid operators in expressions. It instead requires you to type Math.sqrt() or use + and - for a number's sign.

Last edited: Oct 13, 2015
5. Oct 13, 2015

### whatisreality

You are a hero! I forgot to put Math.sqrt! I was just using sqrt. And now my code works!

Thanks for all the replies, really appreciate it :)