home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / aix / 9374 < prev    next >
Encoding:
Text File  |  1992-09-03  |  5.2 KB  |  138 lines

  1. Newsgroups: comp.unix.aix
  2. Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!usenet.coe.montana.edu!news.u.washington.edu!milton.u.washington.edu!quantum
  3. From: quantum@milton.u.washington.edu (Tsung-lung Li)
  4. Subject: Floating-point underflow on IBM3090
  5. Message-ID: <1992Sep4.014404.9417@u.washington.edu>
  6. Sender: news@u.washington.edu (USENET News System)
  7. Reply-To: quantum@u.washington.edu
  8. Organization: University of Washington, Seattle
  9. Distribution: na
  10. Date: Fri, 4 Sep 1992 01:44:04 GMT
  11. Lines: 125
  12.  
  13.  
  14. Dear Netters,
  15.  
  16. Here is a question about the VS fortran on IBM3090 running AIX/370.
  17.  
  18. I compiled and ran the following test program.
  19.  
  20.         program   tt
  21.         double precision  x, y
  22.         x = 1.0d-40
  23.         y = x * x
  24.         write(6,*) x, y
  25.         stop
  26.         end
  27.  
  28. The compilation command I used was "fvs -f'optimize(3)' -o tt tt.f".
  29. The followings are what the computer responds.
  30.  
  31. 0AFB208I VFNTH : PROGRAM INTERRUPT - FLOATING-POINT UNDERFLOW EXCEPTION
  32.          VFNTH : PSW 07ED1200001001A2, REGISTER CONTAINS 7E4BE2B05D35848D0000000
  33. 000000000
  34.          VFNTH : LAST EXECUTED FORTRAN STATEMENT IN PROGRAM TT (OFFSET 00000072)
  35. .
  36. 0TRACEBACK OF CALLING ROUTINES; MODULE ENTRY ADDRESS = 00100130.
  37.  -----------------------------------------------------------------------------
  38.   TT (00100130) CALLED BY OPERATING SYSTEM.
  39.  -----------------------------------------------------------------------------
  40. 0STANDARD CORRECTIVE ACTION TAKEN. EXECUTION CONTINUING.
  41.   0.100000000000000001E-39  0.000000000000000000E+00 
  42. 0 MESSAGE SUMMARY: MESSAGE NUMBER - COUNT          
  43.  
  44.  
  45. I learned from page 404 of "VS FORTRAN Version 2 Language and Library Reference
  46. Release 5(SC26-4221-7)" that the message appears because (1.0d-40)**2 is 
  47. less than
  48. the underflow limit(5.4d-79).  I wonder if there is any way to get rid of the
  49. message given by he computer.
  50.  
  51. When underflow arithmatics occures, isn't it true that the number is simply
  52. taken as zero?  Why does the IBM machine complains about this?
  53.  
  54. Any comments on this issue will be appreciated.  Please e-mail me at 
  55.     quantum@u.washington.edu
  56.  
  57.  
  58. Sincerely,
  59.  
  60. Tsung
  61.  
  62. PS.  The above question of mine was initiated by a subroutine in LAPACK
  63. I am trying to call.  The subroutine is DLAMCH and is not included in this
  64. message.   
  65.  
  66. The following is my test program.
  67.  
  68.       program dlamchtest
  69.       external  dlamch
  70.       print *, 'e', dlamch('e')
  71.       print *, 's', dlamch('s')
  72.       print *, 'b', dlamch('b')
  73.       print *, 'p', dlamch('p')
  74.       print *, 'n', dlamch('n')
  75.       print *, 'r', dlamch('r')
  76.       print *, 'm', dlamch('m')
  77.       print *, 'u', dlamch('u')
  78.       print *, 'l', dlamch('l')
  79.       print *, 'o', dlamch('o')
  80.       stop
  81.       end
  82.  
  83. After giving me the following message a few times, the computer evetually
  84. get the results right.
  85.  
  86. The message given by the IBM3090:
  87.  
  88. AFB208I VFNTH : PROGRAM INTERRUPT - FLOATING-POINT UNDERFLOW EXCEPTION
  89.          VFNTH : PSW 07ED1200001015D0, REGISTER CONTAINS 7F100000000000000000000
  90. 000000000
  91.          VFNTH : LAST EXECUTED FORTRAN STATEMENT IN PROGRAM DLAMC4 (OFFSET 00000
  92. 128).
  93. 0TRACEBACK OF CALLING ROUTINES; MODULE ENTRY ADDRESS = 00100138.
  94.  -----------------------------------------------------------------------------
  95.   DLAMC4 (001014A8) CALLED BY DLAMC2 (00100D90) AT OFFSET 00000286.
  96.    ARGUMENT LIST AT 007FF818.
  97.      ARG. NO.   ADDRESS          INTEGER        REAL        CHAR   HEXADECIMAL
  98.            1   007FF8B8 :            -64   -0.723698E+76   '....'   FFFFFFC0
  99.            2   007FF888 :     1091567616    0.100000E+01   'A...'   41100000
  100.            3   00200ACC :             16    0.000008E-78   '....'   00000010
  101.  -----------------------------------------------------------------------------
  102.   DLAMC2 (00100D90) CALLED BY DLAMCH (00100538) AT OFFSET 00000098.
  103.    ARGUMENT LIST AT 007FF9F8.
  104.      ARG. NO.   ADDRESS          INTEGER        REAL        CHAR   HEXADECIMAL
  105.            1   007FFA4C :        1136156    0.584843E-78   '..V.'   0011561C
  106.            2   007FFA40 :        1116516    0.574733E-78   '...d'   00110964
  107.            3   007FFA50 :        1127532    0.580404E-78   '..4l'   0011346C
  108.            4   00200848 :              0    0.000000E+00   '....'   00000000
  109.            5   007FFA44 :        8387080    0.431730E-77   '....'   007FFA08
  110.            6   00200830 :              0    0.000000E+00   '....'   00000000
  111.            7   007FFA48 :     1074858444    0.665557E-01   '@...'   401109CC
  112.            8   00200838 :              0    0.000000E+00   '....'   00000000
  113.  -----------------------------------------------------------------------------
  114.   DLAMCH (00100538) CALLED BY DLAMEST (00100138) AT OFFSET 0000008E.
  115.    ARGUMENT LIST AT 007FFB78.
  116.      ARG. NO.   ADDRESS          INTEGER        REAL        CHAR   HEXADECIMAL
  117.            1   00200751 :     1702887424    0.178406E+45   'e...'   65800000
  118.  -----------------------------------------------------------------------------
  119.   DLAMEST (00100138) CALLED BY OPERATING SYSTEM.
  120.  -----------------------------------------------------------------------------
  121. 0STANDARD CORRECTIVE ACTION TAKEN. EXECUTION CONTINUING.
  122.  
  123.  
  124. The results given by the computer is
  125.  
  126.  s 0.138178697E-75 
  127.  b  16.0000000     
  128.  p 0.355271368E-14 
  129.  n  14.0000000     
  130.  r 0.000000000E+00 
  131.  m -64.0000000     
  132.  u 0.539760535E-78 
  133.  l  63.0000000     
  134.  o 0.723700515E+76 
  135.  
  136.  
  137. Any idea to fix this?
  138.