# Can I find a way to calculate packet growth rate for a specific dstIP?

**URL:** <https://forum.p4.org/t/can-i-find-a-way-to-calculate-packet-growth-rate-for-a-specific-dstip/338>\
**Category:** Getting Started with P4\
**Created:** [May 18, 2022, 3:27am UTC](https://forum.p4.org/t/can-i-find-a-way-to-calculate-packet-growth-rate-for-a-specific-dstip/338 "2022-05-18T03:27:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AcmeT](https://avatars.discourse-cdn.com/v4/letter/a/f1d935/32.png) [@AcmeT](https://forum.p4.org/u/AcmeT)\
**Post date:** [May 18, 2022, 3:27am UTC](https://forum.p4.org/t/can-i-find-a-way-to-calculate-packet-growth-rate-for-a-specific-dstip/338/1 "2022-05-18T03:27:16Z")

</div>

Hi,

I want to know packet growth rate for a specific dstIP in data plane. But P4 do not support division.

Do you have any ways that can calculate this? Approximate result also works. I don’t need it to be that exact.

Thank you!

---

<div class="post-metadata">

**Author:** ![andyfingerhut](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.p4.org/andyfingerhut/32/17_2.png) [@andyfingerhut](https://forum.p4.org/u/andyfingerhut)\
**Post date:** [May 18, 2022, 3:45am UTC](https://forum.p4.org/t/can-i-find-a-way-to-calculate-packet-growth-rate-for-a-specific-dstip/338/2 "2022-05-18T03:45:46Z")

</div>

I do not know if this article will give you any ideas or not, but it does have some ideas for certain kinds of calculations using the kinds of arithmetic operations available in P4. The recommended book “Hacker’s Delight” is much longer, but browsing through its table of contents might lead you to something relevant. [p4-guide/floating-point-operations.md at master · jafingerhut/p4-guide · GitHub](https://github.com/jafingerhut/p4-guide/blob/master/docs/floating-point-operations.md)

---

<div class="post-metadata">

**Author:** ![AcmeT](https://avatars.discourse-cdn.com/v4/letter/a/f1d935/32.png) [@AcmeT](https://forum.p4.org/u/AcmeT)\
**Post date:** [May 19, 2022, 1:51pm UTC](https://forum.p4.org/t/can-i-find-a-way-to-calculate-packet-growth-rate-for-a-specific-dstip/338/3 "2022-05-19T13:51:40Z")

</div>

Thank you! that helps a lot 🙂
