krlmlr opened a new issue, #1042: URL: https://github.com/apache/arrow-nanoarrow/issues/1042
What's the overhead of computing `msb(x) - lsb(x) < 53-ish` instead of `x < 2^53` ? From https://github.com/r-dbi/RMariaDB/issues/586: ```r x <- bit64::as.integer64("18014398509481984") # 2^54, exactly representable as double a <- nanoarrow::as_nanoarrow_array(x, schema = nanoarrow::na_int64()) nanoarrow::convert_array(a, double()) == 2^54 #> Warning in convert_array.default(a, double()): 1 value(s) may have incurred #> loss of precision in conversion to double() #> [1] TRUE # Expected: TRUE without a warning, got a loss-of-precision warning df <- data.frame(ts = as.POSIXct("2999-09-09", tz = "UTC")) out <- as.data.frame(nanoarrow::as_nanoarrow_array(df)) #> Warning in as.data.frame.nanoarrow_array(nanoarrow::as_nanoarrow_array(df)): 1 #> value(s) may have incurred loss of precision in conversion to double() identical(as.numeric(out$ts), as.numeric(df$ts)) #> [1] TRUE # Expected: TRUE without a warning ``` -- 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]
