1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 10:01:11 +02:00

34253: warn in zcalc doc about integer arithmetic.

C.f. warning in arithmetic doc in 34194.
This commit is contained in:
Peter Stephenson 2015-01-12 11:10:07 +00:00
parent 2753d49003
commit 626650f20e
2 changed files with 17 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2015-01-12 Peter Stephenson <p.stephenson@samsung.com>
* 34253: Doc/Zsh/contrib.yo: warning on integer arithmetic
for zcalc, c.f. 34194.
2015-01-11 Barton E. Schaefer <schaefer@zsh.org>
* 34247: Test/C01arith.ztst: regression test for 34230.

View file

@ -3227,8 +3227,18 @@ A reasonably powerful calculator based on zsh's arithmetic evaluation
facility. The syntax is similar to that of formulae in most programming
languages; see
ifzman(the section `Arithmetic Evaluation' in zmanref(zshmisc))\
ifnzman(noderef(Arithmetic Evaluation)) for details. The mathematical
library tt(zsh/mathfunc) will be loaded if it is available; see
ifnzman(noderef(Arithmetic Evaluation)) for details.
Non-programmers should note that, as in many other programming
languages, expressions involving only integers (whether constants
without a `tt(.)', variables containing such constants as strings, or
variables declared to be integers) are by default evaluated using
integer arithmetic, which is not how an ordinary desk calculator
operates. To force floating point operation, pass the option tt(-f);
see further notes below.
The mathematical library tt(zsh/mathfunc) will be loaded if it is
available; see
ifzman(the section `The zsh/mathfunc Module' in zmanref(zshmodules))\
ifnzman(noderef(The zsh/mathfunc Module)). The mathematical functions
correspond to the raw system libraries, so trigonometric functions are