The Museum of HP Calculators

HP Forum Archive 19

[ Return to Index | Top of Index ]

Mathematica code with C + HPGCC
Message #1 Posted by Sujith Abraham on 28 Sept 2010, 10:30 p.m.

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.

      
Re: Mathematica code with C + HPGCC
Message #2 Posted by David Hayden on 28 Sept 2010, 10:33 p.m.,
in response to message #1 by Sujith Abraham

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

      
Re: Mathematica code with C + HPGCC
Message #3 Posted by Ralf Fritzsch on 29 Sept 2010, 7:25 a.m.,
in response to message #1 by Sujith Abraham

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.

            
HPGCC still active
Message #4 Posted by Sujith Abraham on 1 Oct 2010, 11:01 a.m.,
in response to message #3 by Ralf Fritzsch

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?


[ Return to Index | Top of Index ]

Go back to the main exhibit hall