# Matematikai műveletek

Ahhoz, hogy matematikai függvényeket tudjunk használni C++-ban azt a fejlécállományt kell használjuk, amelyben a matematikai függvények vannak.

Ennek a formája:&#x20;

```cpp
#include <cmath>
```

#### Fontosabb függvények

```cpp
sqrt(X) - négyzetgyök X
abs(x) - abszolút érték (modulusz)
pow(x, n) - hatványozás (x^n)
sin(x) - szinusz X
cos(x) - koszinusz X
log(x) - természetes alapú logaritmus X
ceil(x) - felfele kerekítés
floor(x) - lefele kerekítés
tan(x) - tangens X
acos(x) - arkusz koszinusz X
asin(x) - arkusz szinusz X
cosh(x) - koszinusz hiperbolikusz X
exp(x) - exponenciális függvény
log10(x) - 10-es alapú logaritmus X
log2(x) - 2-es alapú logaritmus X
hypot(x, y,) - derékszögű háromszög átfogójának kiszámítása, ahol x és y befogók
fmod(x, y) - osztás maradékának kiszámítása
round(x) - kerekítés a legközelebbire
```


---

# 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://cspp.csalex.org/10.-osztaly/matematikai-muveletek.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.
