Skip to content

CompilePrint

CompilePrint(list-of-arguments}, expression)

compile the expression into a Java function and return the corresponding Java source code function, which has the arguments defined in list-of-argumentsn. You have to run Symja from a Java Development Kit (JDK) to compile to Java binary code.

Examples

Compile the expression into a CompiledFunction and assign it to f:

>> f=CompilePrint({x, _Real}, E^3-Cos(Pi^2/x))
>> f = CompilePrint({{n, _Integer}}, Module({p = Range(n),i,x,t}, Do(x = RandomInteger({1,i}); t = p[[i]]; p[[i]] = p[[x]]; p[[x]] = t,{i,n,2,-1}); p))

Compile, CompiledFunction, OptimizeExpression

Implementation status

  • ✅ - full supported

Github