# Number.to_exponential

## 功能

把数字格式化为科学计数法字符串。

## 语法

```bt
number.to_exponential(digits)
```

## 参数

| 参数 | 类型 | 必填 | 默认值 | 说明 |
| ------ | ------ | ------ | ------ | ------ |
| digits | Int | 否 | 6 | 小数位数；负数按 0 处理。 |

## 返回值

| 类型 | 说明 |
| ------ | ------ |
| String | 返回科学计数法字符串。 |

## 示例

```bt
num = 1234
result = num.to_exponential(2)

// 输出：1.23e3
print result
```

## 注意事项

- 结果是字符串，不是数字。
