Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Add numbers in log domain

by BrowserUk (Pope)
on Jun 04, 2012 at 12:47 UTC ( #974285=note: print w/ replies, xml ) Need Help??


in reply to Re: Add numbers in log domain
in thread Add numbers in log domain [solved]

Spot on! (Though you do need to know the arbitrary base B):

sub log2p5{ log( $_[0] ) / log( 2.5 ) };; $X = log2p5( 10 ); $Y = log2p5( 15 ); $Z = log2p5( 10 + 15 ); print $X, $Y, $Z;; 2.51294159473206 2.95544864408182 3.51294159473206 print 2.51294159473206 + log2p5( 1 + 2.5**( 2.95544864408182 - 2.51294 +159473206 ) );; 3.51294159473206

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?


Comment on Re^2: Add numbers in log domain
Download Code
Re^3: Add numbers in log domain
by salva (Monsignor) on Jun 04, 2012 at 12:53 UTC
    yes, but it is easy to convert from any base to natural, perform the computation and then convert back to the original base.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://974285]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2013-05-25 06:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best material for plates (tableware) is:









    Results (519 votes), past polls