This project has moved and is read-only. For the latest updates, please go here.

complex numbers

Feb 12, 2010 at 2:35 AM

Quantity System Framework great idea!  Say do you have plans / architecture for adding support for complex numbers?



Feb 12, 2010 at 9:09 AM

Thank you Cody for the compliment.

Actually the framework design can support any type.  I am relying on Quantities as a container to Unit and Storage type


however my plans in future is toward the language itself and to support Tensor calculations, enhancing parsing speed, and adding symbolic algebra.

all of this, is to test the sustainability of the idea in front of all types of calculations.



Ahmed Sadek

Jul 28, 2010 at 2:30 PM

Hi Cody,


well I would like to mention that I did add the Complex and Quaternion Numbers in Qs


if you are interested, you can grab the latest code from the source control


to use a complex value you write C{3 4} + C{5 4} 

I relied on the Complex number of the .NET framework 4.0


Quaternion also supported partially with  H{5 4 3 1} 


and you can declare matrix with complex values

Qs> [C{3 4} 3 2; 4 5 C{2 1}; 3 2 1]


hope this get your attention.