# Accurate math?

**URL:** https://community.mp3tag.de/t/accurate-math/13989
**Category:** Support
**Created:** [October 12, 2012, 8:17am UTC](https://community.mp3tag.de/t/accurate-math/13989 "2012-10-12T08:17:44Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Mizery\_Made](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/ba9def/32.png) [@Mizery\_Made](https://community.mp3tag.de/u/Mizery_Made)
#### Post date: [October 12, 2012, 8:17am UTC](https://community.mp3tag.de/t/accurate-math/13989/1 "2012-10-12T08:17:44Z")

</div>

The export feature has some math functions. However, this is presenting me with some frustration. I'm attempting to do a simple list of albums, with their average rating. Doesn't seem to complicated, just add up the ratings ("Rating MM" mind you) and then devide by the number of tracks. I found an "average bitrate" formula through searching which seemed simple enough to convert to ratings. Thus, I ended up with:

```
$loop(%_filename_ext%)$puts(avgrating,$add($get(avgrating),%rating mm%))$puts(cnt1,$add($get(cnt1),1))$loopend()$get(avgrating) / $get(cnt1) = $div($get(avgrating),$get(cnt1))

```

However, I find that the programs math isn't accurate. For my test case, I end up with "58 / 12 = 4" when the true answer would be "58 / 12 = 4.8333..." So, is the program simply suppressing the decimals? Or is it rounding (in which case, the example would probably be 5)? Anyway of getting a more accurate average?

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [October 12, 2012, 8:41am UTC](https://community.mp3tag.de/t/accurate-math/13989/2 "2012-10-12T08:41:47Z")

</div>

The functions themselves don't have better accuracy.

You can get around it by multiplying the dividend by 10 or 100 and inserting a dot in the result on your own.

---

<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: [February 9, 2026, 12:24pm UTC](https://community.mp3tag.de/t/accurate-math/13989/3 "2026-02-09T12:24:06Z")

</div>


