leerho commented on issue #157:
URL: 
https://github.com/apache/datasketches-rust/issues/157#issuecomment-5049167386

   @tisonkun ,
   Sadly, Java doesn't have an inline capability. When I created this bit 
computation of invPow2() I placed it in our common / Utils class which is 
shared by many different sketches and not restricted to any specific sketch or 
computation. And as a common library function I don't like to artificially 
limit a function's dynamic range especially if it doesn't impact its 
performance.  As it is, it is valid for all inverse powers of 2 within the 
dynamic range of IEEE 754 64bit floating point values.
   
   For an inline function dedicated to a specific computation, you are right, 
the exponent in the targeted computation cannot possibly exceed the range of 
u8.  I just hope that someone doesn't copy that snippet of code thinking that 
it covers more cases than it actually does.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to