Re: problem with very small numbers - g95 versus gfortran
- From: "James Van Buskirk" <not_valid@xxxxxxxxxxx>
- Date: Thu, 29 May 2008 00:08:01 -0600
"e p chandler" <epc8@xxxxxxxx> wrote in message
news:4222e3fc-6663-4fb2-b505-e2a30dfc3584@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
OK. Here it goes with G95:
C:\Users\epc\temp>g95 mega.f90
C:\Users\epc\temp>a
(2.5788508E+38,-2.5788508E+38)
(1.2030801E+38,-1.2030801E+38)
(+Inf,-Inf)
(6.355804891857543E+307,-6.355805169678616E+307)
(+Inf,-Inf)
(4.2063359488591517347E+4931,-4.2063361327239468925E+4931)
3.4028235E+38
1.7976931348623157E+308
1.189731495357231765E+4932
I have worried about writing a replacement for missing intrinsics
because if you're not careful intermediate calculations may
overflow even though the final result should be a model number.
I suppose I need not have worried so much considering that at
least for gcc-based compilers this kind of care is not taken for
the intrinsics in the first place. I speculate that you didn't
overflow for the single precision version because the single
precision overflow intermediate was never stored into memory
as a single precision number. In the x86_64 compilers the
computation is more likely to be carried out in SSE registers
where single-precision overflow really is overflow; there is no
15-bit exponent field in the xmm registers as there is in x87
registers.
--
write(*,*) transfer((/17.392111325966148d0,6.5794487871554595D-85, &
6.0134700243160014d-154/),(/'x'/)); end
.
- Follow-Ups:
- Re: problem with very small numbers - g95 versus gfortran
- From: Steven G. Kargl
- Re: problem with very small numbers - g95 versus gfortran
- References:
- problem with very small numbers - g95 versus gfortran
- From: e p chandler
- Re: problem with very small numbers - g95 versus gfortran
- From: James Van Buskirk
- Re: problem with very small numbers - g95 versus gfortran
- From: James Van Buskirk
- Re: problem with very small numbers - g95 versus gfortran
- From: e p chandler
- Re: problem with very small numbers - g95 versus gfortran
- From: James Van Buskirk
- Re: problem with very small numbers - g95 versus gfortran
- From: e p chandler
- problem with very small numbers - g95 versus gfortran
- Prev by Date: Re: problem with very small numbers - g95 versus gfortran
- Next by Date: Re: Slick or Slack
- Previous by thread: Re: problem with very small numbers - g95 versus gfortran
- Next by thread: Re: problem with very small numbers - g95 versus gfortran
- Index(es):
Relevant Pages
|