POV-Ray : Newsgroups : povray.general : Random thoughts about povray and xml : Re: Random thoughts about povray and xml Server Time
3 Aug 2024 14:11:10 EDT (-0400)
  Re: Random thoughts about povray and xml  
From: Thorsten Froehlich
Date: 21 Mar 2004 15:08:49
Message: <405df651@news.povray.org>
In article <cjameshuff-624FE6.13452321032004@news.povray.org> , Christopher
James Huff <cja### [at] earthlinknet>  wrote:

> Floating point numbers are a bit more than a simple ratio, they are
> usually a binary version of scientific notation. The most common form
> uses a sign bit, a normalized mantissa, and a biased exponent. The
> allocation of individual bits and the actual layout can vary.

When and where did I say something about "a simple ratio", and why should I?
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.

On the other hand, all architectures that used non-IEEE 754 float formats
are dead today, and the systems still out there are not used for any new
software but only to run old legacy programs not worth porting.  So in fact,
all you really need to deal with is IEEE 754 float byte order, which is
trivial of course.

All you did was fall for the pseudo benefits frequently mentioned by XML
advocates.  What they never say is that the problems they are trying to
solve have never been problems or solved decades ago.  Still, if I would
sell software, I would also claim a format that requires users to upgrade
both hardware and software to use it solves all of users' problem.  In fact,
the only problem is that a few big companies define binary file formats and
then do not both to specify them to lock out competitors or make migration
difficult.  So they promise XML could "solve" this problem, which is of
course cannot.  They will just move on and change the DTD with every new
version.

A perfect example is the M$ Visual Studio "XML" project format.  Even minor
upgrades from 7.0 to 7.1 cannot be reversed, nor can it read files when a
third-party compiler (Intel's) has been used and is not present everywhere.
Thus, except complaining quickly about (frequently needed) errors in manual
changes to the content and rejecting the file completely because it does not
validate (without saying what is wrong, of course), this use of XML is a
perfect example why XML is the most useless invention since the rectangular
wheel.

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.