[LLVMdev] [RFC] Add a simple soft-float class

Bruce Hoult bruce at hoult.org
Wed Jun 18 15:05:10 PDT 2014


On Thu, Jun 19, 2014 at 8:29 AM, Owen Anderson <resistor at mac.com> wrote:

> Numerical analysis is hard.  Every numerics expert I have ever worked with
> considers trying to re-invent floating point a cardinal sin of numerical
> analysis.  Just don’t do it.  You will miss important considerations, and
> you will pay the price for it later.
>

I don't think anyone is planning to use it to write climate models. Or
simulate airflow over a 787. Or even invert a near-singular matrix.

This is for jobs that *could* perfectly well be done with a simple integer
with an implied scale factor, if you could easily and reliably predict in
advance exactly what scale factor is appropriate for each value.

This simply keeps track of the scale factor for you, so you can't get it
wrong.

Perhaps the mistake is in calling it "software floating point" (which
carries a lot of baggage), rather than "automatic scaled integer"?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140619/23370256/attachment.html>


More information about the llvm-dev mailing list