Post Reply 
A somewhat different Newton solver (HP35s)
09-27-2018, 10:04 PM
Post: #12
RE: A somewhat different Newton solver (HP35s)
.
Hi, Dieter:

(09-27-2018 01:07 PM)Dieter Wrote:  A complex multiply is just four real multiplications, and two additions/subtractions.

It can be done with just three real multiplications (instead of 4) and five additions/subtractions (instead of two), i.e. trading one multiplication for three add/subs.

In user code (say RPN) this would probably fail to be advantageous because the time to execute a "*" is about the same as the time to execute a "+" or "-", which in both cases is dominated by overhead not related to the actual math operation.

However, if doing the multiplications, additions and subtractions as part of a microcoded keyword or function (such as the ones Ángel implements all the time) then the individual overheads are much less and it might be the case that calling (or implementing) a microcode (or assembly language) multiplication might be more expensive than doing three extra subs/adds, and thus the 3m+5as way would be faster than the 4m+2as one.

Ángel probably has tested this possibility and if so he knows what's better (or if not he might try it) and will perhaps share his experience with us.

Regards.
V.
.

  
All My Articles & other Materials here:  Valentin Albillo's HP Collection
 
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: A somewhat different Newton solver (HP35s) - Valentin Albillo - 09-27-2018 10:04 PM



User(s) browsing this thread: 2 Guest(s)