I'm having a Flex4/Actionscript application developed for access in a web browser. I need it to perform some math involving imaginary numbers (e.g. sqrt(-1)). I don't believe either Flex or Actionscript supports this.
However, I can put all of the math algorithms in a shared C or C++ library (as created by Matlab). Can Flex or Actionscript access these algorithms (and run them on the client)? Any better way to accomplish this?
Can Flex or Actionscript access these algorithms (and run them on the client)?
Sort of. You can use Alchemy to use C/C++ libraries in the Flash Player. I'm not sure exactly how it works. The project is experimental, but Adobe has announced they have a new version coming and that they will "commercialize" it. I assume that means tools will be rolled into Flash Pro or Flash Builder.
This was the technology behind the 2011 Adobe Max Keynote that displayed a game made with the Unreal engine running a browser.
Some quick searching came up with this AS2 library which may help without going the C route. ( Source ). You'd probably want to convert it to AS3, but I would expect that to be minimal.