On Wed 4 August 2004, 13:36:31 +1000, Michael L. Wilson wrote: MLW>>> I am trying to complete the following calculation > MLW>>> 100*(x/x+y) > MLW>>> x = %STATSPAMLETTERS = 77 MLW>>> y = %STATNONSPAMLETTERS = 185 > MLW>>> Using a calculator, I get 29.389 > MLW>>> I cannot get this value using The Bat! %calc macro or anything else. MLW>>> How do I do this kind of math in a The Bat! Macro? > IAW>> It depends on what you are trying to calculate. > IAW>> If you want to divide x by the sum of x+y then you need to bracket the IAW>> x+y as in x/(x+y) otherwise it is just x/x to which y is added. In IAW>> other words, you are multiplying 100 by 1 plus the value of y. > > Actually, it does not work unless I use the undocumented %sum() macro.
It does for me. A QT consisting of %calculate("100*77/(77+185)") gives me 29.389313 -- Robin Anson Using The Bat! v2.12.00 on Windows XP 5.1 Build 2600 Service Pack 1 Running [EMAIL PROTECTED] (see: www.setiathome.ssl.berkeley.edu) No of SETI units returned: 306 Processing time: 1 years, 252 days, 11 hours. ________________________________________________ Current version is 2.12.00 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html