[Prev][Next][Index][Thread]

Re: reading a float?



In article <gsc-998AC7.06113921042000@news.zipworld.com.au>, Sean Case
<gsc@zip.com.au> wrote:

> > It's hard to see how you can go past 1).  Doing this properly is actually
> > far harder than I've intimated above -- people actually write academic
> > papers on the subject.  Someone's already done the hard work of getting
> > fast, accurate FP conversions to work on any machine that has a C
> > compiler.    Why not use it?
> 
> Because they probably haven't done a very good job of making it accurate.
> 
> It's common for 3d modelling programs to store models as lists of ASCII
> floating point numbers.  Often, loading a model and saving it again
> results in a different set of numbers, whether or not anything was
> actually changed.  This strongly suggests that there are commercial C
> compiler/library combinations where converting float -> string -> float
> is not even idempotent, let alone an identity.

But surely this hits C users as well?  Anyone who cares that deeply on a
particular platform will have already written their own function if the
provided one isn't up to scratch and they can plug that into their Dylan. 
Better still, they should be submitting it to their C library provider...


> It _is_ possible to do it right.  My suggestion would be to take one of
> those academic papers and convert the CL code presented there to Dylan.

If something needs fixing, I'd rather fix it for C programmers as well as
Dylan ones.

-- Bruce



Follow-Ups: References: