home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / sgi / misc / 41 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  3.0 KB

  1. Xref: sparky comp.sys.sgi.misc:41 comp.sys.sgi.bugs:16 comp.sys.sgi:18184
  2. Newsgroups: comp.sys.sgi.misc,comp.sys.sgi.bugs,comp.sys.sgi
  3. Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!utcsri!helios.physics.utoronto.ca!sysmark
  4. From: sysmark@helios.physics.utoronto.ca (Mark Bartelt)
  5. Subject: any update on plans for {fortran,C} support of 128-bit floats?
  6. Message-ID: <BzGLB0.90v@helios.physics.utoronto.ca>
  7. Sender: news@helios.physics.utoronto.ca (News Administrator)
  8. Reply-To: mark@cita.toronto.edu
  9. Organization: University of Toronto Physics/Astronomy/CITA
  10. Date: Fri, 18 Dec 1992 14:23:23 GMT
  11. Lines: 51
  12.  
  13. Nearly a year ago I groused a bit about the fact that neither C nor
  14. fortran (under IRIX 4.0.x) support 128-bit floats, and that (worse!)
  15. the two languages' implementations of non-support are incompatible
  16. with each other.  At the time, I wrote ...
  17.  
  18. | The C Language Reference Manual says:
  19. |         ANSI C adds "long double", which is the same as "double"
  20. |         in this implementation.
  21. | The Fortran 77 Language Reference Manual says:
  22. |         When the compiler encounters a REAL*16 declaration, it
  23. |         issues a warning message.  REAL*16 items are allocated
  24. |         16 bytes of storage per element, but only the first
  25. |         eight bytes of each element are used; those eight bytes
  26. |         are interpreted according to the format for REAL*8
  27. |         floating numbers.
  28. | What this means is that if one ports a mixed-language application
  29. | from some system that does support quad-precision floating point,
  30. | and a fortran common block with real*16 variables is accessed by
  31. | some C function which accesses the common block via a struct which
  32. | has "long double" variables matching the real*16 fortran variables,
  33. | things will be misaligned.
  34.  
  35. At the time, I asked a number of questions about the future of support
  36. (or lack of same) for 128-bit floats.  I didn't save the replies, but
  37. I recall that there was a vague "we're looking at it, but there aren't
  38. any firm commitments at this time" sort of response.  Since it's been
  39. nearly a year since then, I'd like to re-ask a couple of them:
  40.  
  41. --  Will IRIX 5.0 (or, even an earlier release) support "real*16" under
  42. fortran, and "long double" (== 16-byte) under C?
  43.  
  44. --  If not, would you at least be willing to provide a flag to cc, so
  45. that we can force sizeof(long double) to be 16 rather than 8?  This
  46. would be a big help in porting large mixed-language applications that
  47. use "real*16" in fortran and "long double" in C.
  48.  
  49. --  And if 5.0 won't support it, when *will* we get it?  There *are*
  50. applications which could make good use of this sort of precision.  And
  51. availability of 128-bit float support (or lack of same) just might be
  52. a factor in future purchasing decisions ... (1/2 x :-)
  53.  
  54. Mark Bartelt                                              416/978-5619
  55. Canadian Institute for                           mark@cita.toronto.edu
  56. Theoretical Astrophysics                         mark@cita.utoronto.ca
  57.  
  58. "Clothes not busy being worn are busy drying." - Dylan, on laundry day
  59.          [ singing "It's all right, ma (I'm only bleaching)" ]
  60.