[flang] Fix folding of EPSILON()
authorPeter Klausler <pklausler@nvidia.com>
Fri, 29 Oct 2021 20:00:43 +0000 (13:00 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Mon, 8 Nov 2021 18:50:28 +0000 (10:50 -0800)
commit333b419ad00a5ca7eb6bd4d8c7db49f93c83d694
tree512d9e31c5c8829a308e86d01fe9184e89dd4356
parentc499d690cdb7ead72bcd086b08328a6d3a91b682
[flang] Fix folding of EPSILON()

The value of EPSILON() was off by one power of two due to my
misreading of the standard; this patch corrects it.
Confirmed by checking other Fortran compilers, which all agree.

Differential Revision: https://reviews.llvm.org/D113308
flang/include/flang/Evaluate/real.h
flang/test/Evaluate/folding07.f90