mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-12-29 16:25:35 +01:00
users/21256 + workers/37965: New math functions min(), max(), sum(), provided by a new autoloadable function 'zmathfunc'.
This commit is contained in:
parent
40b3d2a1f6
commit
f96a016728
4 changed files with 30 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
2016-02-16 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||
|
||||
* users/21256 + workers/37965: Doc/Zsh/contrib.yo,
|
||||
Doc/Zsh/mod_mathfunc.yo, Src/zsh.mdd: New math functions
|
||||
min(), max(), sum(), provided by a new autoloadable function
|
||||
'zmathfunc'.
|
||||
|
||||
2016-02-15 Eric Cook <llua@gmx.com>
|
||||
|
||||
* 37975: Completion/Unix/Command/_php: allow completion after
|
||||
|
|
|
@ -3796,6 +3796,23 @@ enditem()
|
|||
|
||||
See the comments in the function for a few extra tips.
|
||||
)
|
||||
findex(max)
|
||||
findex(min)
|
||||
findex(sum)
|
||||
findex(zmathfunc)
|
||||
xitem(tt(min+LPAR())var(arg)tt(, ...+RPAR()))
|
||||
xitem(tt(max+LPAR())var(arg)tt(, ...+RPAR()))
|
||||
xitem(tt(sum+LPAR())var(arg)tt(, ...+RPAR()))
|
||||
item(tt(zmathfunc))(
|
||||
The function tt(zmathfunc) defines the three mathematical functions
|
||||
tt(min), tt(max), and tt(sum). The functions tt(min) and tt(max) take
|
||||
one or more arguments. The function tt(sum) takes zero or more arguments.
|
||||
Arguments can be of different types (ints and floats).
|
||||
|
||||
Not to be confused with the tt(zsh/mathfunc) module, described in
|
||||
ifzman(the section `The zsh/mathfunc Module' in zmanref(zshmodules))\
|
||||
ifnzman(noderef(The zsh/mathfunc Module)).
|
||||
)
|
||||
findex(zmathfuncdef)
|
||||
item(tt(zmathfuncdef) [ var(mathfunc) [ var(body) ] ])(
|
||||
A convenient front end to tt(functions -M).
|
||||
|
|
|
@ -36,6 +36,11 @@ that it is therefore only useful immediately after a call to tt(gamma) or
|
|||
tt(lgamma). Note also that `tt(signgam+LPAR()RPAR())' and `tt(signgam)' are
|
||||
distinct expressions.
|
||||
|
||||
The functions tt(min), tt(max), and tt(sum) are defined not in this module
|
||||
but in the tt(zmathfunc) autoloadable function, described in
|
||||
ifzman(the section `Mathematical Functions' in zmanref(zshcontrib))\
|
||||
ifnzman(noderef(Mathematical Functions)).
|
||||
|
||||
The following functions take two floating point arguments: tt(copysign),
|
||||
tt(fmod), tt(hypot), tt(nextafter).
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ name=zsh/main
|
|||
link=static
|
||||
load=yes
|
||||
# load=static should replace use of alwayslink
|
||||
functions='Functions/Chpwd/* Functions/Exceptions/* Functions/Misc/* Functions/MIME/* Functions/Prompts/* Functions/VCS_Info/* Functions/VCS_Info/Backends/*'
|
||||
functions='Functions/Chpwd/* Functions/Exceptions/* Functions/Math/* Functions/Misc/* Functions/MIME/* Functions/Prompts/* Functions/VCS_Info/* Functions/VCS_Info/Backends/*'
|
||||
|
||||
nozshdep=1
|
||||
alwayslink=1
|
||||
|
|
Loading…
Reference in a new issue