I'm trying to have Mathematica automatically give me an equation which I can use in a different programming language. FortranForm produces output which is very similar to what the other language is expecting, except for the Power operator.
Basically, my problem is this - I would like to see the following output from Mathematica:
In= FortranForm[a^b] Out= a^b
Rather than what it currently does, which is:
In= FortranForm[a^b] Out= a**b
I think I can redefine the formatting of Power to do what I want with:
Unprotect[Power] Format[Power[args__], FortranForm]:= <something here i can't figure out>
Does anyone know how to modify the formatting of Power when using FortranForm?