home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.arch      Apparently more than just beeps & boops      131,241 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 130,261 of 131,241   
   Robert Finch to Thomas Koenig   
   Re: Tonights Tradeoff - NaN boxed precis   
   11 Nov 25 21:46:02   
   
   From: robfi680@gmail.com   
      
   On 2025-11-11 4:18 p.m., Thomas Koenig wrote:   
   > Robert Finch  schrieb:   
   >> Typical process for NaN boxing is to set the high order bits of the   
   >> value which causes the value to appear to be a NaN at higher precision.   
   >> I have been thinking about using some of the high order bits of the NaN   
   >> (eg bits 32 to 51) to indicate the precision of the boxed value. This   
   >> would allow detection of the use of a lower precision value in   
   >> arithmetic. Suppose a convert from single to double precision is being   
   >> done, but the value to be converted is only half precision.   
   >   
   > Do you mean a type mismatch, a conversion, or digits lost due to   
   > cancellation?   
      
   It would be an input type mismatch. >   
   >> If it were   
   >> indicated by the NaN software might be able to fix the result.   
   >   
   > Fixing a result after an NaN has occurred is too late, I think.   
   >   
   I suppose the float package could always just automatically upgrade the   
   precision from lower to higher when it goes to do the calculation. But   
   maybe with a trace warning. It would be able to if the precision were   
   indicated in the NaN.   
      
   >> I also   
   >> preserve the sign bit of the number in the NaN box.   
   >   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca