logical function IsInfinity(x)
integer(4) class_x

class_x = fp_class(x)
IsInfinity = (class_x .eq. '00000002'X .or. class_x .eq. '00000003'X)

end