# 3.7 取整

函数ffloor、fceiling、fround和 ftruncate接受一个浮点参数并返回一个浮点结果，其值为附近的整数。 ffloor返回向下取整的整数；fceiling返回向上取整的整数； ftruncate, 返回向零方向取整的整数； fround，最接近的整数。

Function：ffloor float 此函数将float 向下舍入取整，并将该值作为浮点数返回。

Function：fceiling float 此函数将float 向上舍入取整，并将该值作为浮点数返回。

Function：ftruncate float 此函数将float 向零舍入取整，并将该值作为浮点数返回。

Function：fround float 此函数将float 舍入到最接近的整数值，并将该值作为浮点数返回。对两个整数之间等距的值，舍入到接近的偶数。


---

# 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://emacs-lisp.ivory.cafe/shu-zi/jing-que-du.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.
