mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 09:39:52 +08:00
d97c22df2d
This makes it easy for the user to request floating point output with the desired number of digits after the decimal point (not to be confused with significant digits). Note that this is just a thin wrapper so someone can say `math -s3 10 / 3` rather than `math "scale=3; 10 /3"`. Resolves #1643
10 lines
125 B
Fish
10 lines
125 B
Fish
math 3 / 2
|
|
math 10/6
|
|
math -s0 10 / 6
|
|
math -s3 10/6
|
|
math '10 % 6'
|
|
math -s0 '10 % 6'
|
|
math '23 % 7'
|
|
math -s6 '5 / 3 * 0.3'
|
|
true
|