Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

CalculateInverse

Guides

  • Guide to ZigangPan`CalculateInverse`

Symbols

  • FormulaToCPFunction
  • FormulaToFunction
  • inversefunction
  • updatenames
ZigangPan`CalculateInverse`
FormulaToCPFunction
​
FormulaToCPFunction
[x,fx]
returns a compiled function f,with independent variables listed in
x
,such that f[x]=fx.
​
Examples  
(1)
Basic Examples  
(1)
In[1]:=
fx={x1+x2,x2-x1^2+Exp[2x1]};xc={x1,x2};
In[2]:=
f=
FormulaToFunction
[xc,fx]
Out[2]=
Function[{x1,x2},{x1+x2,
2x1

-
2
x1
+x2}]
In[3]:=
fc=
FormulaToCPFunction
[xc,fx]
Out[3]=
CompiledFunction
Argument count: 2
Argument types:
{_Real,_Real}

▪
f and fc are pure functions, but fc is a compiled pure function, which only takes real valued variables.
In[4]:=
Timing[N[f[2,3]]]
Out[4]=
{0.000045,{5.,53.5982}}
In[5]:=
Timing[fc[2,3]]
Out[5]=
{0.000034,{5.,53.5982}}
▪
A compiled function can compute much faster than a normal one.
SeeAlso
FormulaToFunction
 
▪
Function
""

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com