1 ! RUN: %python %S/test_folding.py %s %flang_fc1
2 ! Tests folding of SPACING() and RRSPACING
4 logical, parameter :: test_1
= spacing(3.0) == scale(1.0, -22)
5 logical, parameter :: test_2
= spacing(-3.0) == scale(1.0, -22)
6 logical, parameter :: test_3
= spacing(3.0d0) == scale(1.0, -51)
7 logical, parameter :: test_4
= spacing(0.) == tiny(0.)
8 logical, parameter :: test_5a
= spacing(tiny(0.)) == tiny(0.)
9 logical, parameter :: test_5b
= spacing(tiny(0.)/2) == tiny(0.)
10 logical, parameter :: test_5c
= spacing(tiny(0.)*2) == tiny(0.)
11 logical, parameter :: test_6
= spacing(8388608.) == 1.
12 logical, parameter :: test_7
= spacing(spacing(tiny(.0))) == tiny(0.)
13 logical, parameter :: test_11
= rrspacing(3.0) == scale(0.75, 24)
14 logical, parameter :: test_12
= rrspacing(-3.0) == scale(0.75, 24)
15 logical, parameter :: test_13
= rrspacing(3.0d0) == scale(0.75, 53)
16 logical, parameter :: test_14
= rrspacing(0.) == 0.