fish-shell/tests/math.out
ridiculousfish d2bee105c9 Default math scale to 6
This changes the behavior of builtin math to floating point by default.
If the result of a computation is an integer, then it will be printed as an
integer; otherwise it will be printed as a floating point decimal with up to
'scale' digits past the decimal point (default is 6, matching printf).
Trailing zeros are trimmed. Values are rounded following printf semantics.

Fixes #4478
2018-08-04 15:32:09 -07:00

42 lines
388 B
Plaintext

####################
# Validate basic expressions
1.5
1.666667
2
1
1.667
4
4
2
0.5
49
0
4
-10
-2
-8
####################
# Validate some integral computations
1
10
100
1000
1000000000000000
100000000000000
-1000000000000000
0
2
500000000000000
####################
# Validate how variables in an expression are handled
1
2
-4.5
-4
####################
# Validate math error reporting