This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Creating imaginary inf/nan in GCC
- From: Tobias Burnus <burnus at net-b dot de>
- To: "Kaveh R. GHAZI" <ghazi at caip dot rutgers dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 29 Jan 2009 18:03:20 +0100
- Subject: Re: Creating imaginary inf/nan in GCC
- References: <Pine.GSO.4.58.0901291055280.12714@caipclassic.rutgers.edu>
Hi Kaveh,
Kaveh R. GHAZI wrote:
> I'm trying to create complex number expressions that contain inf or
> nan in the imaginary part. I.e. (0 + inf I) or (0 + nan I).
If it does not need to be C (e.g. to try MPC in the middle end), you
could use Fortran:
! compile with gfortran -fno-range-check
complex :: z
z = cmplx(0.0, 0.0/0.0)
print *, z
end
Tobias