Re: Creating imaginary inf/nan in GCC

2009-02-04 Thread Kaveh R. Ghazi
From: Richard Guenther richard.guent...@gmail.com Thanks, I do want to test the middle-end. However I need to do more than just create the complex expression. I also have to pass it to a builtin that evaluates using MPC like __builtin_csin(). The fortran frontend evaluates complex

Re: Creating imaginary inf/nan in GCC

2009-01-31 Thread Richard Guenther
On Sat, Jan 31, 2009 at 5:26 AM, Kaveh R. Ghazi gh...@caip.rutgers.edu wrote: From: Tobias Burnus bur...@net-b.de 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

Re: Creating imaginary inf/nan in GCC

2009-01-31 Thread Kaveh R. Ghazi
From: Joseph S. Myers jos...@codesourcery.com On Thu, 29 Jan 2009, Kaveh R. GHAZI wrote: I don't think these results are a bug, rather it's just an artifact of the way complex multiplcation is done and having these special values in See bug 24581. Some aspects are a bug (GCC doesn't

Re: Creating imaginary inf/nan in GCC

2009-01-31 Thread Joseph S. Myers
On Sat, 31 Jan 2009, Kaveh R. Ghazi wrote: From: Joseph S. Myers jos...@codesourcery.com On Thu, 29 Jan 2009, Kaveh R. GHAZI wrote: I don't think these results are a bug, rather it's just an artifact of the way complex multiplcation is done and having these special values in

Re: Creating imaginary inf/nan in GCC

2009-01-30 Thread Kaveh R. Ghazi
From: Tobias Burnus bur...@net-b.de 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: !

Creating imaginary inf/nan in GCC

2009-01-29 Thread Kaveh R. GHAZI
Hi, 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). However when I write (_builtin_nan() * 1.0i) I get (nan + nan I). For (__builtin_inf() * 1.0i) I get (nan + inf I). I don't think these results are a bug, rather

Re: Creating imaginary inf/nan in GCC

2009-01-29 Thread Joseph S. Myers
On Thu, 29 Jan 2009, Kaveh R. GHAZI wrote: I don't think these results are a bug, rather it's just an artifact of the way complex multiplcation is done and having these special values in See bug 24581. Some aspects are a bug (GCC doesn't handle mixed real/complex arithmetic the way it

Re: Creating imaginary inf/nan in GCC

2009-01-29 Thread Tobias Burnus
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