Mombu the Science Forum sponsored links

Go Back   Mombu the Science Forum > Science > rescaling list of numbers
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 13th April 00:01
poespam-trap
External User
 
Posts: 1
Default rescaling list of numbers



Crossposted to the numerical ****ysis group. You want to
guarantee that the sum, when evaluated, is exactly
1.0 to the last bit? It seems to me the most troublesome
cases will arise when:
- The a's differ in sign and
- differ widely in magnitude

I think you'll get the most accurate sum if you add them
in order of increasing magnitude. But I'm not completely
sure about that -- what if a_n is very close to -a_{n-1}?

All I can come up with is what you'd probably call ad-hoc:
Add the numbers (in whatever order seems best), divide
by the sum, then reset a_n = 1.0 - sum(a_1,..., a_{n-1}).

- Randy
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666