marising commented on issue #2274: Support more column type change URL: https://github.com/apache/incubator-doris/issues/2274#issuecomment-558981844 http://www.softelectro.ru/ieee754_en.html According to the definition of IEEE754, the effect of converting a float binary to a double binary is the same as that of static_cast <double>. Data precision cannot be guaranteed, but the progress of decimal system can be guaranteed by converting a float binary to a char and then to a double. ==System== float 0.3000000 is: 0 | 01111101 | 00110011001100110011010 double 0.300000000000000 is: 0 | 01111111101 | 0011001100110011001100110011001100110011001100110011 ==Convert Binary== float 0.3000000 is: 0 | 01111101 | 00110011001100110011010 double 0.300000011920929 is: 0 | 01111111101 | 0000000000000000000001000000000000000000000000000000 ==float to char to strtod== float 0.3000000 is: 0 | 01111101 | 00110011001100110011010 double 0.300000000000000 is: 0 | 01111111101 | 0011001100110011001100110011001100110011001100110011 ==static cast== float 0.3000000 is: 0 | 01111101 | 00110011001100110011010 double 0.300000011920929 is: 0 | 01111111101 | 0000000000000000000001000000000000000000000000000000
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org