# \[수학] 상수 (파이 π, 자연상수 e)

### 코드

{% code title="파이(π) 값을 구할 때" %}

```
@수학 파이
```

{% endcode %}

{% code title="자연상수(e) 값을 구할 때" %}

```
@수학 자연상수
```

{% endcode %}

***

### 설명

파이 $$\pi$$, 자연상수 $$e$$를 반환합니다.

* 원주율(파이) : $$\pi \approx 3.141592...$$
* 자연상수 : $$e \approx 2.718281...$$

***

### 주의사항

* 수학 코드를 쓸 때는 앞에 `@수학`을 써야 해요.
* 상수는 값이 고정되어 변하지 않아요.

***

### 파이썬 대응 코드

```
import math
math.pi
math.e
```

***

### 예시

{% code title="예시 코드" %}

```
@수학 파이 보여주기
@수학 자연상수 보여주기
```

{% endcode %}

{% code title="예시 코드의 결과" %}

```
3.141592653589793  # 원주율 (파이, π)
2.718281828459045  # 자연상수 (e)
```

{% endcode %}

***

### 검색 키워드

수학, 상수, 원주율, 파이, 자연상수, π, e


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://codebook.horang.it/math/p-e.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
