It's not very clear or easy to find, no. You have to dig into the internals to get anything relevant.
From perlapi:
Gconvert
This preprocessor macro is defined to convert a floating point number to a string without a trailing decimal point. This emulates the behavior of sprintf("%g")
, but is sometimes much more efficient. If gconvert()
is not available, but gcvt()
drops the trailing decimal point, then gcvt()
is used. If all else fails, a macro using sprintf("%g")
is used.
And perlnumber says that conversions from native floating point to decimal string "involve steps performed by the C compiler", which I assume means the aforementioned Gconvert
macro. So you have to look into how those functions behave on your system for the gritty details about when it switches between regular and scientific notation to render a number.