# Pow() function?

**URL:** <https://cern-ipmc-forum.web.cern.ch/t/pow-function/311>\
**Category:** Software\
**Created:** [April 2, 2024, 12:38pm UTC](https://cern-ipmc-forum.web.cern.ch/t/pow-function/311 "2024-04-02T12:38:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![slafrass](https://cern-ipmc-forum.web.cern.ch/letter_avatar_proxy/v4/letter/s/5daacb/32.png) [@slafrass](https://cern-ipmc-forum.web.cern.ch/u/slafrass)\
**Post date:** [April 2, 2024, 12:38pm UTC](https://cern-ipmc-forum.web.cern.ch/t/pow-function/311/1 "2024-04-02T12:38:41Z")

</div>

Hi all,

I need the pow() function from the standard “math.h” include to compute real values from PMBus DIRECT data format.  
But it seems not available in the CERN-IPMC stack AFAIK.  
Is there any equivalent from PigeonPoint that we should know about ?

Cheers,  
Sylvain@LAPP

---

<div class="post-metadata">

**Author:** ![slafrass](https://cern-ipmc-forum.web.cern.ch/letter_avatar_proxy/v4/letter/s/5daacb/32.png) [@slafrass](https://cern-ipmc-forum.web.cern.ch/u/slafrass)\
**Post date:** [April 8, 2024, 3:44pm UTC](https://cern-ipmc-forum.web.cern.ch/t/pow-function/311/2 "2024-04-08T15:44:47Z")

</div>

Should I reimplement my own version ?

---

<div class="post-metadata">

**Author:** ![joos](https://cern-ipmc-forum.web.cern.ch/letter_avatar_proxy/v4/letter/j/a3d4f5/32.png) [@joos](https://cern-ipmc-forum.web.cern.ch/u/joos)\
**Post date:** [April 9, 2024, 9:23am UTC](https://cern-ipmc-forum.web.cern.ch/t/pow-function/311/3 "2024-04-09T09:23:56Z")

</div>

Hello Sylvain,

I have searched the entire IPMC source code and not found any file that suggests that pow() is available for user code.

Ralf also does not remember that a user ever had to use pow(). The real expert, Stefan Haas, will be back from vacation next Monday.

Cheers,

Markus

---

<div class="post-metadata">

**Author:** ![spiwoks](https://cern-ipmc-forum.web.cern.ch/letter_avatar_proxy/v4/letter/s/e19b73/32.png) [@spiwoks](https://cern-ipmc-forum.web.cern.ch/u/spiwoks)\
**Post date:** [April 9, 2024, 10:57am UTC](https://cern-ipmc-forum.web.cern.ch/t/pow-function/311/4 "2024-04-09T10:57:20Z")

</div>

Hi Sylvain,

I did not even know that the IPMC was supposed to do floating point calculations, because this is what you are looking after?

I thought the floating point calculations were only done by the shelf manager …

Let’s clarify with Stefan when he will be back next week.

Cheers,  
Ralf.

---

<div class="post-metadata">

**Author:** ![slafrass](https://cern-ipmc-forum.web.cern.ch/letter_avatar_proxy/v4/letter/s/5daacb/32.png) [@slafrass](https://cern-ipmc-forum.web.cern.ch/u/slafrass)\
**Post date:** [April 9, 2024, 2:45pm UTC](https://cern-ipmc-forum.web.cern.ch/t/pow-function/311/5 "2024-04-09T14:45:18Z")

</div>

Hi Stephan and Markus,

With PMbus DIRECT numeric format, we need float computations indeed to get get the real sensor value X = (1.0 / m) \* (Y \* (10 ^ -R)) - b.  
Anyway I coded my own function in the mean time.

Best regards,  
Sylvain @ LAPP
