Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > C LIbrary for Complex Numbers

C LIbrary for Complex Numbers
Thread Tools
Junior Member
Join Date: Dec 2000
Location: Houston, TX, USA
Status: Offline
Reply With Quote
Apr 16, 2001, 08:44 PM
 
Hello-

Does anyone know what C library I use to work with work with complex numbers and do algebra with complex numbers? Thanks!

Mike
     
Professional Poster
Join Date: Jan 2000
Status: Offline
Reply With Quote
Apr 17, 2001, 12:04 AM
 
I think there is one. "complex.h". You could make you own thought.

Do a google search for "complex.h". There were a ton of hits but I didn't feel like going though them.
     
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Apr 17, 2001, 08:04 AM
 
I'm fairly certain that PARI handles complex numbers (it's a complete arbitrary precision and algebra package). You might want to check that out.
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
Professional Poster
Join Date: Jan 2000
Status: Offline
Reply With Quote
Apr 17, 2001, 11:05 AM
 
Do you think programmers will start extending the NSObjects to do stuff like this? For example.

NSNumber->NSComplexNumber
NSPoint->NSVector

.....
     
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Apr 17, 2001, 12:16 PM
 
I was just thinking of that :-)

It's very possible, although the syntax of Objective-C would make it tough to be elegant:

[[[NSComplexNumber numberWithInt:4] numberByAdding:[NSComplexNumber numberWithInt:3]] numberByDividing:[NSComplexNumber numberWithInt:5]];

= (4+3)/5

Ick!

[ EDIT ] ------------------------------------------------

Anyways, since the interface between classes isn't as fast as the interface between structs, it would make large calculations _slow_ where large or complex numbers are needed (Fourier transforms most importantly).

[This message has been edited by parallax (edited 04-17-2001).]
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
Junior Member
Join Date: Dec 2000
Location: Houston, TX, USA
Status: Offline
Reply With Quote
Apr 17, 2001, 01:28 PM
 
So i've been looking for libcomplex and complex.h and it hasn't been going so well. I'm assuming i have to find this library for BSD, or will the Linux complex library work? That one seems to be easier to find.

Parallax, I also tried to get PARI, but it wasn't really installing correctly so i put that on the back burner. But thanks for the suggesting. It looks like a pretty powerful package that i'd like to explore some more.

Okay, thanks for helping me out!

mike
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:20 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2