Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

java trigonometry functions

1,275 views
Skip to first unread message

Jeremy Watts

unread,
Feb 11, 2008, 7:35:06 AM2/11/08
to
hi,

does java have the trig functions 'sec, cosec, cot' and also their inverses
'arcsec, arcosec & arcot' ?

i am paricularly interested in 'arc cot'

thanks
jeremy watts


voorth

unread,
Feb 11, 2008, 8:04:29 AM2/11/08
to

sec z = 1/cos z
csc z = 1/sin z
cot z = 1/tan z

asec z = acos 1/z
acsc z = acos 1/z
acot z = atan 1/z

Just roll your own, I suppose....

Lew

unread,
Feb 11, 2008, 9:14:49 AM2/11/08
to

<http://java.sun.com/javase/6/docs/api/java/lang/Math.html>
gives you the core functions.

--
Lew

Daniel Pitts

unread,
Feb 11, 2008, 10:31:01 AM2/11/08
to
Google for Java Math.
--
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>

Roedy Green

unread,
Feb 11, 2008, 10:57:18 AM2/11/08
to
On Mon, 11 Feb 2008 12:35:06 GMT, "Jeremy Watts"
<jwatt...@hotmail.com> wrote, quoted or indirectly quoted someone
who said :

>does java have the trig functions 'sec, cosec, cot' and also their inverses
>'arcsec, arcosec & arcot' ?
>
>i am paricularly interested in 'arc cot'

see http://mindprod.com/jgloss/trigonometry.html
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Andrew Morrow

unread,
Feb 11, 2008, 11:21:32 PM2/11/08
to

"Jeremy Watts" <jwatt...@hotmail.com> wrote in message
news:_hXrj.3611$v04....@newsfe3-gui.ntli.net...

In case it was not obvious:

For something like arcosec(value), you have to recognize that "a" ashould be
a value that is *not* between -1 and 1 . What you do is to take and then
call java.lang.Math.asin(1.0/a). Same goes for the arcsec / acos pair and
arccot / atan pair.

http://en.wikipedia.org/wiki/Trigonometric_function

http://java.sun.com/javase/6/docs/api/java/lang/Math.html

Just remember to never compute 1.0/theta and you should be OK.

Andrew


0 new messages