You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[libc][complex] implement different flavors of creal and cimag functions (llvm#113300)
I have commented out the test for `neg_zero`(creal) because :
1. real(neg_zero + 0.0i) equals zero.
2. real(neg_zero - 0.0i) equals neg_zero.
I am not sure if this is the intended behaviour.
[EDIT]
I have updated tests for `neg_zero` (creal) to be :
```
EXPECT_FP_EQ(func(CFPT(neg_zero - zero * 1.0i)), neg_zero);
EXPECT_FP_EQ(func(CFPT(neg_zero + zero * 1.0i)), zero);
```
because all three [gcc, clang and GNU MPC] also give the same result.
https://godbolt.org/z/hxhcn6aof
and it seems that it is indeed the correct behaviour since Imaginary
types are not supported yet, refer llvm#113671
0 commit comments