HP Forums

Full Version: Mathematica code with C + HPGCC
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

If anyone here use HPGCC, can you tell, if we can use programs in Mathematica from C?

I guess it is too much to ask, I am just curious.

Sujith,

I don't know if this is possible but I doubt it. We would have to port the Mathematica programs, along with Mathematica itself, to the calculator and then call the programs from within C code. I can't imagine that the calculator has enough memory for that.

Dave

Quote:
If anyone here use HPGCC, can you tell, if we can use programs in Mathematica from C?

At least the naming conventions are a bit different on both sides. A quick lookup involving the result of Integrate[1/(1 + x^3), x] and piping it through CForm in Mathematica showed, that Mathematica uses ArcTan, Sqrt, Log, and Power, whereas HPGCC prefers atan, sqrt, and log. Trying to compile Mathematica generated C-Code within HPGCC thus yields messages like


warning: implicit declaration of function 'ArcTan'

warning: implicit declaration of function 'Sqrt'

warning: implicit declaration of function 'Log'

warning: implicit declaration of function 'Power'




but nevertheless compiles something. But this is the opposite direction compared to your question :-(



Kind regards, Ralf.

I know this is asking for too much on a small device with such a limited resource. Anyway you can do a **lot** with C programming alone, and it makes it worthy.

What happened to HPGCC? Is it still under active development?