home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / sgi / 12317 < prev    next >
Encoding:
Text File  |  1992-08-12  |  1.5 KB  |  37 lines

  1. Newsgroups: comp.sys.sgi
  2. Path: sparky!uunet!usc!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uimrl7.mrl.uiuc.edu!ercolessi
  3. From: ercolessi@uimrl7.mrl.uiuc.edu (furio ercolessi)
  4. Subject: Re: Binary File: SGI <-> IBM
  5. References:  <1157@deere.com>
  6. Message-ID: <Bswq8I.LJt@news.cso.uiuc.edu>
  7. Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
  8. Reply-To: ercolessi@uimrl7.mrl.uiuc.edu (furio ercolessi)
  9. Organization: MRL - UIUC
  10. Date: Thu, 13 Aug 1992 05:36:16 GMT
  11. Lines: 24
  12.  
  13. In article <1157@deere.com>, jrh@de.deere.com (John R. Howell) writes:
  14. |>I have a binary file created with C fwrites and read with C freads.
  15. |>
  16. |>If I create this on an SGI (IRIX) and read it with an IBM RS6000, I seem to
  17. |>read everything ok, but my floating point numbers don't make sense. If
  18. |>I go the other way (IBM -> SGI) a similar thing happens.
  19. |>
  20. |>Apparently the integers are read correctly ...
  21. |>
  22. |>OK ... I have apparently stumbled upon a difference in floating point
  23. |>formats between the different machines.
  24.  
  25. Fortran 'unformatted' files (which are binary) are shared without
  26. problems between IBMs, SGIs, HPs, Suns and DECstations (the 
  27. latter only with a magic compiler option).  All these machines have
  28. IEEE arithmetics.
  29. So the source of your problem must be a more subtle one
  30. (and I have no ideas).
  31. furio
  32. --
  33. Furio Ercolessi
  34. Materials Research Laboratory           |   Intl School for Advanced Studies
  35. Univ. of Illinois at Urbana-Champaign   |   Trieste, Italy
  36. furio@uiuc.edu                          |   furio@sissa.it
  37.