This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

re: ARGH. Who wrote intrinsic_set_exponent.f90?


Steve,

> Who wrote this test?

One member of our group (CCRG) wrote this.

>  It is using nonconforming code, and
> gfortran's handling of BOZ constants does not do what 
> you think.

Could you explain more about "nonconforming"? I tested it on i686, ia64
platform and gfortran works well with it. And from
http://gcc.gnu.org/ml/gcc-testresults/2006-08/msg01238.html I don't see it
failed on ppc.

>  Here's a excerpt of the brokeness.

>   subroutine test_real4()
>     real x,y
>     integer i,n
>     equivalence(x,i)
>     n = 128
>     i = o'00037777777'       ! <-- This doesn't do what you think.
>     y = set_exponent (x, n)  ! <-- This is nonconforming.
>     if (exponent (y) .ne. n) call abort()
>   end subroutine

In the test, we want to build an IEEE-754 denormalized floating-point number
with its exponent -127. i shared the same memory with x. We assign
o'00037777777' to i. Then x's sign field is 0 (bit 31), exponent bits are all 0
(bit 30-23) and significand bits are all 1 (bit 22-0).

 It tests if set_exponent handles denormalized floating-point correctly.

Feng Wang


	

	
		
___________________________________________________________ 
Mp3疯狂搜-新歌热歌高速下
http://music.yahoo.com.cn/?source=mail_mailbox_footer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]