EmbeddedRelated.com
Forums
Memfault State of IoT Report

Fast transcendental library?

Started by synergymusic2000 February 14, 2004
At 12:28 AM 2/17/2004 +0000, you wrote:
>First, thanks to Jon, Richard, onestone and
Augmentics, all of whose
>answers are helpful in one way or another.
>
>I have spent quite a bit of time Googling for this, but without
>success. I'm new to the MSP430, and so far I only have the TI dev
>system and the freeware Micro-C, neither of which seem to have what I
>want. My background is mostly assembler on many other MCUs (but I'm
>blown away by the orthogonality of the '430). I also have a little
>experience with Pascal on the AVR, plus Delphi and C/C++ on the PC.
>
>I'd prefer an existing free or low cost solution, or enough hints so
>I can "roll my own" library. But if it's justifiable I can
spring for
>a "proper" library and/or compiler.
>
>In terms of actual requirements, I need to keep Icc below 3mA, and
>the basic need is to regularly (within a timer interrupt every 10ms)
>calculate Y = (K1/X - K2)*K3, where X and Y are in rectangular form,
>ultimately 16 bit resolution, maybe 13 bit accuracy (but this is
>flexible). K1-K3 are constants, and everything is complex. So
>whether it's explicit or implicit, I need to do the following
(I've
>scratched my head a lot trying to minimize these steps, but
>apparently scratching one's head doesn't actually increase brain
>power):
>  convert X to polar form (needs square root and atan),
>  do the complex divide,
>  convert the result back to rectangular (needs sin, cos),
>  do the complex subtract,
>  convert the result to polar (needs square root and atan),
>  do the complex multiply,
>  convert the result back to rectangular (needs sin, cos).

CORDIC algorithms (developed ca. 1968, IIRC) would probably
be the way to go. I've got the seminal paper packed away
somewhere it will be time-consuming to dig out, but a good
librarian could find it for you.

It's been a while since I've written any of this stuff, but I
don't
think it would be a huge project for you if you dig into it, especially
if you've written some math routines before.

Best regards,

Spehro Pefhany --"it's the network..."            "The
Journey is the reward"
speff@spef...             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com





Beginning Microcontrollers with the MSP430

16 bit fixed point 2's complement CORDIC library for MSP430 already
exists, it has been announced at the Dallas Conference back in November by
Microtrend Systems Inc.(www.microtrendsys.com) They already have sin, cos ,atan
as  PUBLIC functions in assembly for IAR.  Exp , ln , sqrt  and many others are
in the works.!

Karl.

----- Original Message -----
From: Spehro Pefhany
Sent: Monday, February 16, 2004 9:19 PM
To: msp430@msp4...
Subject: Re: [msp430] Re: Fast transcendental library?

At 12:28 AM 2/17/2004 +0000, you wrote:
>First, thanks to Jon, Richard, onestone and Augmentics, all of whose
>answers are helpful in one way or another.
>
>I have spent quite a bit of time Googling for this, but without
>success. I'm new to the MSP430, and so far I only have the TI dev
>system and the freeware Micro-C, neither of which seem to have what I
>want. My background is mostly assembler on many other MCUs (but I'm
>blown away by the orthogonality of the '430). I also have a little
>experience with Pascal on the AVR, plus Delphi and C/C++ on the PC.
>
>I'd prefer an existing free or low cost solution, or enough hints so
>I can "roll my own" library. But if it's justifiable I can
spring for
>a "proper" library and/or compiler.
>
>In terms of actual requirements, I need to keep Icc below 3mA, and
>the basic need is to regularly (within a timer interrupt every 10ms)
>calculate Y = (K1/X - K2)*K3, where X and Y are in rectangular form,
>ultimately 16 bit resolution, maybe 13 bit accuracy (but this is
>flexible). K1-K3 are constants, and everything is complex. So
>whether it's explicit or implicit, I need to do the following
(I've
>scratched my head a lot trying to minimize these steps, but
>apparently scratching one's head doesn't actually increase brain
>power):
>  convert X to polar form (needs square root and atan),
>  do the complex divide,
>  convert the result back to rectangular (needs sin, cos),
>  do the complex subtract,
>  convert the result to polar (needs square root and atan),
>  do the complex multiply,
>  convert the result back to rectangular (needs sin, cos).

CORDIC algorithms (developed ca. 1968, IIRC) would probably
be the way to go. I've got the seminal paper packed away
somewhere it will be time-consuming to dig out, but a good
librarian could find it for you.

It's been a while since I've written any of this stuff, but I
don't
think it would be a huge project for you if you dig into it, especially
if you've written some math routines before.

Best regards,

Spehro Pefhany --"it's the network..."            "The
Journey is the reward"
speff@spef...             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com






.






. Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com





Hi Spehro,

Thanks for the suggestion. I have some Cordic documentation, and 
intended to use it for this project (it seemed ideal for the complex 
conversions). But I had been led to believe that Cordic was only best 
if there was no hardware multiplier (as there is on the 'F149 I 
intend to use). Can you throw any more light on this?

--- In msp430@msp4..., Spehro Pefhany <speff@i...> wrote:
> At 12:28 AM 2/17/2004 +0000, you wrote:
> >First, thanks to Jon, Richard, onestone and Augmentics, all of 
whose
> >answers are helpful in one way or another.
> >
> >I have spent quite a bit of time Googling for this, but without
> >success. I'm new to the MSP430, and so far I only have the TI dev
> >system and the freeware Micro-C, neither of which seem to have 
what I
> >want. My background is mostly assembler on
many other MCUs (but I'm
> >blown away by the orthogonality of the '430). I also have a little
> >experience with Pascal on the AVR, plus Delphi and C/C++ on the PC.
> >
> >I'd prefer an existing free or low cost solution, or enough hints 
so
> >I can "roll my own" library. But if
it's justifiable I can spring 
for
> >a "proper" library and/or compiler.
> >
> >In terms of actual requirements, I need to keep Icc below 3mA, and
> >the basic need is to regularly (within a timer interrupt every 
10ms)
> >calculate Y = (K1/X - K2)*K3, where X and Y
are in rectangular 
form,
> >ultimately 16 bit resolution, maybe 13 bit
accuracy (but this is
> >flexible). K1-K3 are constants, and everything is complex. So
> >whether it's explicit or implicit, I need to do the following
(I've
> >scratched my head a lot trying to minimize these steps, but
> >apparently scratching one's head doesn't actually increase
brain
> >power):
> >  convert X to polar form (needs square root and atan),
> >  do the complex divide,
> >  convert the result back to rectangular (needs sin, cos),
> >  do the complex subtract,
> >  convert the result to polar (needs square root and atan),
> >  do the complex multiply,
> >  convert the result back to rectangular (needs sin, cos).
> 
> CORDIC algorithms (developed ca. 1968, IIRC) would probably
> be the way to go. I've got the seminal paper packed away
> somewhere it will be time-consuming to dig out, but a good
> librarian could find it for you.
> 
> It's been a while since I've written any of this stuff, but I
don't
> think it would be a huge project for you if you dig into it, 
especially
> if you've written some math routines before.
> 
> Best regards,
> 
> Spehro Pefhany --"it's the network..."            "The
Journey is 
the reward"
> speff@i...             Info for manufacturers:
http://www.trexon.com
> Embedded software/hardware/analog  Info for designers:  
http://www.speff.com


--- In msp430@msp4..., "Wolfgang Reich"
<reich_wolfgang@y...> 
wrote:
> If you can convert Y = (K1/X - K2)*K3 into Y=(K1*K3)/X - K2*K3 and 
> pre-calculate K1*K3 and K2*K3, then you'd be able to save some 
> operations.
> 
> To give you an impression of how "long" calculations take:
> I have an application which requires about 20 multiplications, 10 
> add/sub, 1 div, every 10ms, all done in plain float (24 bit 
> precision). Together with some integer stuff this takes 2..3ms 
IIRC, 
> at 6MHz, 3mA, on a F435 which doesn't even
have a hardware 
> multiplier; Quadravox AQ430 C compiler.
> I had considered doing all this in integer, with appropriate 
scaling 
> etc., but why complicate things unnecessarily?
> 
> A sin() function for float precision basically needs 9 muls and 7 
> adds.
> 
> Looks like on an MSP with hardware multiplier it'd be possible to 
> do all your calculations simply in float.
> 
> Wolfgang

First let me apologize to Wolfgang, Gary and the group - I misread my 
own scribbles in creating the post. In fact, what I called "K1" is 
actually another input variable. Your suggested pre-calculation was 
completely valid for my post, but unfortunately not for my actual 
application.

Making the VERY broad approximation that each sin(), cos(), sqrt() 
and atan2() takes 9 muls and 7 adds, I need to...

convert the two variables to polar form
 (36 muls, 28 adds),
do the complex divide
 (1 divide, 1 add),
convert the result back to rectangular
 (20 muls, 14 adds),
do the complex subtract,
 (2 adds)
convert the result to polar
 (18 muls, 14 adds),
do the complex multiply,
 (1 mul, 1 add)
convert the result back to rectangular
 (20 muls, 14 adds),

Total 95 muls, 1 div and 74 adds.

At 4MHz/2mA I might expect the F435 to do 20 muls, 10 adds and 1 div 
in 4ms. Luckily the F149's hardware multiplier will help out a lot, 
but whether I can do it all in FP in under 10ms still looks too close 
to call.

Thanks also to Karl for the Cordic tip, and Gary for 1/X = 1/(Xr+jXi) 
= (Xr-jXi)/(Xr^2+Xi^2) - it looks like it might be a bit faster than 
what I was considering. More homework to do.

Tony


Hi all
i have been following this thread and i wonder that no mention
of resolution or accuracy requirements what are the specs
Ezy

synergymusic2000 wrote:
> --- In msp430@msp4..., "Wolfgang Reich"
<reich_wolfgang@y...>
> wrote:
>  > If you can convert Y = (K1/X - K2)*K3 into Y=(K1*K3)/X - K2*K3 and
>  > pre-calculate K1*K3 and K2*K3, then you'd be able to save some
>  > operations.
>  >
>  > To give you an impression of how "long" calculations take:
>  > I have an application which requires about 20 multiplications, 10
>  > add/sub, 1 div, every 10ms, all done in plain float (24 bit
>  > precision). Together with some integer stuff this takes 2..3ms
> IIRC,
>  > at 6MHz, 3mA, on a F435 which doesn't even have a hardware
>  > multiplier; Quadravox AQ430 C compiler.
>  > I had considered doing all this in integer, with appropriate
> scaling
>  > etc., but why complicate things unnecessarily?
>  >
>  > A sin() function for float precision basically needs 9 muls and 7
>  > adds.
>  >
>  > Looks like on an MSP with hardware multiplier it'd be possible
to
>  > do all your calculations simply in float.
>  >
>  > Wolfgang
> 
> First let me apologize to Wolfgang, Gary and the group - I misread my
> own scribbles in creating the post. In fact, what I called "K1"
is
> actually another input variable. Your suggested pre-calculation was
> completely valid for my post, but unfortunately not for my actual
> application.
> 
> Making the VERY broad approximation that each sin(), cos(), sqrt()
> and atan2() takes 9 muls and 7 adds, I need to...
> 
> convert the two variables to polar form
> (36 muls, 28 adds),
> do the complex divide
> (1 divide, 1 add),
> convert the result back to rectangular
> (20 muls, 14 adds),
> do the complex subtract,
> (2 adds)
> convert the result to polar
> (18 muls, 14 adds),
> do the complex multiply,
> (1 mul, 1 add)
> convert the result back to rectangular
> (20 muls, 14 adds),
> 
> Total 95 muls, 1 div and 74 adds.
> 
> At 4MHz/2mA I might expect the F435 to do 20 muls, 10 adds and 1 div
> in 4ms. Luckily the F149's hardware multiplier will help out a lot,
> but whether I can do it all in FP in under 10ms still looks too close
> to call.
> 
> Thanks also to Karl for the Cordic tip, and Gary for 1/X = 1/(Xr+jXi)
> = (Xr-jXi)/(Xr^2+Xi^2) - it looks like it might be a bit faster than
> what I was considering. More homework to do.
> 
> Tony
> 
> 
> 
> .
> 
> 
> 
> 
> 
> >. 
> 
> 


On Wed, 18 Feb 2004 20:47:20 +0200, Ezy wrote:

>i have been following this thread and i wonder that
no mention
>of resolution or accuracy requirements what are the specs

It was asked.

Jon

Wrong address! :)

----- Original Message ----- 
From: "ezy" <ezrashumla@ezra...>
To: <msp430@msp4...>
Sent: Thursday, February 19, 2004 5:48 AM


> Hi all
> i have been following this thread and i wonder that no mention
> of resolution or accuracy requirements what are the specs
> Ezy
>
> synergymusic2000 wrote:
> > --- In msp430@msp4...,?)  
>  (eHTTP/1.1 200g@y...>
> > wrote:
> >  > If you can convert Y = (K1/X - K2)*K3 into Y=(K1*K3)/X - K2*K3
and
> >  > pre-calculate K1*K3 and K2*K3, then you'd be able to save
some
> >  > operations.
> >  >
> >  > To give you an impression of how "long" calculations
take:
> >  > I have an application which requires about 20 multiplications,
10
> >  > add/sub, 1 div, every 10ms, all done in plain float (24 bit
> >  > precision). Together wiar channel = "eBay";
> //-->
> </scr 2..3ms
> > IIRC,
> >  > at 6MHz, 3mA, on a F435 which doesn't even have a hardware
> >  > multiplier; Quadravox AQ430 C compiler.
> >  > I had considered doing all this in integer, with appropriate
> > scaling
> >  > etc., but why complicate things unnecessarily?
> >  >
> >  > A sin() function for float precision basically needs 9 muls and
7
> >  > adds.
> >  >
> >  > Looks like on an MSP with hardware multiplier it'd be
possible to
> >  > do all your calculations simply in float.
> >  >
> >  > Wolfgang
> >
> > First let me apologize to Wolfgang, Gary and the group - I misread my
> > own scribbles in creating the post. In fact, what I called
"K1" is
> > actually another input variable. Your suggested pre-calculation was
> > completely valid for my post, but unfortunately not for my actual
> > application.
> >
> > Making the VERY broad approximation that each sin(), cos(), sqrt()
> > and atan2() takes 9 muls and 7 adds, I need to...
> >
> > convert the two variables to polar form
> > (36 muls, 28 adds),
> > do the complex divide
> > (1 divide, 1 add),
> > convert the result back to rectangular
> > (20 muls, 14 adds),
> > do the complex subtract,
> > (2 adds)
> > convert the result to polar
> > (18 muls, 14 adds),
> > do the complex multiply,
> > (1 mul, 1 add)
> > convert the result back to rectangular
> > (20 muls, 14 adds),
> >
> > Total 95 muls, 1 div and 74 adds.
> >
> > At 4MHz/2mA I might expect the F435 to do 20 muls, 10 adds and 1 div
> > in 4ms. Luckily the F149's hardware multiplier will help out a
lot,
> > but whether I can do it all in FP in under 10ms still looks too close
> > to call.
> >
> > Thanks also to Karl for the Cordic tip, and Gary for 1/X =
1/(Xr+jXi)
> > = (Xr-jXi)/(Xr^2+Xi^2) - it looks like it might be a bit faster
than
> > what I was considering. More homework to do.
> >
> > Tony
> >
> >
> >
> > .
> >
> >
> >
> >
> > 
> > >.
> >
> >
>
>
>
> .
>
>
> Yahoo! Groups Links
>
>
>
>
>
>


Excuse me...ignore that.

----- Original Message ----- 
From: "David Lions" <davidl@davi...>
To: <msp430@msp4...>
Sent: Thursday, February 19, 2004 9:52 AM
Subject: [msp430] Re:


> Wrong address! :)
>
> ----- Original Message ----- 
> From: "ezy" <ezrashumla@ezra...>
> To: <msp430@msp4...>
> Sent: Thursday, February 19, 2004 5:48 AM
>
>
> > Hi all
> > i have been following this thread and i wonder that no mention
> > of resolution or accuracy requirements what are the specs
> > Ezy
> >
> > synergymusic2000 wrote:
> > > --- In msp430@msp4...,?)  
> >  (eHTTP/1.1 200g@y...>
> > > wrote:
> > >  > If you can convert Y = (K1/X - K2)*K3 into Y=(K1*K3)/X -
K2*K3 and
> > >  > pre-calculate K1*K3 and K2*K3, then you'd be able to
save some
> > >  > operations.
> > >  >
> > >  > To give you an impression of how "long"
calculations take:
> > >  > I have an application which requires about 20
multiplications, 10
> > >  > add/sub, 1 div, every 10ms, all done in plain float (24
bit
> > >  > precision). Together wiar channel = "eBay";
> > //-->
> > </scr 2..3ms
> > > IIRC,
> > >  > at 6MHz, 3mA, on a F435 which doesn't even have a
hardware
> > >  > multiplier; Quadravox AQ430 C compiler.
> > >  > I had considered doing all this in integer, with
appropriate
> > > scaling
> > >  > etc., but why complicate things unnecessarily?
> > >  >
> > >  > A sin() function for float precision basically needs 9 muls
and 7
> > >  > adds.
> > >  >
> > >  > Looks like on an MSP with hardware multiplier it'd be
possible to
> > >  > do all your calculations simply in float.
> > >  >
> > >  > Wolfgang
> > >
> > > First let me apologize to Wolfgang, Gary and the group - I
misread my
> > > own scribbles in creating the post. In fact, what I called
"K1" is
> > > actually another input variable. Your suggested pre-calculation
was
> > > completely valid for my post, but unfortunately not for my
actual
> > > application.
> > >
> > > Making the VERY broad approximation that each sin(), cos(),
sqrt()
> > > and atan2() takes 9 muls and 7 adds, I need to...
> > >
> > > convert the two variables to polar form
> > > (36 muls, 28 adds),
> > > do the complex divide
> > > (1 divide, 1 add),
> > > convert the result back to rectangular
> > > (20 muls, 14 adds),
> > > do the complex subtract,
> > > (2 adds)
> > > convert the result to polar
> > > (18 muls, 14 adds),
> > > do the complex multiply,
> > > (1 mul, 1 add)
> > > convert the result back to rectangular
> > > (20 muls, 14 adds),
> > >
> > > Total 95 muls, 1 div and 74 adds.
> > >
> > > At 4MHz/2mA I might expect the F435 to do 20 muls, 10 adds and 1
div
> > > in 4ms. Luckily the F149's hardware multiplier will help out
a lot,
> > > but whether I can do it all in FP in under 10ms still looks too
close
> > > to call.
> > >
> > > Thanks also to Karl for the Cordic tip, and Gary for 1/X =
1/(Xr+jXi)
> > > = (Xr-jXi)/(Xr^2+Xi^2) - it looks like it might be a bit
faster than
> > > what I was considering. More homework to do.
> > >
> > > Tony
> > >
> > >
> > >
> > > .
> > >
> > >
> > >
> > >
> >
> 
> > > >.
> > >
> > >
> >
> >
> >
> > .
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
>
>
>
> .
>
>
> Yahoo! Groups Links
>
>
>
>
>
>


yes asked but not specifically answered as pertaining to real world
( application ) requirements!!
Ezy

davidl@davi... wrote:
> Wrong address! :)
> 
> ----- Original Message -----
> From: "ezy" <ezrashumla@ezra...>
> To: <msp430@msp4...>
> Sent: Thursday, February 19, 2004 5:48 AM
> 
> 
>  > Hi all
>  > i have been following this thread and i wonder that no mention
>  > of resolution or accuracy requirements what are the specs
>  > Ezy
>  >
>  > synergymusic2000 wrote:
>  > > --- In msp430@msp4...,?)  
>  >  (eHTTP/1.1 200g@y...>
>  > > wrote:
>  > >  > If you can convert Y = (K1/X - K2)*K3 into Y=(K1*K3)/X -
K2*K3 and
>  > >  > pre-calculate K1*K3 and K2*K3, then you'd be able to
save some
>  > >  > operations.
>  > >  >
>  > >  > To give you an impression of how "long"
calculations take:
>  > >  > I have an application which requires about 20
multiplications, 10
>  > >  > add/sub, 1 div, every 10ms, all done in plain float (24
bit
>  > >  > precision). Together wiar channel = "eBay";
>  > //-->
>  > </scr 2..3ms
>  > > IIRC,
>  > >  > at 6MHz, 3mA, on a F435 which doesn't even have a
hardware
>  > >  > multiplier; Quadravox AQ430 C compiler.
>  > >  > I had considered doing all this in integer, with
appropriate
>  > > scaling
>  > >  > etc., but why complicate things unnecessarily?
>  > >  >
>  > >  > A sin() function for float precision basically needs 9
muls and 7
>  > >  > adds.
>  > >  >
>  > >  > Looks like on an MSP with hardware multiplier it'd be
possible to
>  > >  > do all your calculations simply in float.
>  > >  >
>  > >  > Wolfgang
>  > >
>  > > First let me apologize to Wolfgang, Gary and the group - I
misread my
>  > > own scribbles in creating the post. In fact, what I called
"K1" is
>  > > actually another input variable. Your suggested pre-calculation
was
>  > > completely valid for my post, but unfortunately not for my
actual
>  > > application.
>  > >
>  > > Making the VERY broad approximation that each sin(), cos(),
sqrt()
>  > > and atan2() takes 9 muls and 7 adds, I need to...
>  > >
>  > > convert the two variables to polar form
>  > > (36 muls, 28 adds),
>  > > do the complex divide
>  > > (1 divide, 1 add),
>  > > convert the result back to rectangular
>  > > (20 muls, 14 adds),
>  > > do the complex subtract,
>  > > (2 adds)
>  > > convert the result to polar
>  > > (18 muls, 14 adds),
>  > > do the complex multiply,
>  > > (1 mul, 1 add)
>  > > convert the result back to rectangular
>  > > (20 muls, 14 adds),
>  > >
>  > > Total 95 muls, 1 div and 74 adds.
>  > >
>  > > At 4MHz/2mA I might expect the F435 to do 20 muls, 10 adds and 1
div
>  > > in 4ms. Luckily the F149's hardware multiplier will help
out a lot,
>  > > but whether I can do it all in FP in under 10ms still looks too
close
>  > > to call.
>  > >
>  > > Thanks also to Karl for the Cordic tip, and Gary for 1/X =
1/(Xr+jXi)
>  > > = (Xr-jXi)/(Xr^2+Xi^2) - it looks like it might be a bit
faster than
>  > > what I was considering. More homework to do.
>  > >
>  > > Tony
>  > >
>  > >
>  > >
>  > > .
>  > >
>  > >
>  > >
>  > >
>  > > 
> 
>  > > >.
>  > >
>  > >
>  >
>  >
>  >
>  > .
>  >
>  >
>  > >. 
> 
> 


--- In msp430@msp4..., ezy <ezrashumla@n...> wrote:
> Hi all
> i have been following this thread and i wonder that no mention
> of resolution or accuracy requirements what are the specs
> Ezy

Thanks to all who contributed. I was looking for a 16 bit fixed point 
package, and therefore (?) was expecting accuracy approaching that 
resolution. And I have now found it in a round about way.

As I suggested earlier, my main need for the transcentals and for 
accuracy approaching 16 bits was to do the various conversions 
between rectangular and polar co-ordinates because I assumed that 
division (and by implication multiplication) should be done on 
numbers in a polar form.

But Gary pointed out that it's not that hard to get the reciprocal of 
a complex number (1/X = 1/(Xr+jXi) = (Xr-jXi)/(Xr^2+Xi^2)), and a 
complex multiply is trivial, so in the end, what I thought would be 
somewhere between difficult, expensive and impossible turns out to be 
almost trivial, and easily done in fast 16 bit fixed point as 
originally wanted.

I can't believe I didn't explore that approach earlier; but I guess 
that's one of the big plusses of discussing problems here - there's 
usually someone there to catch you if you trip up.

Reciprocal (Y=1/X, T1 anmd T2 are temp registers)
T1 = Xr * Xr
T2 = Xi * Xi + T1 (now T2 = X^2 = Xr^2 + Xi^2)
Yr = Xr / T2
Yi = -Xi / T2
Total 2 muls, 2 divs, 1 add.

Product Y = Yr + jYi = W * X = (Wr + jWi) * (Xr + jXi)
Yr = Wr*Xr - Wi*Xi
Yi = Wi*Xr + Wr*Xi
Total 4 muls, 2 adds

Divide (reciprocal then Mul) takes 6 muls, 2 divs, 3 adds.

Thus to calculate Y = (X/Y - K1)*K2 takes:
Op	Muls	Divs	Adds
Div	6	2	3
Sub	-	-	2
Mul	4	-	2
Total	10	2	7 - what a breeze!!




Memfault State of IoT Report