|Age||Commit message (Collapse)||Author|
This is an attempt to extend the log algorithm of [Tan90] to compute
x^y. I don't intend to keep this algorithm for long, since I didn't
succeed very well. It's tremendously slow (worse even than mpfr!),
and has some truly terrible edge cases.
For example, computing pow(0x3f7ff7f3, 0xc7b58adf) (that is,
(0.99987715)^(-92949.74)) returns infinity, when it should be
0x47b1d362 (91046.765), which is a dozen orders of magnitude below
the infinity border.
In more pedestrian cases, errors of up to ~16 ulps can be observed.
For example, powr(0x3f80a83e, 0xc65492ba) = (1.0051343)^(-13604.682)
should return 0x0d3304a3, but it gives 0x0d3304b4.
Some algorithm descriptions use f as an auxiliary variable. Since
we attempt to match variable naming to the relevant algorithm
description, this becomes a problem. For uniformity, change everywhere.
This is, perhaps, a conforming implementation of scalB, but it is
highly probable that, in the future, it will be desireable for scalB
to accept arbitrary, exponents, not simply integers. Furthermore,
we find scalB a non-intuitive name. Therefore, calling the function
‘scale2’ serves two purposes.