Yacas allows to define functions with the same name but different arities, and different rules corresponding to these arities will be used. Also, it is possible to define a function with optional arguments, for example, Plot2D is one such function. Such functions can have any arity larger or equal to a certain minimum arity (the number of non-optional arguments).
Arrays are faster than lists but the array size cannot be changed.
Atoms can be of type string, number, or symbol. For example, y1 is a symbolic atom, 954 is a number atom, and "" is an (empty) string atom. Symbolic atoms are normally used in Yacas to denote mathematical unknowns and function names. Number and string atoms are used to denote values.
A symbolic atom can be bound to a value (in which case it becomes a variable), or to a rule or several rules (in which case it becomes a function). An atom can also have a property object.
Some constants take a long time to compute and therefore they are cached at the highest precision computed so far. These are the "cached constants".
In> Solve(Sin(x)==1, x)
Out> {x==Pi/2};
|
The symbolic equation operator == is also useful to represent solutions of equations or to specify substitutions, give options, and so on.
Functions can be evaluated, that is, the rules bound to them may be executed. For example, Cos(Pi+0) is an expression that contains two functions and four atoms. The atom Pi is a symbolic atom which is normally not bound to anything. The atom 0 is a numeric atom.
The atoms Cos and + are symbolic atoms which are bound to appropriate simplification rules. So these two atoms are functions. Note that these functions have different syntax. Cos is a normal function which takes its arguments in parentheses. The atom + is a function with special syntax because "+" is placed between its arguments and no parentheses are used.
The rules to which + is bound are such that the expression Pi+0 is evaluated to the symbolic atom Pi. The rules for Cos are such that the expression Cos(Pi) is evaluated to the numeric atom -1. The example Yacas session is:
In> Cos(Pi+0) Out> -1; |
Some functions are built-in and implemented in C++, while others are library functions.
The built-in functions are usually less flexible than the library functions because they cannot be left unevaluated. Given incorrect arguments, a built-in function will generate an error. However, a user-defined function may simply return unevaluated in such cases.
an be
In> Cos(Pi+0) Out> -1;
Some functions are built-in and implemented in C++, while others are library functions.
The built-in functions are usually less flexible than the library functions because they cannot be left unevaluated. Given incorrect arguments, a built-in function will generate an error. However, a user-defined function may simply return unevaluated in such cases.
an be
In> Cos(Pi+0) Out> -1;
Some functions are built-in and implemented in C++, while others are library functions.
The built-in functions are usually less flexible than the library functions because they cannot be left unevaluated. Given incorrect arguments, a built-in function will generate an error. However, a user-defined function may simply return unevaluated in such cases.
an be
In> Cos(Pi+0) Out> -1;
Some functions are built-in and implemented in C++, while others are library functions.
The built-in functions are usually less flexible than the library functions because they cannot be left unevaluated. Given incorrect arguments, a built-in function will generate an error. However, a user-defined function may simply return unevaluated in such cases.
an be
In> Cos(Pi+0) Out> -1;
Some functions are built-in and implemented in C++, while others are library functions.
The built-in functions are usually less flexible than the library functions because they cannot be left unevaluated. Given incorrect arguments, a built-in function will generate an error. However, a user-defined function may simply return unevaluated in such cases.
an be
In> Cos(Pi+0) Out> -1;
Some functions are built-in and implemented in C++, while others are library functions.
The built-in functions are usually less flexible than the library functions because they cannot be left unevaluated. Given incorrect arguments, a built-in function will generate an error. However, a user-defined function may simply return unevaluated in such cases.
an be
In> Cos(Pi+0) Out> -1;
Some functions are built-in and implemented in C++, while others are library functions.
The built-in functions are usually less flexible than the library functions because they cannot be left unevaluated. Given incorrect arguments, a built-in function will generate an error. However, a user-defined function may simply return unevaluated in such cases.
an be
In> Cos(Pi+0) Out> -1;
Some functions are built-in and implemented in C++, while others are library functions.
The built-in functions are usually less flexible than the library functions because they cannot be left unevaluated. Given incorrect arguments, a built-in function will generate an error. However, a user-defined function may simply return unevaluated in such cases.
an be
In> Cos(Pi+0) Out> -1;
Some functions are built-in and implemented in C++, while others are library functions.
The built-in functions are usually less flexible than the library functions because they cannot be left unevaluated. Given incorrect arguments, a built-in function will generate an error. However, a user-defined function may simply return unevaluated in such cases.