Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Arithmetic deduction/extraction
Replies: 3   Last Post: Apr 12, 2013 1:26 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Steven Lord

Posts: 17,944
Registered: 12/7/04
Re: Arithmetic deduction/extraction
Posted: Apr 11, 2013 11:49 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply



"kees de Kapper" <kees_de_kapper@hotmail.com> wrote in message
news:kk6gdl$8jq$1@newscl01ah.mathworks.com...
> Hi All,
>
> Although this is not purely Matlab related, I need for a matlab script.
> Hopefully some of you could help me with this.
>
> Consider a a formula like: (2*A+(B.^2+1)/3)
>
> How could I split this in separate arithmetic operations on a most
> efficient way.


I have a question and some clarifications requests.

Please clarify what YOU mean by "most efficient way" (wall clock time, CPU
time, number of operations, minimal memory allocation, etc.) and specify
what arithmetic operations you're allowed to use.

For instance, there's no FMA operation
(http://en.wikipedia.org/wiki/Multiply%E2%80%93accumulate_operation) in
MATLAB but certain expressions simplify down to one operation if you're
allowed to include that in your instruction set.

Similarly, do you count sin(x) as one "arithmetic operation" or do you need
to count all the additions, multiplications, etc. required to implement
CORDIC (http://en.wikipedia.org/wiki/CORDIC) or FDLIBM
(http://www.netlib.org/fdlibm/) in your count?

The question I have (I consider all the above as clarification) is why are
you doing this? What is your end goal in doing this?

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.