This PR implements a native C++ API to toggle scientific notation in tensor printing (fixes#40613). Previously, C++ users could not disable scientific notation, unlike Python's `torch.set_printoptions(sci_mode=False)`.
**Key Changes:**
- Added `torch::set_print_sci_mode(bool)` for native C++ control
- Updates core ATen tensor formatting logic
- Works without Python dependencies
- Includes GTest coverage (`PrintSciModeTest`)
**Usage Example:**
```cpp
auto t = torch::tensor({0.00001, 100000.0});
torch::set_print_sci_mode(false); // disable scientific notation
std::cout << t << std::endl; // Output: 0.0000, 100000.0000
```
**Testing:**
```bash
cd build
cmake --build . --target test_api -j4
./bin/test_api --gtest_filter="PrintSciModeTest*"
```
Expected Output:
```
With sci_mode=true: 1.0000e-05, 1.0000e+05
With sci_mode=false: 0.0000, 100000.0000
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/173321
Approved by: https://github.com/ezyang
Co-authored-by: Edward Yang <ezyang@meta.com>