[rust-dev] Fast inverse square root in Rust
carter.schonwald at gmail.com
Sun Jan 12 11:06:38 PST 2014
Note that on modern hardware the fast inv trick, which is a very specific
trick indeed, is just one approach. Modern intel CPUs do have some special
instructions support that's related. Note that many of these tricks /
primops do not provide the full available representable precision.
That actually raises a good point: for finite precision real number types
like f64 /f32 etc, what are the desired precision/numerical stability
guarantees of routines included I the std lib? For operations on IEEE
floating point types, how do these guarantees carry these composite
operations in the presence of rounding modes?
These are nuanced questions. And maybe there should different types /
traits depending on the assumptions needed. (A fun question is: "when is
multiplication commutative and associative?", because it's not for
matrices, floats and groups)
Anyways, numerical computation is subtle :-)
On Sunday, January 12, 2014, Carter Schonwald wrote:
> On Sunday, January 12, 2014, Thad Guidry wrote:
>> Where is the fast inverse square root function in Rust ?
>> Anyone know if this semi-accurate function is at a hardware level and
>> built in to Intel chipsets since MMX ?
>> How does this affect LLVM and Rust compilation on 64 bit ?
>> Thanks in advance,
>> +ThadGuidry <https://www.google.com/+ThadGuidry>
>> Thad on LinkedIn <http://www.linkedin.com/in/thadguidry/>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rust-dev