mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-05 00:03:27 +08:00
Clarify math documentation
The words "rounded down" here get us into some trouble.
This commit is contained in:
parent
f9786673e3
commit
39fbc27d8d
@ -36,7 +36,7 @@ The following options are available:
|
|||||||
**-s** *N* or **--scale** *N*
|
**-s** *N* or **--scale** *N*
|
||||||
Sets the scale of the result.
|
Sets the scale of the result.
|
||||||
``N`` must be an integer or the word "max" for the maximum scale.
|
``N`` must be an integer or the word "max" for the maximum scale.
|
||||||
A scale of zero causes results to be rounded down to the nearest integer.
|
A scale of zero causes results to be truncated, not rounded. Any non-integer component is thrown away.
|
||||||
So ``3/2`` returns ``1`` rather than ``2`` which ``1.5`` would normally round to.
|
So ``3/2`` returns ``1`` rather than ``2`` which ``1.5`` would normally round to.
|
||||||
This is for compatibility with ``bc`` which was the basis for this command prior to fish 3.0.0.
|
This is for compatibility with ``bc`` which was the basis for this command prior to fish 3.0.0.
|
||||||
Scale values greater than zero causes the result to be rounded using the usual rules to the specified number of decimal places.
|
Scale values greater than zero causes the result to be rounded using the usual rules to the specified number of decimal places.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user