Complex Numbers

Is there a complex number type as part of VB.NET 2005

Makes me wonder, if not, why not


Answer this question

Complex Numbers

  • Terry19692000

    The closest in VB that you will get to being able to handle a complex number is double.NaN (not a number) which is retuned by:

    System.Math.sqrt(-1)

    The why not will have to be answered by MS:)



  • Carolina Gomes

    Its not meant as a disrespect to the community of mathematical and scientific background but generally is not something that would be required as an intrinsic data type - in 20 years of software development I've never need to use it and if it was important to a huge group of software developers I'm sure it would have been added.

    If you feel it is an absolute necessity you are free to log a suggestion with MS.


  • mmoeser

    No there is not an intrinsic complex number type

    http://www.vb-helper.com/howto_complex_number_class.html
    http://msdn.microsoft.com/library/default.asp url=/library/en-us/dv_vstechart/html/vbtchUseClassStruct.asp

    are links on how to create your own complex type/structure to achieve this and a simple web search on "complex number" and vb will reveal a number of third paty libraries which have this.

    As to why - I would say its a mathematical function which probably has limited general use and can be implemented if you really need it - .net framework contains a lot of the most widely used functionality but not all - and hence the market for component vendors.


  • NIck Chance

    'Limited general use' is excluding a huge global community of people with mathematical/scientific backgrounds!

    I came across dnAnalytics, which appears to be slightly more rigorous than the vbHelper.

    http://www.dnanalytics.net/numerical/

    However, it is a bit of a pain having to validate and do Quality checks on any Third-party code.

    Thanks.


  • Gustavo Carrazoni

    Would you do validation and quality checks if it was built in to VB ...and huge is relative...the scientific community have a vast array of tools, but VB has a far, far, broader user base: scientists are a minority.

  • Complex Numbers