Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how

Legacy Documentation

Mathematica 8 (2010)

This is documentation for Mathematica 8, which was
based on an earlier version of Wolfram Language.
View current documentation (Version 14.3)

C Functions

SymbolicC supports working with C functions, as described in this section.

Defining Functions

First, you need to load the package.
Now, you can create a C function with CFunction .
Out[9]=
You can give a list as the type specification if you need type qualifiers.
Out[10]=

Calling Functions

First, you need to load the package.
Now, you can call a C function with CCall .
Out[12]=

Standard Math Operators

First, you need to load the package.
SymbolicC provides a full range of the standard C math operators. These generate function calls, as shown in the following.
Out[2]=
For some standard math operators there is no corresponding Mathematica function. In this case a string is used, as shown below.
Out[3]=
The full list of standard math operators is given below, showing the name in Mathematica and the output C name.
ArcCos acos
ArcSin asin
ArcTan atan (one argument)
ArcTan atan2 (two arguments)
Ceiling ceil
Cos cos
Cosh cosh
Exp exp
Abs fabs
Floor floor
"frexp" frexp
"ldexp" ldexp
Log log
"log10" log10
"modf" modf
Power pow
Sin sin
Sinh sinh
Sqrt sqrt
Tan tan
Tanh tanh

Mathematica function names and the corresponding standard math functions.



ja zh

AltStyle によって変換されたページ (->オリジナル) /