Okay, I'm into some of the calculations for the calculator program now - and
right away I noticed a couple of problems.
The first is the 'ideal weight' formula - there has _got_ to be something
wrong with this, LOL.
The formula(s) as given:
d) Ideal Body Weight (men) = 50 + 2.3 ( Height(in) - 60)
e) Ideal Body Weight (women) = 45.5 + 2.3 ( Height(in) - 60)
Okay, so I'm 67" tall - and according to this formula, my ideal body weight
is 61.6lbs, unless I'm misinterpreting how it's written or have forgotten
the order of mathematical operations:
67-60=7
2.3*7=16.1
16.1+45.5=61.6
I think I'd probably die before I ever reached that weight, <g>.
The next is the Lean Body Weight formula:
b) Lean Body Weight (men) = (1.10 x Weight(kg)) - 128 ( Weight2/(100 x
Height(m))2)
c) Lean Body Weight (women) = (1.07 x Weight(kg)) - 148 ( Weight2/(100 x
Height(m))2)
What is 'weight2' in the second half of the formula?
Stargazer - 11 Mar 2004 00:01 GMT
> Okay, I'm into some of the calculations for the calculator program now - and
> right away I noticed a couple of problems.
[quoted text clipped - 6 lines]
>
> What is 'weight2' in the second half of the formula?
Actually, looking at it again, there's more I don't understand about that
formula, again the second part. The possibilities I can see for 'Weight2'
could be weight times two, weight squared, or weight number 2 (a variable
for a second weight). Same with height in meters - is that height times 100
times two (divided into whatever the weight is), or height times 100 squared
(divided into whatever the weight is)?
I'm wholly confoozled... <g
DJ Delorie - 11 Mar 2004 02:27 GMT
> The formula(s) as given:
> d) Ideal Body Weight (men) = 50 + 2.3 ( Height(in) - 60)
[quoted text clipped - 3 lines]
> Okay, so I'm 67" tall - and according to this formula, my ideal body weight
> is 61.6lbs, unless I'm misinterpreting how it's written or have forgotten
Kilograms. 61.6 kg = 135.5 lbs
See http://www.delorie.com/health/calories.cgi?source to see all the
math done out in perl equations.
> The next is the Lean Body Weight formula:
> b) Lean Body Weight (men) = (1.10 x Weight(kg)) - 128 ( Weight2/(100 x
[quoted text clipped - 4 lines]
>
> What is 'weight2' in the second half of the formula?
weight squared.
$lbm = (1.10 * $kg) - 128 * ($kg*$kg/((100*$hm)*(100*$hm)));
Stargazer - 11 Mar 2004 11:03 GMT
> > The formula(s) as given:
> > d) Ideal Body Weight (men) = 50 + 2.3 ( Height(in) - 60)
[quoted text clipped - 5 lines]
>
> Kilograms. 61.6 kg = 135.5 lbs
Ah, that would make a difference, <g>. My mistake was in assuming pounds
since the height was in inches - it didn't even occur to me that it might be
Kg. I did look at your site (source) last night but saw the same formula
there - I had missed the conversion back to pounds under it though.
> See http://www.delorie.com/health/calories.cgi?source to see all the
> math done out in perl equations.
> > The next is the Lean Body Weight formula:
> > b) Lean Body Weight (men) = (1.10 x Weight(kg)) - 128 ( Weight2/(100 x
[quoted text clipped - 8 lines]
>
> $lbm = (1.10 * $kg) - 128 * ($kg*$kg/((100*$hm)*(100*$hm)));
Thanks! :)
One of these days I'm going to have to learn Perl - so much neat stuff you
can do with it, and I've always preferred to be able to understand what a
script is doing (so I can write it myself and/or tailor one already
available) rather than just grabbing one off the shelf and using it without
understanding it (which is probably why I haven't made use of a lot of
scripting to date - both because I haven't been called upon to, and because
I am not at all strong in any scripting language). I have a book on Perl
(one of the rare ones written with IIS in mind rather than Unix) but have
yet to crack it open. I can see already from your code that there's going
to be some things for me to get used to if I ever do pick up the book - for
example in VB (or any older version of BASIC back to the beginning, really),
the $ character is only used with string data types. And you can get some
strange results by doing math functions on a string without first returning
its numerical value. On simple equations it will usually come out okay if
you forget, but on more complex ones it tends to choke.
revek - 11 Mar 2004 11:31 GMT
Stargazer burbled across the ether:
> Okay, I'm into some of the calculations for the calculator program
> now - and right away I noticed a couple of problems.
Geeze, go away for a couple of days and get hit with math questions.
Horrors. I'm glad DJ answered them because I had no clue. :)
For anybody that might care: there is a hint that I may have surgery
real soon now... depending on what the latest cat scan says. Still the
possibility of abcess. Sigh.

Signature
revek www.geocities.com/tanirevek/LowCarb.html lowcarbing since June
2002 5'2" 41 F 165+/too much/size seven petite please
After the government takes enough to balance the budget, the taxpayer
has the job of budgeting the balance.
Stargazer - 11 Mar 2004 11:38 GMT
> Stargazer burbled across the ether:
> > Okay, I'm into some of the calculations for the calculator program
[quoted text clipped - 6 lines]
> real soon now... depending on what the latest cat scan says. Still the
> possibility of abcess. Sigh.
Ugh - I had really hoped that you'd seen an end to the surgeries. I'm
really sorry that you might have to go back yet again, hospitals are not fun
and recovery isn't either. I'll be hoping and praying the best for you -
first that there's no abcess and you won't have to go back, and second that
if you do it will all go well and everything will be cleared up, <g>.
Archon - 11 Mar 2004 11:45 GMT
> Ugh - I had really hoped that you'd seen an end to the surgeries. I'm
> really sorry that you might have to go back yet again, hospitals are not fun
A Hospital is ironically one of the places with highest risk of getting
severely ill.
revek - 15 Mar 2004 08:49 GMT
Stargazer burbled across the ether:
>> Stargazer burbled across the ether:
>>> Okay, I'm into some of the calculations for the calculator program
[quoted text clipped - 13 lines]
> back, and second that if you do it will all go well and everything
> will be cleared up, <g>.
Well something worked. He says it's disappearing (not quite gone yet
but getting there). So unless it goes downhill, he's not going to do
anything. Yay.

Signature
revek www.geocities.com/tanirevek/LowCarb.html lowcarbing since June
2002 5'2" 41 F 165+/too much/size seven petite please
Ambition is a poor excuse for not having enough sense to be lazy.