Lost Password?

Go Back   CodeCall Programming Forum > Software Development > General Programming

General Programming Non language specific, Assembly, Linux/Unix, Mac and anything not covered in other topics. Talk about Programming Theory here.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-03-2007, 08:16 AM
kenna kenna is offline
Learning Programmer
 
Join Date: Jul 2007
Posts: 30
Rep Power: 4
kenna is on a distinguished road
Default complex numbers

How useful would complex numbers be in a programming language?

There are eight basic arithmetic operations in my language, more complex operations are in a separate mathematic library, so it wouldn't be a fully fledged system for using complex numbers.
  • addition
  • subtraction
  • multiplication
  • division
  • exponentiation
  • additive inverse
  • multiplicative inverse
  • absolute value

So far my language has only three data types, bit (b), integer (n), and fraction (n,d), but I've been wondering whether it would be useful to add a complex (a,bi) data type too.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 11-03-2007, 06:12 PM
John's Avatar   
John John is offline
Co-Administrator
 
Join Date: Jul 2006
Age: 19
Posts: 2,437
Last Blog:
Object Oriented Design...
Rep Power: 20
John has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud of
Send a message via AIM to John
Default

Honestly I have no idea where complex numbers would be used in computer science, I've been programming for four years and haven't come across them - I am eagerly waiting WingedPanther's reply!
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 11-05-2007, 11:30 AM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Mod
 
Join Date: Jul 2006
Age: 35
Posts: 1,846
Last Blog:
Game software (GURPS)
Rep Power: 21
WingedPanther has a spectacular aura aboutWingedPanther has a spectacular aura about
Default

Not to leave Sidewinder disappointed...

The usefulness of adding complex numbers will depend heavily on your target audience. If you are going after the scientific community, it would be nice to include. If you are targeting business/web apps, it probably wouldn't help much.

Another question would be: is this an OOP language which would allow you to define a new datatype. One of the first things I would do, however, is check on the IEEE specifications on data types, as this will give your language standards defined behavior.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 11-05-2007, 04:34 PM
kenna kenna is offline
Learning Programmer
 
Join Date: Jul 2007
Posts: 30
Rep Power: 4
kenna is on a distinguished road
Default

Quote:
Originally Posted by WingedPanther View Post
The usefulness of adding complex numbers will depend heavily on your target audience. If you are going after the scientific community, it would be nice to include. If you are targeting business/web apps, it probably wouldn't help much.

Another question would be: is this an OOP language which would allow you to define a new datatype. One of the first things I would do, however, is check on the IEEE specifications on data types, as this will give your language standards defined behavior.
I want to reach a wide audience, so while it wouldn't be of much use to ordinary programmers, it would be very useful for scientists, even if only basic arithmetic operations. Or perhaps complex numbers would have som engineering value.......or maybe not...(T_T) Anyway, it would widen the audience a bit.

The language is almost like C, but regular and very strict. It is also very minimalistic and has a few very useful features not found in C. And absolutely no OOP! Not even if hell froze over! For creating new types you have enum and struct, and so far I cannot see the need for anything more. The language is also purely procedural.

One of the main reasons I began creating this language (besides creating a language I myself am happy with) was to get away from everything OOP and away from bloated GCC, Visual Studio, .net, and whatnot. *drooool* I love TCC!

A minimalistic, strict, regular, simple, "universal" programming language, based on C...with a few twists (-_^)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 11-05-2007, 06:00 PM
John's Avatar   
John John is offline
Co-Administrator
 
Join Date: Jul 2006
Age: 19
Posts: 2,437
Last Blog:
Object Oriented Design...
Rep Power: 20
John has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud of
Send a message via AIM to John
Default

Quote:
Originally Posted by kenna View Post
And absolutely no OOP! Not even if hell froze over!
Thats blasphemy
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 11-05-2007, 06:18 PM
G_Morgan G_Morgan is offline
Guru
 
Join Date: Oct 2007
Age: 24
Posts: 399
Rep Power: 7
G_Morgan has a spectacular aura aboutG_Morgan has a spectacular aura aboutG_Morgan has a spectacular aura about
Default

C99 has complex numbers. Good luck finding a good implementation of it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 11-06-2007, 10:32 AM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Mod
 
Join Date: Jul 2006
Age: 35
Posts: 1,846
Last Blog:
Game software (GURPS)
Rep Power: 21
WingedPanther has a spectacular aura aboutWingedPanther has a spectacular aura about
Default

It sounds like your language will be competing with C/Fortran, which seem to be the favorite languages for scientists/engineers. You may want to look at some of their language specifications to get some ideas for what to include.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting 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

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with large numbers saurav C and C++ 4 10-11-2007 04:52 PM
*!!! HELP: I need a C program that converts words into numbers and vice versa !!!* james24587 C and C++ 2 10-01-2007 11:10 AM
Generating Random Numbers with PHP Paradine PHP Tutorials 4 08-27-2007 07:09 PM
Random Generator of Unequal Numbers Paradine PHP Tutorials 0 08-26-2007 02:11 PM
Return random numbers without duplicates Paradine PHP Tutorials 0 08-26-2007 02:07 PM


All times are GMT -5. The time now is 10:35 AM.

Contest Stats

Xav ........ 164.00000
dargueta ........ 128.00000
John ........ 127.00000
gaylo565 ........ 18.00000
XaNaX ........ 15.00000
Johnnyboy ........ 3.00000
navghost ........ 1.00000

Contest Rules

Ads