| 983 | */ |
| 984 | |
| 985 | int 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 | |
| 997 | static int ull2dec(ulonglong from, decimal_t *to) |
no test coverage detected