torchcell.utils.format_scientific_notation

format_scientific_notation(num: float) → str[source]

Format a number into scientific notation, preserving all significant digits.

Examples

10000 -> “1e04” 10007 -> “1.0007e04” 1234567 -> “1.234567e06” 100 -> “1e02”