Results for ysh-int-float.test.sh

statusosh
pass 8
FAIL 3
total11
caseoshdescription
0pass Float Literals with e-1
1pass Float Literal with _
2FAIL Period requires digit on either side, not 5. or .5
details
3FAIL Big float Literals with _
details
4FAIL Big floats like 1e309 and -1e309 go to Inf / -Inf
details
5pass Tiny floats go to zero
6pass floatEquals() INFINITY NAN
7pass pretty print INFINITY, -INFINITY, NAN
8pass can't convert NAN, INFINITY to integer
9pass Regression: 1/3 gives 0.3+
10pass Number of digits in 1/3
8 passed, 0 OK, 0 not implemented, 0 BUG, 3 failed, 0 timeouts, 0 cases skipped
3 failed under osh

Details on runs that didn't PASS

osh2 Period requires digit on either side, not 5. or .5

[osh stdout] Expected '0.5\n5.0\n' Got ''

stdout:
stderr: 
  echo $[0.5]
          ^
[ stdin ]:1: Unexpected token while parsing arithmetic: '.'
osh3 Big float Literals with _

[osh stdout] Expected '42000.0005\n420000.005\n4200.00005\n' Got ''
[osh status] Expected 0 Got 2

stdout:
stderr: 
  echo $[42_000.000_500]
               ^
[ stdin ]:1: Unexpected token while parsing arithmetic: '.'
osh4 Big floats like 1e309 and -1e309 go to Inf / -Inf

[osh stdout] Expected 'inf\n-inf\n' Got ''
[osh status] Expected 0 Got 1

stdout:
stderr: 
  echo $[1e309]
         ^
[ stdin ]:1: fatal: Invalid integer constant '1e309'