Solved

# Inverse of tan

Posted on 2005-05-03
1,316 Views
hello everybody,

i just need to know how to find  inverse of tan or (tan-1).
Please provide me with the line of code.

thanks
0
Question by:ZUBAIR

LVL 86

Expert Comment

0

Author Comment

atan is some thing different....

if for example inverse of tan for 1 = 45
-1
tan    1 = 45

-1
tan    5 = 78.69

whereas using atan the results are

atan 1 = 0.785
atan 5 = 1.373

I hope now it is clear
0

LVL 86

Accepted Solution

>> atan is some thing different....

It isn't

>>whereas using atan the results are

That's because the result is in radians
0

Author Comment

0

LVL 9

Expert Comment

Math.toDegrees(Math.atan(1)) will give you 45.

As Math.atan(1) will return 0.7853981633974483(in radian)
so using the Math.toDegrees method , will convert it to degree.
ie. Math.toDegree(0.7853981633974483)=45
0

LVL 86

Expert Comment

:-)
0

Author Comment

thanks :)
0

LVL 9

Expert Comment

welcome:)
0

LVL 86

Expert Comment

You might have credited william007 for the extra info ;-)
0

## Featured Post

### Suggested Solutions

fix34  challenge 9 73
seriesUp challenge 7 83
nested class vs inner class 5 38
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…