| Issue |
76326
|
| Summary |
[Flang] FRACTION of +/- Inf, REAL and DOUBLE PRECISION, returns NaN instead of +/- Inf
|
| Labels |
flang
|
| Assignees |
|
| Reporter |
chandankds
|
The intrinsic FRACTION should return Inf, not NaN, for Inf argument.
The Intel compiler returns Inf, GNU returns NaN.
```
Program test_fraction_inf
Real :: x
Real(Kind(1.d0)) :: y
x = Huge(x) ; y = Huge(y)
Call s(x,y)
Contains
Subroutine s(x,y)
Real :: x
Real(Kind(1.d0)) :: y
x = x + x; y = y + y
Print *, x,y ! expected Inf
Print *, Fraction(x), Fraction(y) ! expected Inf
x = -x ; y = -y
Print *, Fraction(x), Fraction(y) ! expected Inf
End Subroutine s
End Program Test_fraction_inf
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs