Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Brainteaser: Complex Calculation

Status
Not open for further replies.

Quan9r

Technical User
May 18, 2000
36
US
I'm having trouble developing a complex query:
I'm trying to calculate the Body Fat % (for women)based upon the Waist, Hips and Height measurement using the following formula:
%Fat=495/(1.29579-.35004(log(abd1+hip-neck))+.22100(log(height)))-450
Using the following numbers:
29" waist, 37.25" hips, 12.25" neck, who is 64" tall I should get the following answer:
%Fat = 495/(1.29579-.74812+.48863)-450 = 27.659
However; Access requires me to put the following
%Fat=495/(1.29579-.35004*(log(abd1+hip-neck))+.22100*(log(height))-450
My answer is
Expr1: 15469.15% Obviously incorrect - It must be those *

Any ideas on how I can get this formula to work correctly?

Thanks for taking the time
 
Get rid of the % symbols in the variable names. I've tried the following:

abd1 = 29
hip = 37.25
neck = 12.25
Height = 64
Fat = 495 / (1.29579 - 0.35004 * Log(abd1 + hip - neck) + 0.221 * Log(Height)) - 450

Which gives 154.69 as the result; which you say is wrong. I can only suggest that your formula specification is incorrect. Also, you talk about 'waist', but then refer to abd1 in the formula. Same thing I assume ??

Nothing wrong with the * operator; standard multiplier. Can only suggest that you review your formula.


Cheers,

Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
 
Are you sure that you and access are using the correct LOG

Elm logs burn fast and hot, but Pine logs lasts longer.


In a similar way Log base 10 and Log base e ( Natural Logs ) will give stunningly different answers.

Excel ASSUMES Base 10 if you don't tell it any different
Access ASSUMES Base e if you don't tell it any different
Log(x) is normally taken ( in the engineering world ) to mean base 10
Ln(x) is the base e equivalent.

Confused ? - if you're not, the read it again !


If you happen to have coppied the equation from Excel then I've found your problem.


'ope-that-'elps.

G LS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top