Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!utcsri!uthub!ecf!me!radio!cks@radio.toronto.edu From: cks@radio.toronto.edu Newsgroups: comp.sys.amiga Subject: Looking for general IFF floating point and coordinate point formats Message-ID: <561@radio.toronto.edu> Date: Wed, 4-Nov-87 21:21:58 EST Article-I.D.: radio.561 Posted: Wed Nov 4 21:21:58 1987 Date-Received: Sun, 8-Nov-87 07:20:42 EST Sender: cks@radio.toronto.edu Reply-To: cks@radio.toronto.edu (Chris Siebenmann) Organization: Newsreaders Anonymous Lines: 40 [Reposted due to news problems; I'm sorry if you see this twice.] We're working on an application that needs to save floating point data in an IFF file, and we want to make the floating point format as general as possible. Does such a standard way of representing floating point values in IFF files already exist? Does anyone have any ideas about what it should be? Thinking about it, we've come up with a few ideas: 1) Ascii, formated by sprintf. This has the advantage that it is easy to decode and encode, but we'd like something more compact. 2) ULONG value, WORD (or LONG) exponent, such that float = value * 2**exponent. This has the advantage of being relatively compact and easy to compute with standard C library routines, but it has problems with large values (like doubles). Large values aren't a problem for my application (it only uses floats) but we'd like to use a general format. 3) IEEE floating point format. This covers the entire range, is well-specified and compact, but it's hard encoding and decoding this (especially in portable code). We're also looking for/designing a format for points, and we're wondering what people would like, especially in terms of coordinate-system independence. How should we encode what one 'unit' in the coordinate space represents? Ideally, some of the FORMs we're working on will be usable for Draw-type programs where you want to specify dimensions in terms of some units, but our application uses pixel addressing. Also, is there already a structured graphics FORM, and if not what would people like to see in it? I will summarize mail followups if there is any interest. -- "Hey, that's why Dad moved to Colorado. He sits Zen now. Me, I like the mountains." Chris Siebenmann {allegra,mnetor,decvax,pyramid}!utgpu!radio!cks cks@radio.toronto.edu or ...!utgpu!{yetti!lethe, darwin}!ontmoh!cks