The symath Reference Manual

This is the symath Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 06:49:39 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 symath

A simple symbolic math library for Common Lisp

Author

Pavel Kaygorodov <>

Home Page

https://github.com/hemml/symath

Source Control

https://github.com/hemml/symath.git

License

MIT

Version

0.1

Source

symath.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 symath/symath.asd

Source

symath.asd.

Parent Component

symath (system).

ASDF Systems

symath.


3.1.2 symath/symath.lisp

Source

symath.asd.

Parent Component

symath (system).

Packages

symath.

Public Interface
Internals

3.2 Static


3.2.1 symath/README.md

Source

symath.asd.

Parent Component

symath (system).


3.2.2 symath/LICENSE

Source

symath.asd.

Parent Component

symath (system).


4 Packages

Packages are listed by definition order.


4.1 symath

Source

symath.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Ordinary functions

Function: simplify (e)
Package

symath.

Source

symath.lisp.


5.1.2 Generic functions

Generic Function: array-multiply (x y)
Package

symath.

Methods
Method: array-multiply (x y)
Source

symath.lisp.


5.2 Internals


5.2.1 Special variables

Special Variable: *equarg-uniq-sym*
Package

symath.

Source

symath.lisp.

Special Variable: *return-best-variant*
Package

symath.

Source

symath.lisp.

Special Variable: *simplify-cache*
Package

symath.

Source

symath.lisp.


5.2.2 Macros

Macro: chain-func-rec (fl arg)

Recursively call function chain

Package

symath.

Source

symath.lisp.

Macro: def-expr-cond (&rest margs)

(expr-cond func-name expr-name :numberp cod :boolp cod :op (op cod) ... :defop cod)

Package

symath.

Source

symath.lisp.

Macro: defun-stable-expr (name args &rest cod)

Define the function of one argument, which will call itself with its result as a argument, until already a seen result will be returned

Package

symath.

Source

symath.lisp.

Macro: if-let (varexpr r1 &optional r2)
Package

symath.

Source

symath.lisp.


5.2.3 Ordinary functions

Function: all-arraysp (l)

Check if all elements in l are arrays

Package

symath.

Source

symath.lisp.

Function: all-bins (n)
Package

symath.

Source

symath.lisp.

Function: all-list-decs (l &key min max)
Package

symath.

Source

symath.lisp.

Function: boolp (e)
Package

symath.

Source

symath.lisp.

Function: calc-arrays (e)
Package

symath.

Source

symath.lisp.

Function: clear-simplify-cache ()
Package

symath.

Source

symath.lisp.

Function: collect-common (e)
Package

symath.

Source

symath.lisp.

Function: collect-common-nums (e)
Package

symath.

Source

symath.lisp.

Function: collect-exprs (e)

Collecting * and + expressions: (+ a (+ b c)) => (+ a b c)

Package

symath.

Source

symath.lisp.

Function: collect-expt (e)
Package

symath.

Source

symath.lisp.

Function: collect-one-common (e)
Package

symath.

Source

symath.lisp.

Function: collect-same-expts (e)
Package

symath.

Source

symath.lisp.

Function: copy-expr (e)
Package

symath.

Source

symath.lisp.

Function: denorm-expr (e)
Package

symath.

Source

symath.lisp.

Function: denorm-expr-expt (e)
Package

symath.

Source

symath.lisp.

Function: denorm-expr-minus (e)
Package

symath.

Source

symath.lisp.

Function: denorm-expr-minus1 (e)
Package

symath.

Source

symath.lisp.

Function: denorm-expr-plus-n (e)
Package

symath.

Source

symath.lisp.

Function: denorm-expr-zop (e)
Package

symath.

Source

symath.lisp.

Function: equal-arg-sets (l1 l2)

Check if l1 and l2 are lists of the same sets of expressions

Package

symath.

Source

symath.lisp.

Function: equal-args (l1 l2)

Check if l1 and l2 are lists of the same expressions

Package

symath.

Source

symath.lisp.

Function: equal-dimsp (l)

Check if all arrays in l has the same dimensions

Package

symath.

Source

symath.lisp.

Function: equal-expr (e1 e2)

Check if e1 and e2 a the same exprs

Package

symath.

Source

symath.lisp.

Function: equal-expr-1 (e1 e2)

Check if e1 is -e2

Package

symath.

Source

symath.lisp.

Function: expand-expt1 (e)
Package

symath.

Source

symath.lisp.

Function: expand-expt2 (e)
Package

symath.

Source

symath.lisp.

Function: expand-mul (e)
Package

symath.

Source

symath.lisp.

Function: expr-weight (e &key weight max-weight)

Calculate a difficulty to calculate the expression e. If the weight exceeds max-weight, don’t calculate more.

Package

symath.

Source

symath.lisp.

Function: extract-nums (e)
Package

symath.

Source

symath.lisp.

Function: filter-func (f l &optional invrs)
Package

symath.

Source

symath.lisp.

Function: isfunc (f e)
Package

symath.

Source

symath.lisp.

Function: map-array (lam &rest arrs)

Like #’mapcar, but for arrays

Package

symath.

Source

symath.lisp.

Function: math-rec-funcall (fn arg &optional deep)

Call the function fn recursively

Package

symath.

Source

symath.lisp.

Function: mequal (a b)
Package

symath.

Source

symath.lisp.

Function: mintegerp (x)
Package

symath.

Source

symath.lisp.

Function: norm-expr (e)
Package

symath.

Source

symath.lisp.

Function: simplify-expr2 (e)
Package

symath.

Source

symath.lisp.

Function: simplify-expr3 (g2 &optional g0)
Package

symath.

Source

symath.lisp.

Function: sqr (x)

Multiple argument by itself. Works for vectors too!

Package

symath.

Source

symath.lisp.

Function: tick ()
Package

symath.

Source

symath.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   A   B   C   D   E   F   G   I   M   N   S   T  
Index Entry  Section

A
all-arraysp: Private ordinary functions
all-bins: Private ordinary functions
all-list-decs: Private ordinary functions
array-multiply: Public generic functions
array-multiply: Public generic functions

B
boolp: Private ordinary functions

C
calc-arrays: Private ordinary functions
chain-func-rec: Private macros
clear-simplify-cache: Private ordinary functions
collect-common: Private ordinary functions
collect-common-nums: Private ordinary functions
collect-exprs: Private ordinary functions
collect-expt: Private ordinary functions
collect-one-common: Private ordinary functions
collect-same-expts: Private ordinary functions
copy-expr: Private ordinary functions

D
def-expr-cond: Private macros
defun-stable-expr: Private macros
denorm-expr: Private ordinary functions
denorm-expr-expt: Private ordinary functions
denorm-expr-minus: Private ordinary functions
denorm-expr-minus1: Private ordinary functions
denorm-expr-plus-n: Private ordinary functions
denorm-expr-zop: Private ordinary functions

E
equal-arg-sets: Private ordinary functions
equal-args: Private ordinary functions
equal-dimsp: Private ordinary functions
equal-expr: Private ordinary functions
equal-expr-1: Private ordinary functions
expand-expt1: Private ordinary functions
expand-expt2: Private ordinary functions
expand-mul: Private ordinary functions
expr-weight: Private ordinary functions
extract-nums: Private ordinary functions

F
filter-func: Private ordinary functions
Function, all-arraysp: Private ordinary functions
Function, all-bins: Private ordinary functions
Function, all-list-decs: Private ordinary functions
Function, boolp: Private ordinary functions
Function, calc-arrays: Private ordinary functions
Function, clear-simplify-cache: Private ordinary functions
Function, collect-common: Private ordinary functions
Function, collect-common-nums: Private ordinary functions
Function, collect-exprs: Private ordinary functions
Function, collect-expt: Private ordinary functions
Function, collect-one-common: Private ordinary functions
Function, collect-same-expts: Private ordinary functions
Function, copy-expr: Private ordinary functions
Function, denorm-expr: Private ordinary functions
Function, denorm-expr-expt: Private ordinary functions
Function, denorm-expr-minus: Private ordinary functions
Function, denorm-expr-minus1: Private ordinary functions
Function, denorm-expr-plus-n: Private ordinary functions
Function, denorm-expr-zop: Private ordinary functions
Function, equal-arg-sets: Private ordinary functions
Function, equal-args: Private ordinary functions
Function, equal-dimsp: Private ordinary functions
Function, equal-expr: Private ordinary functions
Function, equal-expr-1: Private ordinary functions
Function, expand-expt1: Private ordinary functions
Function, expand-expt2: Private ordinary functions
Function, expand-mul: Private ordinary functions
Function, expr-weight: Private ordinary functions
Function, extract-nums: Private ordinary functions
Function, filter-func: Private ordinary functions
Function, isfunc: Private ordinary functions
Function, map-array: Private ordinary functions
Function, math-rec-funcall: Private ordinary functions
Function, mequal: Private ordinary functions
Function, mintegerp: Private ordinary functions
Function, norm-expr: Private ordinary functions
Function, simplify: Public ordinary functions
Function, simplify-expr2: Private ordinary functions
Function, simplify-expr3: Private ordinary functions
Function, sqr: Private ordinary functions
Function, tick: Private ordinary functions

G
Generic Function, array-multiply: Public generic functions

I
if-let: Private macros
isfunc: Private ordinary functions

M
Macro, chain-func-rec: Private macros
Macro, def-expr-cond: Private macros
Macro, defun-stable-expr: Private macros
Macro, if-let: Private macros
map-array: Private ordinary functions
math-rec-funcall: Private ordinary functions
mequal: Private ordinary functions
Method, array-multiply: Public generic functions
mintegerp: Private ordinary functions

N
norm-expr: Private ordinary functions

S
simplify: Public ordinary functions
simplify-expr2: Private ordinary functions
simplify-expr3: Private ordinary functions
sqr: Private ordinary functions

T
tick: Private ordinary functions