# Function to get quotient from division

**URL:** <https://community.mp3tag.de/t/function-to-get-quotient-from-division/61447>\
**Category:** Support\
**Created:** [July 2, 2023, 2:37am UTC](https://community.mp3tag.de/t/function-to-get-quotient-from-division/61447 "2023-07-02T02:37:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dec](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dec/32/13699_2.png) [@dec](https://community.mp3tag.de/u/dec)\
**Post date:** [July 2, 2023, 2:37am UTC](https://community.mp3tag.de/t/function-to-get-quotient-from-division/61447/1 "2023-07-02T02:37:40Z")

</div>

in the listed Arithmetic functions, i see MOD, but no equivalent INTEGER (which is the more useful and frequently used)

and strangely i see no mention of Integer in any Posts (in this context)

have i missed something?

---

<div class="post-metadata">

**Author:** ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)\
**Post date:** [July 2, 2023, 5:32am UTC](https://community.mp3tag.de/t/function-to-get-quotient-from-division/61447/2 "2023-07-02T05:32:34Z")

</div>

I don't exactly understand what you mean. Please give an example for an "equivalent INTER function" to mod and whatfore you need it..

The MP3Tag Help page says:

> ## Arithmetic Functions
> 
> Integer arithmetic only

---

<div class="post-metadata">

**Author:** ![dec](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dec/32/13699_2.png) [@dec](https://community.mp3tag.de/u/dec)\
**Post date:** [July 2, 2023, 7:00am UTC](https://community.mp3tag.de/t/function-to-get-quotient-from-division/61447/3 "2023-07-02T07:00:36Z")

</div>

hi there.  
how's your maths?  
how is the reference to "Integer arithmetic' relevant?

MOD is the 'remainder' after a division (technically not a 'remainder, but near enough for our purposes), ie the RHS after the decimal point

INTEGER is sort of the opposite of MOD - it is the INTEGER part after a division

so the MOD of say 7310/3600 (seconds) is .030555555555556, NOT btw 110 which iS the remainder

and the INTEGER in this case is 2 (hours)

if you then multible the MOD by 60, you end up with a INTEGER of 1 (minute) and a MOD of .833333333333333

which is you multiple by 60 you get 50 seconds as the remainder

ie 2:01:50 duration

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [July 2, 2023, 7:14am UTC](https://community.mp3tag.de/t/function-to-get-quotient-from-division/61447/4 "2023-07-02T07:14:54Z")

</div>

How is your reading?  
In the documentation

> **[Scripting Functions – Mp3tag Documentation](https://docs.mp3tag.de/scripting/#arithmetic-functions)**
>
> Documentation on Mp3tag's scripting functions. Mp3tag is the universal Tag Editor.

You find 6 functions for arithmatic and the function you are looking for is just above the description of $mod()

| Function | Description |
| --- | --- |
| $div(x,y) | divides x by y. |
| $mod(x,y) | returns the remainder of x divided by y. |
| and as all function deal with integers, the result of a division is also an integer. | |

Or in short the function is called $DIV() - there is nothing missing.

---

<div class="post-metadata">

**Author:** ![dec](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dec/32/13699_2.png) [@dec](https://community.mp3tag.de/u/dec)\
**Post date:** [July 2, 2023, 9:09am UTC](https://community.mp3tag.de/t/function-to-get-quotient-from-division/61447/5 "2023-07-02T09:09:12Z")

</div>

so $DIV is not Div: it is actually $INT - which would be the standard name

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [July 2, 2023, 9:22am UTC](https://community.mp3tag.de/t/function-to-get-quotient-from-division/61447/6 "2023-07-02T09:22:50Z")

</div>

At least in Python INT() transforms a floating point number into an integer.  
This works on any floating point number, not necessary only as part of a division.  
IMHO INT is not the same as getting the quotient and remainder as $DIV() and $MOD() do.  
If you are looking for a function that works like INT(), check out $NUM() in MP3tag.

---

<div class="post-metadata">

**Author:** ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)\
**Post date:** [August 1, 2023, 9:23am UTC](https://community.mp3tag.de/t/function-to-get-quotient-from-division/61447/7 "2023-08-01T09:23:43Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
