2 -- Origin: Laurent Guerby <laurent@guerby.net>
5 -- { dg-options "-O2" }
7 package body Boolean_Expr1
is
9 function Long_Float_Is_Valid
(X
: in Long_Float) return Boolean is
10 Is_Nan
: constant Boolean := X
/= X
;
11 Is_P_Inf
: constant Boolean := X
> Long_Float'Last;
12 Is_M_Inf
: constant Boolean := X
< Long_Float'First;
13 Is_Invalid
: constant Boolean := Is_Nan
or Is_P_Inf
or Is_M_Inf
;
15 return not Is_Invalid
;
16 end Long_Float_Is_Valid
;
18 function S
(V
: in Long_Float) return String is
20 if not Long_Float_Is_Valid
(V
) then