URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [nan_inf_fmt.f90] - Rev 801
Go to most recent revision | Compare with Previous | Blame | View Log
!pr 12839- F2003 formatting of Inf /Nan! Modified for PR47434implicit nonecharacter*40 lcharacter*12 fmtreal zero, pos_inf, neg_inf, nanzero = 0.0! need a better way of generating these floating point! exceptional constants.pos_inf = 1.0/zeroneg_inf = -1.0/zeronan = zero/zero! check a field width = 0fmt = '(F0.0)'write(l,fmt=fmt)pos_infif (l.ne.'Inf') call abortwrite(l,fmt=fmt)neg_infif (l.ne.'-Inf') call abortwrite(l,fmt=fmt)nanif (l.ne.'NaN') call abort! check a field width < 3fmt = '(F2.0)'write(l,fmt=fmt)pos_infif (l.ne.'**') call abortwrite(l,fmt=fmt)neg_infif (l.ne.'**') call abortwrite(l,fmt=fmt)nanif (l.ne.'**') call abort! check a field width = 3fmt = '(F3.0)'write(l,fmt=fmt)pos_infif (l.ne.'Inf') call abortwrite(l,fmt=fmt)neg_infif (l.ne.'***') call abortwrite(l,fmt=fmt)nanif (l.ne.'NaN') call abort! check a field width > 3fmt = '(F4.0)'write(l,fmt=fmt)pos_infif (l.ne.' Inf') call abortwrite(l,fmt=fmt)neg_infif (l.ne.'-Inf') call abortwrite(l,fmt=fmt)nanif (l.ne.' NaN') call abort! check a field width = 7fmt = '(F7.0)'write(l,fmt=fmt)pos_infif (l.ne.' Inf') call abortwrite(l,fmt=fmt)neg_infif (l.ne.' -Inf') call abortwrite(l,fmt=fmt)nanif (l.ne.' NaN') call abort! check a field width = 8fmt = '(F8.0)'write(l,fmt=fmt)pos_infif (l.ne.'Infinity') call abortwrite(l,fmt=fmt)neg_infif (l.ne.' -Inf') call abortwrite(l,fmt=fmt)nanif (l.ne.' NaN') call abort! check a field width = 9fmt = '(F9.0)'write(l,fmt=fmt)pos_infif (l.ne.' Infinity') call abortwrite(l,fmt=fmt)neg_infif (l.ne.'-Infinity') call abortwrite(l,fmt=fmt)nanif (l.ne.' NaN') call abort! check a field width = 14fmt = '(F14.0)'write(l,fmt=fmt)pos_infif (l.ne.' Infinity') call abortwrite(l,fmt=fmt)neg_infif (l.ne.' -Infinity') call abortwrite(l,fmt=fmt)nanif (l.ne.' NaN') call abortend
Go to most recent revision | Compare with Previous | Blame | View Log
