Handling MySQL length=22 and decimals=31
Do not use (m,n) on FLOAT or DOUBLE.  It is virtually useless and leads to double-roundings.

DOUBLE is an IEEE-754 "Double", which includes 53 significant bits and a range that tops out at that number given (over 1.E+308).  This is universal to nearly all languages, and machines.

There are virtually no machines / OSs today that deviate from IEEE754 in the representation of numbers.  In theory, you could see differences, but I doubt that you will.

The "22" in information_schema.COLUMNS.numeric_precision may come from how many characters it takes to display (but even that does not make sense).  I don't know where you got the "31".