This manual page is for Mac OS X version 10.6.3

If you are running a different version of Mac OS X, view the documentation locally:

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • For more information about the manual page format, see the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Reference Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.




math(n)                                       Tcl Math Library                                       math(n)



____________________________________________________________________________________________________________

NAME
       math - Tcl Math Library

SYNOPSIS
       package require Tcl  8.2

       package require math  ?1.2.4?

       ::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:

             math::bigfloat - Arbitrary-precision floating-point arithmetic

             math::bignum - Arbitrary-precision integer arithmetic

             math::calculus::romberg - Robust integration methods for  functions  of  one  variable,  using
              Romberg integration

             math::calculus - Integration of functions, solving ordinary differential equations

             math::combinatorics  -  Procedures for various combinatorial functions (for instance the Gamma
              function and "k out of n")

             math::complexnumbers - Complex number arithmetic

             math::constants - A set of well-known mathematical constants, such as Pi, E,  and  the  golden
              ratio

             math::fourier - Discrete Fourier transforms

             math::fuzzy - Fuzzy comparisons of floating-point numbers

             math::geometry - 2D geometrical computations

             math::interpolate - Various interpolation methods

             math::linearalgebra - Linear algebra package

             math::optimize - Optimization methods

             math::polynomials - Polynomial arithmetic (includes families of classical polynomials)

             math::rationalfunctions - Arithmetic of rational functions

             math::roman - Manipulation (including arithmetic) of Roman numerals

             math::special - Approximations of special functions from mathematical physics

             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://source-
       forge.net/tracker/?group_id=12883].  Please also report any ideas for enhancements you may  have  for
       either package and/or documentation.

KEYWORDS
       math, statistics



math                                                1.2.4                                            math(n)

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation to the Tcl project.
Bug reports
Report bugs in the functionality of the described tool or API to Apple through Bug Reporter and to the Tcl project through their bug reporting page.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.

Did this document help you? Yes It's good, but... Not helpful...