MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / double2decimal

Function double2decimal

strings/decimal.c:985–994  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

983*/
984
985int double2decimal(double from, decimal_t *to)
986{
987 char buff[FLOATING_POINT_BUFFER], *end;
988 int res;
989 DBUG_ENTER("double2decimal");
990 end= buff + my_gcvt(from, MY_GCVT_ARG_DOUBLE, sizeof(buff) - 1, buff, NULL);
991 res= string2decimal(buff, to, &end);
992 DBUG_PRINT("exit", ("res: %d", res));
993 DBUG_RETURN(res);
994}
995
996
997static int ull2dec(ulonglong from, decimal_t *to)

Callers 1

double2my_decimalFunction · 0.85

Calls 1

my_gcvtFunction · 0.85

Tested by

no test coverage detected