Compose (f,g)
Compose two functions and return a function that is the composition of f and g.
ComposePower (f,n,x)
Compose a function with itself n times, passing x as argument, and returning x if n == 0. Examples:
genius> function f(x) = x^2 ; genius> ComposePower (f,3,7) = 5764801 genius> f(f(f(7))) = 5764801
GetCurrentModulo
Get current modulo from the context outside the function
Identity (x)
Identity function, returns its argument
IntegerFromBoolean (bval)
Make integer (0 for false or 1 for
true) from a boolean value.
bval can also be a number in which case a
non-zero value will be interpreted as true and
zero will be interpretted as false.
IsBoolean (arg)
Check if argument is a boolean (and not a number)
IsFunction (arg)
Check if argument is a function
IsFunctionOrIdentifier (arg)
Check if argument is a function or identifier
IsFunctionRef (arg)
Check if argument is a function reference
IsMatrix (arg)
Check if argument is a matrix
IsNull (arg)
Check if argument is a null
IsString (arg)
Check if argument is a text string
IsValue (arg)
Check if argument is a number
SetFunctionFlags (id,flags...)
Set flags for a function, currently "PropagateMod" and "NoModuloArguments"
SetHelp (id,category,desc)
Set the category and help description line for a function
SetHelpAlias (id,alias)
Sets up a help alias
chdir (dir)
Changes current directory
display (str,expr)
Display a string and an expression
error (str)
Prints a string to the error stream
exit
Aliases: quit
Exits the program
false
Aliases: False FALSE
The false boolean value
manual
Displays the user manual
print (str)
Prints an expression
printn (str)
Prints an expression without a trailing newline
protect (id)
Protect a variable from being modified
set (id,val)
Set a global variable. The id
can be either a string or a quoted identifier as follows.
For example:
set(`x,1)will set the global variable
x to the value 1.
string (s)
Make a string. This will make a string out of any argument.
true
Aliases: True TRUE
The true boolean value
unprotect (id)
Unprotect a variable from being modified
wait (secs)
Waits a specified number of seconds.
warranty
Gives the warranty information