By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,367 Members | 1,779 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,367 IT Pros & Developers. It's quick & easy.

any python module to calculate sin, cos, arctan?

P: n/a
any python module to calculate sin, cos, arctan?
Nov 8 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Shi Mu schrieb:
any python module to calculate sin, cos, arctan?


Yes.

Use the math module or the cmath module if you need
mathematical functions for complex numbers.

Bye,
Dennis
Nov 8 '05 #2

P: n/a
Shi Mu wrote:
any python module to calculate sin, cos, arctan?


math

There are two versions of arctan: atan and atan2.
atan2(y,x) does the quadrant selection
you do not get from atan(y/x)
Nov 8 '05 #3

P: n/a
Shi Mu wrote:
any python module to calculate sin, cos, arctan?


Try module math. Or cmath if you want the functions to be aware of
complex numbers.

/MiO
Nov 8 '05 #4

P: n/a
Shi Mu wrote:
any python module to calculate sin, cos, arctan?


The other answers in this thread point you to the standard modules. If
you need arbitrary precision floating point versions of these functions
check out:

http://calcrpnpy.sourceforge.net/clnumManual.html
Nov 8 '05 #5

P: n/a
On Tue, 08 Nov 2005 12:30:35 GMT, "Raymond L. Buvel"
<le******@wi.rr.com> wrote:
Shi Mu wrote:
any python module to calculate sin, cos, arctan?


The other answers in this thread point you to the standard modules. If
you need arbitrary precision floating point versions of these functions
check out:

http://calcrpnpy.sourceforge.net/clnumManual.html


Unless you're using Windows.

Matt Feinstein

--
There is no virtue in believing something that can be proved to be true.
Nov 8 '05 #6

P: n/a
Matt Feinstein wrote:
On Tue, 08 Nov 2005 12:30:35 GMT, "Raymond L. Buvel"
<le******@wi.rr.com> wrote:

http://calcrpnpy.sourceforge.net/clnumManual.html


Unless you're using Windows.


Why? Have you tried compiling it and failed?

--
Robert Kern
rk***@ucsd.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter

Nov 8 '05 #7

P: n/a
On Tue, 08 Nov 2005 06:43:51 -0800, Robert Kern
<ro*********@gmail.com> wrote:
Matt Feinstein wrote:
On Tue, 08 Nov 2005 12:30:35 GMT, "Raymond L. Buvel"
<le******@wi.rr.com> wrote:

http://calcrpnpy.sourceforge.net/clnumManual.html


Unless you're using Windows.


Why? Have you tried compiling it and failed?


Copied from the linked site:

"Windows is not supported but it may be possible to get this module to
work. You will need to use the GNU tools and figure out how to build
the CLN library. Then you need to figure out how to compile and link
the clnum extension module for the standard Python. If anyone gets
this to work and wants to contribute the results, contact me at
rlbuvel at gmail dot com."

Note: "may be possible", "you need to figure out", "if anyone gets
this to work".

The message seems clear to me-- 'If you want this capability, you can
either-- 1) install all the development tools, 2) compile all the
relevant libraries, and then 3) link and compile the Python extension
module at your own risk and on your own (or on your company's) time--
or, use Linux. Personally, I'd use Linux. On the other hand, not
everyone has that option, & it seems reasonable to me to point out
that there's a non-trivial difficulty here.

Matt Feinstein

--
There is no virtue in believing something that can be proved to be true.
Nov 8 '05 #8

P: n/a
Matt Feinstein wrote:
On Tue, 08 Nov 2005 06:43:51 -0800, Robert Kern
<ro*********@gmail.com> wrote:
Matt Feinstein wrote:
On Tue, 08 Nov 2005 12:30:35 GMT, "Raymond L. Buvel"
<le******@wi.rr.com> wrote:

http://calcrpnpy.sourceforge.net/clnumManual.html

Unless you're using Windows.


Why? Have you tried compiling it and failed?


Copied from the linked site:

"Windows is not supported but it may be possible to get this module to
work. You will need to use the GNU tools and figure out how to build
the CLN library. Then you need to figure out how to compile and link
the clnum extension module for the standard Python. If anyone gets
this to work and wants to contribute the results, contact me at
rlbuvel at gmail dot com."

Note: "may be possible", "you need to figure out", "if anyone gets
this to work".

The message seems clear to me-- 'If you want this capability, you can
either-- 1) install all the development tools, 2) compile all the
relevant libraries, and then 3) link and compile the Python extension
module at your own risk and on your own (or on your company's) time--
or, use Linux. Personally, I'd use Linux. On the other hand, not
everyone has that option, & it seems reasonable to me to point out
that there's a non-trivial difficulty here.


Okay. I thought you might be adding something substantive more than what
was plainly stated on the linked page. Guess not.

--
Robert Kern
rk***@ucsd.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter

Nov 8 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.