fn format_scientific(v: f64, prec: usize, upper: bool) -> String
Format a float in scientific notation matching R’s output (two-digit exponent minimum).