> For the complete documentation index, see [llms.txt](https://hsnaltan13.gitbook.io/object-oriented-programming/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hsnaltan13.gitbook.io/object-oriented-programming/math-functions.md).

# Math Functions

## Pi;

&#x20;is commonly used in math (3.14)<br>

```
this.Text = Math.PI.ToString();//This refer to Form1
```

## Absolute Value;

```
int AbsoluteValue= Math.Abs(int.Parse(txtbirinci.Text));
            this.Text = AbsoluteValue.ToString();
```

## Floor;

Rounds the given decimal value to the next lower integer.

```
double value=Convert.ToDouble(Textbox1.Text);
    this.Text=Math.Floor(value).ToString();

```

## Ceiling;

Complements the given decimal value to the next higher integer.

```

 
Math.Ceiling(Convert.ToDouble(Textbox1.Text)).ToString());
```

## Round;

It rounds more than half of the number to an upper value and less than half to the lower value.

Note:The number before. completes to a lower value if the number is even, and to the upper value if odd.

```
Math.Round(Convert.ToDouble(Textbox1.Text)).ToString());
```

## Truncate;

It doesn't look at the decimal part of the number,but just hand over the full part to you.

```
Math.Truncate(Convert.ToDecimal(text.Text)).ToString());
```

## Max,Min;

Min , it brings us the lowest value entered.

Max, it bring us the highest value entered.&#x20;

\*\*Note : If entered value more than 2;

```
("TheLowest Value :{Math.Min(Math.Min(int.Parse(TextBox1.Text), int.Parse(Textbox2.Text)), int.Parse(TextBox3.Text))}")
```

($"Girilen Değerlerden En kücüğü:{Math.Min(Math.Min(int.Parse(txtbirinci.Text), int.Parse(txtikinci.Text)), int.Parse(txtucuncu.Text))}")

```
Math.Min(Convert.ToInt32(textbox1.Text), Convert.ToInt32(textbox2.Text)).ToString());
Math.Max(Convert.ToInt32(textbox1.Text), Convert.ToInt32(textbox2.Text)).ToString());
```

Sqrt;\
Takes the square root of an entered value.
------------------------------------------

```
Math.Sqrt(Convert.ToDouble(txtbirinci.Text)).ToString();

```

## Sign;

It notifies about whether a number is negative positive or equal to 0. Returns -1 if number is negative, 0 if neutral, +1 if positive.

```
Math.Sign(Convert.ToInt32(txtbirinci.Text)).ToString();
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://hsnaltan13.gitbook.io/object-oriented-programming/math-functions.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.
