On Wed, Feb 13, 2019 at 10:51:07AM -0800, Steve Kargl wrote: > To get Richard's emin/emax patch into the tree so adequate > testing can be done prior to the 9.1 release, I'll suggest > that we XFAIL norm2_3.f90 while we work out the details for > norm2. > > Yesteraday, I looked at Jakub's patch, and thought the approach > was fine. I haven't had time to look at the library side. > Perhaps, we can adopt Jakub's approach for the library as well.
Yeah. I guess fastest would be to precompute as constants the two boundaries when we might want to scale something (of course different for each kind), then just compare the operand and/or result against those and only if they are above that do frexp* to determine exponent, (re)compute the scale variable (scalbn* ?) and then just multiply or divide by that (if division is much slower, we could have two scale variables, one for scaling down and one for scaling up). Jakub