Tcl Library Source Code
math - Tcl Math Library
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.

[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]

math(n) 1.2.5 tcllib "Tcl Math Library"

Name

math - Tcl Math Library

Description

The math package provides utility math functions.

Besides a set of basic commands, available via the package math, there are more specialised packages:

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 Trackers. Please also report any ideas for enhancements you may have for either package and/or documentation.

Category

Mathematics