This is especially useful for the Array type where there is already a fixed interpretation, but needs to be added to the standard pp first.
So as well as 'bin', 'oct', 'hex' and 'bytes' we'd need to add:
'uint' / 'int' : For a width of n bits can easily calculate max characters of integer.
'float8_152' / 'float8_143' / 'bfloat' / 'float16/32/64' : For the 6 types can work out number of characters needed for all significant figures plus 1, plus sign and exponent.
Basically we support the same types as are supported in the Array class, and for each we need to be able to convert from the format type and number of bits to a number of characters needed to print it accurately.
This should now all work for the Array class, but isn't yet in the other classes, so this becomes a feature request to port the functionality over to those classes.
This is especially useful for the Array type where there is already a fixed interpretation, but needs to be added to the standard
pp
first.So as well as 'bin', 'oct', 'hex' and 'bytes' we'd need to add:
'uint' / 'int' : For a width of
n
bits can easily calculate max characters of integer. 'float8_152' / 'float8_143' / 'bfloat' / 'float16/32/64' : For the 6 types can work out number of characters needed for all significant figures plus 1, plus sign and exponent.Basically we support the same types as are supported in the Array class, and for each we need to be able to convert from the format type and number of bits to a number of characters needed to print it accurately.