|
|
In article <405df651@news.povray.org>,
"Thorsten Froehlich" <tho### [at] trfde> wrote:
> When and where did I say something about "a simple ratio", and why should I?
Looking back on your message, you didn't mention fractions...I somehow
thought you were talking about storing floats as dividend and divisor.
Sorry about that...
> You are missing that fraction and exponent are integers, and "conversion" to
> a less precise representation either yields an overflow/underflow or a
> match. Nothing else happens in hardware when dealing with single and double
> precision floats, in fact. If you want to do no work at all, just define
> the fraction as 64 bit integer and the exponent as 16 bit integer. Then you
> just shift to get your favorite floating-point representation. Double both
> and you can even support 128 bit IEEE 754 floats easily! Not to mention the
> old VAX float format uses exactly the same concept.
Right, but there's no built-in mechanism for handling this. If you want
to use 128-bit IEEE754 floats, you have to write IEEE754 floats...
> All you did was fall for the pseudo benefits frequently mentioned by XML
> advocates.
I didn't fall for anything. I'm simply explaining why text formats are
so often used, in response to Warp's "Why not make a compact binary
format instead?": it's easier to just use existing functions than write
new ones that do what you need. In other words, laziness...and harmless
because the files are small. Sometimes it's just stupidity...that's the
only reason I can think of for XML being what it is, and for things like
SVG using it.
--
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/
Post a reply to this message
|
|