Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

symdiff(3tcl) [debian man page]

symdiff(3tcl)						 Symbolic differentiation for Tcl					     symdiff(3tcl)

__________________________________________________________________________________________________________________________________________________

NAME
symdiff - Symbolic differentiation for Tcl SYNOPSIS
package require Tcl 8.5 package require grammar::aycock 1.0 package require math::calculus::symdiff 1.0 math::calculus::symdiff::symdiff expression variable math::calculus::jacobian variableDict _________________________________________________________________ DESCRIPTION
The math::calculus::symdiff package provides a symbolic differentiation facility for Tcl math expressions. It is useful for providing de- rivatives to packages that either require the Jacobian of a set of functions or else are more efficient or stable when the Jacobian is pro- vided. PROCEDURES
The math::calculus::symdiff package exports the two procedures: math::calculus::symdiff::symdiff expression variable Differentiates the given expression with respect to the specified variable. (See Expressions below for a discussion of the subset of Tcl math expressions that are acceptable to math::calculus::symdiff.) The result is a Tcl expression that evaluates the derivative. Returns an error if expression is not a well-formed expression or is not differentiable. math::calculus::jacobian variableDict Computes the Jacobian of a system of equations. The system is given by the dictionary variableDict, whose keys are the names of variables in the system, and whose values are Tcl expressions giving the values of those variables. (See Expressions below for a discussion of the subset of Tcl math expressions that are acceptable to math::calculus::symdiff. The result is a list of lists: the i'th element of the j'th sublist is the partial derivative of the i'th variable with respect to the j'th variable. Returns an error if any of the expressions cannot be differentiated, or if variableDict is not a well-formed dictionary. EXPRESSIONS
The math::calculus::symdiff package accepts only a small subset of the expressions that are acceptable to Tcl commands such as expr or if. Specifically, the only constructs accepted are: o Floating-point constants such as 5 or 3.14159e+00. o References to Tcl variable using $-substitution. The variable names must consist of alphanumerics and underscores: the ${...} nota- tion is not accepted. o Parentheses. o The +, -, *, /. and ** operators. o Calls to the functions acos, asin, atan, atan2, cos, cosh, exp, hypot, log, log10, pow, sin, sinh. sqrt, tan, and tanh. Command substitution, backslash substitution, and argument expansion are not accepted. EXAMPLES
math::calculus::symdiff::symdiff {($a*$x+$b)*($c*$x+$d)} x ==> (($c * (($a * $x) + $b)) + ($a * (($c * $x) + $d))) math::calculus::symdiff::jacobian {x {$a * $x + $b * $y} y {$c * $x + $d * $y}} ==> {{$a} {$b}} {{$c} {$d}} BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category math :: calculus of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. SEE ALSO
math::calculus, math::interpolate COPYRIGHT
Copyright (c) 2010 by Kevin B. Kenny <kennykb@acm.org> Redistribution permitted under the terms of the Open Publication License <http://www.opencontent.org/openpub/> math 1.0 symdiff(3tcl)

Check Out this Related Man Page

math(n) 							 Tcl Math Library							   math(n)

__________________________________________________________________________________________________________________________________________________

NAME
math - Tcl Math Library SYNOPSIS
package require Tcl 8.2 package require math ?1.2.5? ::math::cov value value ?value ...? ::math::integrate list of xy value pairs ::math::fibonacci n ::math::max value ?value ...? ::math::mean value ?value ...? ::math::min value ?value ...? ::math::product value ?value ...? ::math::random ?value1? ?value2? ::math::sigma value value ?value ...? ::math::stats value value ?value ...? ::math::sum value ?value ...? _________________________________________________________________ DESCRIPTION
The math package provides utility math functions. Besides a set of basic commands, available via the package math, there are more specialised packages: o math::bigfloat - Arbitrary-precision floating-point arithmetic o math::bignum - Arbitrary-precision integer arithmetic o math::calculus::romberg - Robust integration methods for functions of one variable, using Romberg integration o math::calculus - Integration of functions, solving ordinary differential equations o math::combinatorics - Procedures for various combinatorial functions (for instance the Gamma function and "k out of n") o math::complexnumbers - Complex number arithmetic o math::constants - A set of well-known mathematical constants, such as Pi, E, and the golden ratio o math::fourier - Discrete Fourier transforms o math::fuzzy - Fuzzy comparisons of floating-point numbers o math::geometry - 2D geometrical computations o math::interpolate - Various interpolation methods o math::linearalgebra - Linear algebra package o math::optimize - Optimization methods o math::polynomials - Polynomial arithmetic (includes families of classical polynomials) o math::rationalfunctions - Arithmetic of rational functions o math::roman - Manipulation (including arithmetic) of Roman numerals o math::special - Approximations of special functions from mathematical physics o math::statistics - Statistical operations and tests BASIC COMMANDS
::math::cov value value ?value ...? Return the coefficient of variation expressed as percent of two or more numeric values. ::math::integrate list of xy value pairs Return the area under a "curve" defined by a set of x,y pairs and the error bound as a list. ::math::fibonacci n Return the n'th Fibonacci number. ::math::max value ?value ...? Return the maximum of one or more numeric values. ::math::mean value ?value ...? Return the mean, or "average" of one or more numeric values. ::math::min value ?value ...? Return the minimum of one or more numeric values. ::math::product value ?value ...? Return the product of one or more numeric values. ::math::random ?value1? ?value2? Return a random number. If no arguments are given, the number is a floating point value between 0 and 1. If one argument is given, the number is an integer value between 0 and value1. If two arguments are given, the number is an integer value between value1 and value2. ::math::sigma value value ?value ...? Return the population standard deviation of two or more numeric values. ::math::stats value value ?value ...? Return the mean, standard deviation, and coefficient of variation (as percent) as a list. ::math::sum value ?value ...? Return the sum of one or more numeric values. BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category math of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. KEYWORDS
math, statistics CATEGORY
Mathematics math 1.2.5 math(n)
Man Page