lfpinit() signed or unsigned?

Hal Murray hmurray at megapathdsl.net
Thu Mar 9 21:11:36 UTC 2017


esr at thyrsus.com said:
> The macros that are the API for the abstract data type are constructed to be
> indifferent to whether the underlying concrete 64-bit type is signed or
> unsigned.  If I were willing to commit either way I could throw away several
> of them in favor of bare arithmetic operations. 

Do any of the casts actually change any bits?  (as compared to kill compiler 
warnings)

casting an int to/from float has to change bits.  casting from signed to 
unsigned doesn't do that.

What I was trying to suggest is that another layer of macros might eliminate 
a batch of casts.


gem at rellim.com said:
> From what I can tell, until 2038, l_fp never uses the top bit, except to
> do sidewise fake at goping negative.  I see no reason l_fp can not be
> signed.  We'll know soon.... 

Interesting.  I thought we were discussing making the first argument to 
lfp_init unsigned.

--------

Do any of the RFCs discuss the sign of the time stamps?


-- 
These are my opinions.  I hate spam.





More information about the devel mailing list