diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/Makefile.in | 6 | ||||
-rw-r--r-- | Doc/Zsh/guide.yo | 4 | ||||
-rw-r--r-- | Doc/Zsh/mod_mapfile.yo | 2 | ||||
-rw-r--r-- | Doc/Zsh/mod_mathfunc.yo | 52 | ||||
-rw-r--r-- | Doc/Zsh/modules.yo | 5 |
5 files changed, 65 insertions, 4 deletions
diff --git a/Doc/Makefile.in b/Doc/Makefile.in index 6c6367526..d7673d0a1 100644 --- a/Doc/Makefile.in +++ b/Doc/Makefile.in @@ -59,7 +59,7 @@ Zsh/index.yo Zsh/intro.yo Zsh/invoke.yo Zsh/jobs.yo Zsh/metafaq.yo \ Zsh/modules.yo Zsh/mod_cap.yo \ Zsh/mod_clone.yo Zsh/mod_comp1.yo Zsh/mod_compctl.yo Zsh/mod_complist.yo \ Zsh/mod_deltochar.yo Zsh/mod_example.yo Zsh/mod_files.yo \ -Zsh/mod_mapfile.yo Zsh/mod_parameter.yo Zsh/mod_sched.yo \ +Zsh/mod_mapfile.yo Zsh/mod_mathfunc.yo Zsh/mod_parameter.yo Zsh/mod_sched.yo \ Zsh/mod_stat.yo Zsh/mod_zftp.yo Zsh/mod_zle.yo Zsh/options.yo \ Zsh/params.yo Zsh/prompt.yo Zsh/redirect.yo Zsh/restricted.yo \ Zsh/seealso.yo Zsh/zftpsys.yo Zsh/zle.yo @@ -135,8 +135,8 @@ zshmisc.1: Zsh/grammar.yo Zsh/redirect.yo Zsh/exec.yo Zsh/func.yo \ zshmodules.1: Zsh/modules.yo Zsh/mod_cap.yo Zsh/mod_clone.yo \ Zsh/mod_comp1.yo Zsh/mod_complist.yo Zsh/mod_compctl.yo \ Zsh/mod_deltochar.yo Zsh/mod_example.yo Zsh/mod_files.yo \ - Zsh/mod_mapfile.yo Zsh/mod_sched.yo Zsh/mod_stat.yo \ - Zsh/mod_zftp.yo Zsh/mod_zle.yo + Zsh/mod_mapfile.yo Zsh/mod_mathfunc.yo Zsh/mod_sched.yo \ + Zsh/mod_stat.yo Zsh/mod_zftp.yo Zsh/mod_zle.yo zshoptions.1: Zsh/options.yo diff --git a/Doc/Zsh/guide.yo b/Doc/Zsh/guide.yo index cc8fe0f7d..c9f97fad9 100644 --- a/Doc/Zsh/guide.yo +++ b/Doc/Zsh/guide.yo @@ -119,9 +119,13 @@ menu(The cap Module) menu(The clone Module) menu(The comp1 Module) menu(The compctl Module) +menu(The complist Module) menu(The deltochar Module) menu(The example Module) menu(The files Module) +menu(The mapfile Module) +menu(The mathfunc Module) +menu(The parameter Module) menu(The sched Module) menu(The stat Module) menu(The zftp Module) diff --git a/Doc/Zsh/mod_mapfile.yo b/Doc/Zsh/mod_mapfile.yo index e6c388823..ad8497027 100644 --- a/Doc/Zsh/mod_mapfile.yo +++ b/Doc/Zsh/mod_mapfile.yo @@ -1,4 +1,4 @@ -texinode(The mapfile Module)(The parameter Module)(The files Module)(Zsh Modules) +texinode(The mapfile Module)(The mathfunc Module)(The files Module)(Zsh Modules) sect(The mapfile Module) cindex(parameter, file access via) The tt(mapfile) module provides one special associative array parameter of diff --git a/Doc/Zsh/mod_mathfunc.yo b/Doc/Zsh/mod_mathfunc.yo new file mode 100644 index 000000000..bc69d2b20 --- /dev/null +++ b/Doc/Zsh/mod_mathfunc.yo @@ -0,0 +1,52 @@ +texinode(The mathfunc Module)(The parameter Module)(The mapfile Module)(Zsh Modules) +sect(The mathfunc Module) +cindex(functions, mathematical) +cindex(mathematical functions) +The tt(mathfunc) module provides standard mathematical functions for use when +evaluating mathematical formulae. The syntax agrees with normal C and +FORTRAN conventions, for example, + +example((( f = sin(0.3) ))) + +assigns the sine of 0.3 to the parameter f. + +Most functions take floating point arguments and return a floating point +value. However, any necessary conversions from or to integer type will be +performed automatically by the shell. Apart from tt(atan) with a second +argument and the tt(abs), tt(int) and tt(float) functions, all functions +behave as noted in the manual page for the corresponding C function, +except that any arguments out of range for the function in question will be +detected by the shell and an error reported. + +The following functions take a single floating point argument: tt(acos), +tt(acosh), tt(asin), tt(asinh), tt(atan), tt(atanh), tt(cbrt), tt(ceil), +tt(cos), tt(cosh), tt(erf), tt(erfc), tt(exp), tt(expm1), tt(fabs), +tt(floor), tt(gamma), tt(j0), tt(j1), tt(lgamma), tt(log), tt(log10), +tt(log1p), tt(logb), tt(sin), tt(sinh), tt(sqrt), tt(tan), tt(tanh), +tt(y0), tt(y1). The tt(atan) function can optionally take a second +argument, in which case it behaves like the C function tt(atan2). +The tt(ilogb) function takes a single floating point argument, but +returns an integer. + +The function tt(signgam) takes no arguments, and returns an integer, which +is the C variable of the same name, as described in manref(gamma)(3). Note +that it is therefore only useful immediately after a call to tt(gamma) or +tt(lgamma). Note also that `tt(signgam())' and `tt(signgam)' are distinct +expresssions. + +The following functions take two floating point arguments: tt(copysign), +tt(drem), tt(fmod), tt(hypot), tt(nextafter). + +The following take an integer first argument and a floating point second +argument: tt(jn), tt(yn). + +The following take a floating point first argument and an integer second +argument: tt(ldexp), tt(scalb). + +The function tt(abs) does not convert the type of its single argument; it +returns the absolute value of either a floating point number or an +integer. The functions tt(float) and tt(int) convert their arguments into +a floating point or integer value (by truncation) respectively. + +Note that the C tt(pow) function is available in ordinary math evaluation +as the `tt(**)' operator and is not provided here. diff --git a/Doc/Zsh/modules.yo b/Doc/Zsh/modules.yo index 12066b773..3f443b073 100644 --- a/Doc/Zsh/modules.yo +++ b/Doc/Zsh/modules.yo @@ -37,6 +37,9 @@ Some basic file manipulation commands as builtins. item(tt(mapfile))( Access to external files via a special associative array. ) +item(tt(mathfunc))( +Standard scientific functions for use in mathematical evaluations. +) item(tt(parameter))( Access to internal hash tables via special associative arrays. ) @@ -63,6 +66,7 @@ menu(The deltochar Module) menu(The example Module) menu(The files Module) menu(The mapfile Module) +menu(The mathfunc Module) menu(The parameter Module) menu(The sched Module) menu(The stat Module) @@ -78,6 +82,7 @@ includefile(Zsh/mod_deltochar.yo) includefile(Zsh/mod_example.yo) includefile(Zsh/mod_files.yo) includefile(Zsh/mod_mapfile.yo) +includefile(Zsh/mod_mathfunc.yo) includefile(Zsh/mod_parameter.yo) includefile(Zsh/mod_sched.yo) includefile(Zsh/mod_stat.yo) |