MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Feature request

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80497] Feature request
  • From: Jon Harrop <jon at ffconsultancy.com>
  • Date: Thu, 23 Aug 2007 06:22:03 -0400 (EDT)

I'm just getting to grips with .NET-link from Microsoft's F# programming
language and am mildly frustrated with the way .NET-link handles complex
numbers.

The interface allows you to specify your own complex number class and
Mathematica will use it to represent complexes in expressions. This is done
because .NET itself lacks a representation for complex numbers. However,
Mathematica does not provide a complex number class implementation and the
interface it requires does not appear to be compatible with the complex
number class that Microsoft provide with F# and I have been unable to get
them to cooperate.

There is a very easy solution to this and perhaps WRI would be kind enough
to adopt this suggestion: just make the default representation of complexes
on the .NET side an array with two elements. This is an existing .NET type,
all .NET languages can use it seamlessly and it lowers the barrier for new
users who would no longer have to fiddle with remotely executing
Mathematica commands from their .NET code to get Mathematica to load
some .NET code and recognise the complex number class inside it.

-- 
Dr Jon D Harrop, Flying Frog Consultancy
OCaml for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists/?usenet


  • Prev by Date: recording singularities of NDSolve
  • Next by Date: Contour plot legend
  • Previous by thread: Re: recording singularities of NDSolve
  • Next by thread: Contour plot legend