lidavidm opened a new issue, #75:
URL: https://github.com/apache/arrow-nanoarrow/issues/75

   AppendDouble checks that the value is in the range `[FLT_MIN, FLT_MAX]` 
before appending. However, that's not actually the right check: `FLT_MIN` isn't 
the "minimum float value" (that doesn't make sense; floats contain infinity), 
but rather the smallest positive float. Hence, 0 and any negative float will 
get wrongly rejected.
   
   IMO, it might make sense to just accept any double and cast it to float 
without thinking. Otherwise, maybe the right check is `(double)((float) v) == 
v` or something ("is this double exactly representable as a float", perhaps 
there's an idiom for this though I can't get the right search query to figure 
this out), though this will not work for NaN.


-- 
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]

Reply via email to