# Second argument of InternalDoubleToString

Does anybody have an idea what the meaning of the second argument of InternalDoubleToString might be? It accepts also a third argument which seems to be related to the number of leading digits that are to be printed, but even that is not very clear to me if there is no third argument provided:

InternalDoubleToString[1. Pi 10^6]
InternalDoubleToString[1. Pi 10^-3]
InternalDoubleToString[1. Pi 10^6, 1, 5]
InternalDoubleToString[1. Pi 10^-3, 1, 5]


"3.141592653589793*^6"

"0.0031415926535897933"

"3.1416*^6"

"0.0031416"

This function might be very useful when exporting lots of numbers to a human-readible file format (see also this post).

The second argument controls whether to add NumberMarks

InternalDoubleToString[1. Pi 10^6, True, 5]

(* "3.1416*^6" *)

InternalDoubleToString[1. Pi 10^6, False, 5]

(* "3.1416*^6" *)


Note that anything different from an explicit True or False will use the Automatic setting.

• Ah, very good. Thank you, ilian! – Henrik Schumacher Apr 11 '18 at 13:31