I'm using Stata MP 19.5 for Mac. When I run:
The output is:
Which seems to have a random letter g added to the end. This seems to only happen when:
*The number is at least 10^19, and smaller than 10^20
*The format specifies more than 20 decimals
*The format type ends in g or gc
Code:
clear all set obs 1 gen double glitched_tostring = 10^19 tostring glitched_tostring, format("%50.21g") replace force di glitched_tostring[1]
Code:
1000000000000000000.g
*The number is at least 10^19, and smaller than 10^20
*The format specifies more than 20 decimals
*The format type ends in g or gc
Comment