[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

# 33. Miscellaneous Options

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 33.1 Introduction to Miscellaneous Options

In this section various options are discussed which have a global effect on the operation of Maxima. Also various lists such as the list of all user defined functions, are discussed.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 33.2 Share

The Maxima "share" directory contains programs and other files of interest to Maxima users, but not part of the core implementation of Maxima. These programs are typically loaded via `load` or `setup_autoload`.

`:lisp *maxima-sharedir*` displays the location of the share directory within the user's file system.

`printfile ("share.usg")` prints an out-of-date list of share packages. Users may find it more informative to browse the share directory using a file system browser.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 33.3 Functions and Variables for Miscellaneous Options

Declaration: alphabetic

  `alphabetic` is a declaration type recognized by `declare`. The expression `declare(s, alphabetic)` tells Maxima to recognize as alphabetic all of the characters in s, which must be a string.

  See also Identifiers.

  Example:

      (%i1) xx\~yy\`\@ : 1729;
      (%o1)                         1729
      (%i2) declare ("~`@", alphabetic);
      (%o2)                         done
      (%i3) xx~yy`@ + @yy`xx + `xx@@yy~;
      (%o3)               `xx@@yy~ + @yy`xx + 1729
      (%i4) listofvars (%);
      (%o4)                  [@yy`xx, `xx@@yy~]

  Categories: Declarations and inferences

Option variable: genindex

  Default value: `i`

  `genindex` is the alphabetic prefix used to generate the next variable of summation when necessary.

  Categories: Sums and products

Option variable: gensumnum

  Default value: 0

  `gensumnum` is the numeric suffix used to generate the next variable of summation. If it is set to `false` then the index will consist only of `genindex` with no numeric suffix.

  Categories: Sums and products

Function: gensym ()
Function: gensym (x)

  `gensym()` creates and returns a fresh symbol.

  The name of the new-symbol is the concatenation of a prefix, which defaults to "g", and a suffix, which is the decimal representation of a number that defaults to the value of a Lisp internal counter.

  If x is supplied, and is a string, then that string is used as a prefix instead of "g" for this call to gensym only.

  If x is supplied, and is an integer, then that integer, instead of the value of the internal Lisp integer, is used as the suffix for this call to gensym only.

  If and only if no explicit suffix is supplied, the Lisp internal integer is incremented after it is used.

  Examples:

      (%i1) gensym();
      (%o1)                         g887
      (%i2) gensym("new");
      (%o2)                        new888
      (%i3) gensym(123);
      (%o3)                         g123

Function: properties (a)

  Returns a list of the names of all the properties associated with the atom a.

  Categories: Declarations and inferences

Special symbol: props

  `props` are atoms which have any property other than those explicitly mentioned in `infolists`, such as specified by `atvalue`, `matchdeclare`, etc., as well as properties specified in the `declare` function.

  Categories: Declarations and inferences · Global variables

Function: propvars (prop)

  Returns a list of those atoms on the `props` list which have the property indicated by prop. Thus `propvars (atvalue)` returns a list of atoms which have atvalues.

  Categories: Declarations and inferences

Function: put (atom, value, indicator)

  Assigns value to the property (specified by indicator) of atom. indicator may be the name of any property, not just a system-defined property.

  `rem` reverses the effect of `put`.

  `put` evaluates its arguments. `put` returns value.

  Examples:

      (%i1) put (foo, (a+b)^5, expr);
                                         5
      (%o1)                       (b + a)
      (%i2) put (foo, "Hello", str);
      (%o2)                         Hello
      (%i3) properties (foo);
      (%o3)            [[user properties, str, expr]]
      (%i4) get (foo, expr);
                                         5
      (%o4)                       (b + a)
      (%i5) get (foo, str);
      (%o5)                         Hello

  Categories: Declarations and inferences

Function: qput (atom, value, indicator)

  Assigns value to the property (specified by indicator) of atom. This is the same as `put`, except that the arguments are quoted.

  Example:

      (%i1) foo: aa$
      (%i2) bar: bb$
      (%i3) baz: cc$
      (%i4) put (foo, bar, baz);
      (%o4)                          bb
      (%i5) properties (aa);
      (%o5)                [[user properties, cc]]
      (%i6) get (aa, cc);
      (%o6)                          bb
      (%i7) qput (foo, bar, baz);
      (%o7)                          bar
      (%i8) properties (foo);
      (%o8)            [value, [user properties, baz]]
      (%i9) get ('foo, 'baz);
      (%o9)                          bar

  Categories: Declarations and inferences

Function: rem (atom, indicator)

  Removes the property indicated by indicator from atom. `rem` reverses the effect of `put`.

  `rem` returns `done` if atom had an indicator property when `rem` was called, or `false` if it had no such property.

  Categories: Declarations and inferences

Function: remove (a_1, p_1, ..., a_n, p_n)
Function: remove ([a_1, …, a_m], [p_1, …, p_n], …)
Function: remove ("a", operator)
Function: remove (a, transfun)
Function: remove (all, p)

  Removes properties associated with atoms.

  `remove (a_1, p_1, ..., a_n, p_n)` removes property `p_k` from atom `a_k`.

  `remove ([a_1, ..., a_m], [p_1, ..., p_n], ...)` removes properties `p_1, ..., p_n` from atoms a_1, …, a_m. There may be more than one pair of lists.

  `remove (all, p)` removes the property p from all atoms which have it.

  The removed properties may be system-defined properties such as `function`, `macro`, or `mode_declare`. `remove` does not remove properties defined by `put`.

  A property may be `transfun` to remove the translated Lisp version of a function. After executing this, the Maxima version of the function is executed rather than the translated version.

  `remove ("a", operator)` or, equivalently, `remove ("a", op)` removes from a the operator properties declared by `prefix`, `infix`, `nary`, `postfix`, `matchfix`, or `nofix`. Note that the name of the operator must be written as a quoted string.

  `remove` always returns `done` whether or not an atom has a specified property. This behavior is unlike the more specific remove functions `remvalue`, `remarray`, `remfunction`, and `remrule`.

  `remove` quotes its arguments.

  Categories: Declarations and inferences

Function: remvalue (name_1, …, name_n)
Function: remvalue (all)

  Removes the values of user variables name_1, …, name_n (which can be subscripted) from the system.

  `remvalue (all)` removes the values of all variables in `values`, the list of all variables given names by the user (as opposed to those which are automatically assigned by Maxima).

  See also `values`.

  Categories: Evaluation

Function: rncombine (expr)

  Transforms expr by combining all terms of expr that have identical denominators or denominators that differ from each other by numerical factors only. This is slightly different from the behavior of `combine`, which collects terms that have identical denominators.

  Setting `pfeformat: true` and using `combine` yields results similar to those that can be obtained with `rncombine`, but `rncombine` takes the additional step of cross-multiplying numerical denominator factors. This results in neater forms, and the possibility of recognizing some cancellations.

  `load(rncomb)` loads this function.

  Categories: Expressions

Function: scalarp (expr)

  Returns `true` if expr is a number, constant, or variable declared `scalar` with `declare`, or composed entirely of numbers, constants, and such variables, but not containing matrices or lists.

  Categories: Predicate functions · Vectors · Matrices

Function: setup_autoload (filename, function_1, …, function_n)

  Specifies that if any of function_1, …, function_n are referenced and not yet defined, filename is loaded via `load`. filename usually contains definitions for the functions specified, although that is not enforced.

  `setup_autoload` does not work for array functions.

  `setup_autoload` quotes its arguments.

  Example:

      (%i1) legendre_p (1, %pi);
      (%o1)                  legendre_p(1, %pi)
      (%i2) setup_autoload ("specfun.mac", legendre_p, ultraspherical);
      (%o2)                         done
      (%i3) ultraspherical (2, 1/2, %pi);
      Warning - you are redefining the Macsyma function ultraspherical
      Warning - you are redefining the Macsyma function legendre_p
                                  2
                       3 (%pi - 1)
      (%o3)            ------------ + 3 (%pi - 1) + 1
                            2
      (%i4) legendre_p (1, %pi);
      (%o4)                          %pi
      (%i5) legendre_q (1, %pi);
                                    %pi + 1
                            %pi log(-------)
                                    1 - %pi
      (%o5)                 ---------------- - 1
                                   2

  Categories: Function definition · File input

[ << ] | [ >> ] |  |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

This document was generated on August, 30 2011 using texi2html 1.76.