473,320 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

any python module to calculate sin, cos, arctan?

any python module to calculate sin, cos, arctan?
Nov 8 '05 #1
8 6407
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Ron Adam | last post by:
Hi, I'm having fun learning Python and want to say thanks to everyone here for a great programming language. Below is my first Python program (not my first program) and I'd apreciate any...
7
by: svilen | last post by:
hello again. i'm now into using python instead of another language(s) for describing structures of data, including names, structure, type-checks, conversions, value-validations, metadata etc....
1
by: M.E.Farmer | last post by:
Hello c.l.py!, I have just finished this and decided to share. PySourceColor is a module to convert Python source into colored html. Yes it has been done before, but I like this better:) You can...
52
by: Dick Moores | last post by:
I need to figure out how to compute pi to base 12, to as many digits as possible. I found this reference, <http://mathworld.wolfram.com/Base.html>, but I really don't understand it well enough....
5
by: Gerald | last post by:
Recently, my program need to be run in embeded enviroment, and I cann't use standard library. But I need to use arctan(x), so I implement it like the following: inline double pow(double x,...
8
by: Julien Fiore | last post by:
Hi, I wrote a function to compute openness (a digital elevation model attribute). The function opens the gdal-compatible input raster and reads the values in a square window around each cell. The...
4
by: astri | last post by:
i`m doing thesis about comparing calculation of arctan by polynomial and CORDIC. I`ve read a lot of journal and books about CORDIC and this is what i understand. 1. make x and y 2. make...
5
by: aguirre.adolfo | last post by:
Hi, I am a very newbie who would very much appreciate some hints. Python 2.52. on Windows XP for now. Soon on Ubuntu 8 I am teaching myself Python following free tutorials. I can solve...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.