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