quich icon indicating copy to clipboard operation
quich copied to clipboard

Test failing on sqrt(-2)

Open b1shtream opened this issue 3 years ago • 1 comments

sqrt(-2)=nan, but got -nan

Output-

[root@0d8b3edcaf56 quich]# make test && ./quich_test
gcc -o quich_test src/helper.c src/parser.c src/lexer.c src/variable.c lib/linenoise.c tests/main.c -lm
success -> 9
success -> (3+2)
success -> (3+2)-1
success -> 5--2
success -> a=1;4+a
success -> a=20;a+1
success -> 5+(cos(2)-2)^2
success -> 5+PI
success -> 6+GR
success -> a=12;b=a;a+b+1
success -> sin(1)+cos(2)+tan(3)
success -> abs(-53 + 2)
success -> floor(4.8)+ceil(0.3)
success -> log(2)
success -> sqrt(1+0.5+0.5)
failure -> sqrt(-2)
  Expected 'nan' got '-nan'.
success -> 0.123456
success -> sin(90)

Failed tests: 1.```

b1shtream avatar Sep 09 '22 18:09 b1shtream

I would like to work on the above issue.

b1shtream avatar Sep 09 '22 18:09 b1shtream