## WeBWorK Problems

### Re: Can't take acos of 1 or -1?

by Alex Jordan -
Number of replies: 0
My post came back to me and I realized it doesn't allow for negative arguments to arccos. Does Perl have a signum function? The wiki says you can use sgn()
(http://webwork.maa.org/wiki/Available_Functions)

So then:
arccos(sgn($u .$v) * sqrt((($u .$v)**2)/(($u .$u)*($v .$v)))