Re: way way off topic

2012-10-24 Thread Walter Hurry
On Tue, 23 Oct 2012 15:51:54 -0700, Gary Kline wrote:

>   lets say that x == 15 and y == 16.  Q:  how much less is x than 
y? it
>   is not just "1"; there was some other way of finding the answer.

6.25%


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: way way off topic

2012-10-24 Thread Erich Dollansky
Hi,

On Wed, 24 Oct 2012 10:23:17 +0200
Polytropon  wrote:

> On Wed, 24 Oct 2012 08:39:55 +0700, Erich Dollansky wrote:
> > Hi,
> > 
> > On Tue, 23 Oct 2012 18:13:05 -0700
> > Gary Kline  wrote:
> > 
> > > On Tue, Oct 23, 2012 at 05:52:02PM -0700, Gezeala M. Bacuño II
> > > wrote: if/when I ever find that v short exercise, THIS time, il'l
> > > remember to 'splain stuff in
> > > 
> > >   /*
> > >* comments
> > >*/
> > > 
> > your programs are not self-explanatory?
> 
> That's not modern today anymore. :-)
> 
> 
>   /*
>* this function is void,
>* it takes no args,
>* one of them is not a nickel,
>* adds minus 1 to the result
>* and then branches to register #14
>*/
>   setpicardcolor(); /* 4 lights! */
> 
this is so Seventies!

Erich
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Re: way way off topic

2012-10-24 Thread Polytropon
On Wed, 24 Oct 2012 08:39:55 +0700, Erich Dollansky wrote:
> Hi,
> 
> On Tue, 23 Oct 2012 18:13:05 -0700
> Gary Kline  wrote:
> 
> > On Tue, Oct 23, 2012 at 05:52:02PM -0700, Gezeala M. Bacuño II wrote:
> > if/when I ever find that v short exercise, THIS time, il'l remember to
> > 'splain stuff in
> > 
> > /*
> >  * comments
> >  */
> > 
> your programs are not self-explanatory?

That's not modern today anymore. :-)


/*
 * this function is void,
 * it takes no args,
 * one of them is not a nickel,
 * adds minus 1 to the result
 * and then branches to register #14
 */
setpicardcolor(); /* 4 lights! */

:-)



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: way way off topic

2012-10-23 Thread Erich Dollansky
Hi,

On Tue, 23 Oct 2012 18:13:05 -0700
Gary Kline  wrote:

> On Tue, Oct 23, 2012 at 05:52:02PM -0700, Gezeala M. Bacuño II wrote:
> if/when I ever find that v short exercise, THIS time, il'l remember to
>   'splain stuff in
> 
>   /*
>* comments
>*/
> 
your programs are not self-explanatory?

Erich
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Re: way way off topic

2012-10-23 Thread Gary Kline
On Tue, Oct 23, 2012 at 05:52:02PM -0700, Gezeala M. Bacuño II wrote:
> % change = ( (present - past) / past ) * 100
> 


yeah, this is exactly it for my "how much more is 16 than 15"
problem. or the ages example. 

It's 6.6[bar-over .6]%  this is probably close to or exactly
what was the core of my C [argc, *srgv[]] program.   my error was in
not understanding the logic that polttropon has given below.  if/when
I ever find that v short exercise, THIS time, il'l remember to
'splain stuff in

/*
 * comments
 */


> 
> On Tue, Oct 23, 2012 at 5:07 PM, Gary Kline  wrote:
> > On Tue, Oct 23, 2012 at 08:52:49AM +0200, Polytropon wrote:
> >> On Tue, 23 Oct 2012 11:31:18 +0700, Olivier Nicole wrote:
> >> > Gary,
> >> >
> >> > On Tue, Oct 23, 2012 at 11:20 AM, Gary Kline  wrote:
> >> > >
> >> > > apologies up front for this math type quandary. I had it in a std C 
> >> > > program,
> >> > > but 3+ hours of grepping havent found it.  I would have bet my last 
> >> > > cent that I
> >> > > had a summary Somewhere, but cant find that either.
> >> > >
> >> > > here is the problem as best I can remember it.
> >> > >
> >> > >
> >> > > let's say that john is 8 and his older friend, jim, is 22.
> >> > > how much older is exact percentage terms is jim?
> >> >
> >> > That should be 22/8=2.75
> >> > Jim is 275% older than John
> >>
> >> Jim is 175% _older_. Why? Because 100% older means 16 years,
> >> as 100% refers to 8 years (8+8=16, 200% older is 8+8+8=24).
> >> Percentage is always a reference to something else, in this
> >> question, Jim's age in relation to John's. The word "older"
> >> means "adding percentage", refering to the base value of 8,
> >> "divided in 100 parts" (floating point considerations aside),
> >> to finally reach the value 22.
> >>
> >> If the question would be different, say, "What's the percentage
> >> of John's age regarding Jim's age?" In that case, it would be
> >> 8/22=0.3636 being 36%. Obvious: John's age is approximately
> >> 1/3 of Jim's age.
> >>
> >> The easiest way for creating the proper calculation is to refer
> >> to the equation
> >>
> >>  percentage * 100
> >>   percentage value = 
> >>base value
> >>
> >> and resolve it to whatever is required.
> >>
> >> --
> >> Polytropon
> >> Magdeburg, Germany
> >> Happy FreeBSD user since 4.0
> >> Andra moi ennepe, Mousa, ...
> >
> >
> > yo; I THInk this is it. around line 4542 in my ~/.HowTo file::
> >
> >
> >
> > %%% find percent inc/dec [increase/decrease] between two numbers.
> >
> > Always figure the percentage of change relative to the original value!
> > For instance: * Suppose a certain item used to sell for seventy-five
> > cents a pound, you see that it's been marked up to eighty-one cents a
> > pound. What is the percent increase?
> >
> > First, I have to find the absolute
> > increase:
> > Reserved 81 - 75 = 6
> >
> > The price has gone up six cents. Now I can find the
> > percentage increase over the original price.
> >
> > This percentage increase is the relative change: 6/75 = 0.08
> > ...or an 8% increase in price per pound.
> >
> >
> >
> > So I was wrong about ages or speed; it's the % betwen two ints;
> > here, the inc/dec [or change] between 75 cents as compared to
> > an inflated increase of 81 cents.
> >
> > 1.  find abs increase:  81-75 = 6;
> > 2   find the % increase over the *original* value. 6.0/75.0
> > 3.  percent increase using doubles is 0.08;  so a markup of six
> > cents is an 8% rate.
> >
> >
> > so: going back to the ages example with john bein 8, jim, 22.
> > 22-8 is 14.
> > 14.0/8.0 = 1.75
> >
> > 175%.  jim is 175% times older than john.  which is what you found,
> > polyt.  {I'll have to re-read your logic now that im awake..}
> >
> > Or, how much more, in % is 16t than 15, it is 1.0/15.0 which is 6%.
> > etc,  etc.
> >
> > Hm.  that's 0 for gary, 729 for polytrop!!
> >
> > Ah, life:: accept no substitutes.
> >
> >
> >
> >
> > --
> >  Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
> >   Twenty-six years of service to the Unix community.
> >
> > ___
> > freebsd-questions@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
  Twenty-six years of service to the Unix community.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: way way off topic

2012-10-23 Thread Gezeala M . Bacuño II
% change = ( (present - past) / past ) * 100


On Tue, Oct 23, 2012 at 5:07 PM, Gary Kline  wrote:
> On Tue, Oct 23, 2012 at 08:52:49AM +0200, Polytropon wrote:
>> On Tue, 23 Oct 2012 11:31:18 +0700, Olivier Nicole wrote:
>> > Gary,
>> >
>> > On Tue, Oct 23, 2012 at 11:20 AM, Gary Kline  wrote:
>> > >
>> > > apologies up front for this math type quandary. I had it in a std C 
>> > > program,
>> > > but 3+ hours of grepping havent found it.  I would have bet my last cent 
>> > > that I
>> > > had a summary Somewhere, but cant find that either.
>> > >
>> > > here is the problem as best I can remember it.
>> > >
>> > >
>> > > let's say that john is 8 and his older friend, jim, is 22.
>> > > how much older is exact percentage terms is jim?
>> >
>> > That should be 22/8=2.75
>> > Jim is 275% older than John
>>
>> Jim is 175% _older_. Why? Because 100% older means 16 years,
>> as 100% refers to 8 years (8+8=16, 200% older is 8+8+8=24).
>> Percentage is always a reference to something else, in this
>> question, Jim's age in relation to John's. The word "older"
>> means "adding percentage", refering to the base value of 8,
>> "divided in 100 parts" (floating point considerations aside),
>> to finally reach the value 22.
>>
>> If the question would be different, say, "What's the percentage
>> of John's age regarding Jim's age?" In that case, it would be
>> 8/22=0.3636 being 36%. Obvious: John's age is approximately
>> 1/3 of Jim's age.
>>
>> The easiest way for creating the proper calculation is to refer
>> to the equation
>>
>>  percentage * 100
>>   percentage value = 
>>base value
>>
>> and resolve it to whatever is required.
>>
>> --
>> Polytropon
>> Magdeburg, Germany
>> Happy FreeBSD user since 4.0
>> Andra moi ennepe, Mousa, ...
>
>
> yo; I THInk this is it. around line 4542 in my ~/.HowTo file::
>
>
>
> %%% find percent inc/dec [increase/decrease] between two numbers.
>
> Always figure the percentage of change relative to the original value!
> For instance: * Suppose a certain item used to sell for seventy-five
> cents a pound, you see that it's been marked up to eighty-one cents a
> pound. What is the percent increase?
>
> First, I have to find the absolute
> increase:
> Reserved 81 - 75 = 6
>
> The price has gone up six cents. Now I can find the
> percentage increase over the original price.
>
> This percentage increase is the relative change: 6/75 = 0.08
> ...or an 8% increase in price per pound.
>
>
>
> So I was wrong about ages or speed; it's the % betwen two ints;
> here, the inc/dec [or change] between 75 cents as compared to
> an inflated increase of 81 cents.
>
> 1.  find abs increase:  81-75 = 6;
> 2   find the % increase over the *original* value. 6.0/75.0
> 3.  percent increase using doubles is 0.08;  so a markup of six
> cents is an 8% rate.
>
>
> so: going back to the ages example with john bein 8, jim, 22.
> 22-8 is 14.
> 14.0/8.0 = 1.75
>
> 175%.  jim is 175% times older than john.  which is what you found,
> polyt.  {I'll have to re-read your logic now that im awake..}
>
> Or, how much more, in % is 16t than 15, it is 1.0/15.0 which is 6%.
> etc,  etc.
>
> Hm.  that's 0 for gary, 729 for polytrop!!
>
> Ah, life:: accept no substitutes.
>
>
>
>
> --
>  Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
>   Twenty-six years of service to the Unix community.
>
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: way way off topic

2012-10-23 Thread Gary Kline
On Tue, Oct 23, 2012 at 08:52:49AM +0200, Polytropon wrote:
> On Tue, 23 Oct 2012 11:31:18 +0700, Olivier Nicole wrote:
> > Gary,
> > 
> > On Tue, Oct 23, 2012 at 11:20 AM, Gary Kline  wrote:
> > >
> > > apologies up front for this math type quandary. I had it in a std C 
> > > program,
> > > but 3+ hours of grepping havent found it.  I would have bet my last cent 
> > > that I
> > > had a summary Somewhere, but cant find that either.
> > >
> > > here is the problem as best I can remember it.
> > >
> > >
> > > let's say that john is 8 and his older friend, jim, is 22.
> > > how much older is exact percentage terms is jim?
> > 
> > That should be 22/8=2.75
> > Jim is 275% older than John
> 
> Jim is 175% _older_. Why? Because 100% older means 16 years,
> as 100% refers to 8 years (8+8=16, 200% older is 8+8+8=24).
> Percentage is always a reference to something else, in this
> question, Jim's age in relation to John's. The word "older"
> means "adding percentage", refering to the base value of 8,
> "divided in 100 parts" (floating point considerations aside),
> to finally reach the value 22.
> 
> If the question would be different, say, "What's the percentage
> of John's age regarding Jim's age?" In that case, it would be
> 8/22=0.3636 being 36%. Obvious: John's age is approximately
> 1/3 of Jim's age.
> 
> The easiest way for creating the proper calculation is to refer
> to the equation
> 
>  percentage * 100
>   percentage value = 
>base value
> 
> and resolve it to whatever is required.
> 
> -- 
> Polytropon
> Magdeburg, Germany
> Happy FreeBSD user since 4.0
> Andra moi ennepe, Mousa, ...


yo; I THInk this is it. around line 4542 in my ~/.HowTo file::



%%% find percent inc/dec [increase/decrease] between two numbers.

Always figure the percentage of change relative to the original value!
For instance: * Suppose a certain item used to sell for seventy-five
cents a pound, you see that it's been marked up to eighty-one cents a
pound. What is the percent increase?

First, I have to find the absolute
increase:
Reserved 81 - 75 = 6

The price has gone up six cents. Now I can find the
percentage increase over the original price.

This percentage increase is the relative change: 6/75 = 0.08
...or an 8% increase in price per pound.



So I was wrong about ages or speed; it's the % betwen two ints;
here, the inc/dec [or change] between 75 cents as compared to
an inflated increase of 81 cents.

1.  find abs increase:  81-75 = 6;
2   find the % increase over the *original* value. 6.0/75.0
3.  percent increase using doubles is 0.08;  so a markup of six
cents is an 8% rate.


so: going back to the ages example with john bein 8, jim, 22.
22-8 is 14.
14.0/8.0 = 1.75

175%.  jim is 175% times older than john.  which is what you found,
polyt.  {I'll have to re-read your logic now that im awake..}

Or, how much more, in % is 16t than 15, it is 1.0/15.0 which is 6%.
etc,  etc.

Hm.  that's 0 for gary, 729 for polytrop!!

Ah, life:: accept no substitutes.




-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
  Twenty-six years of service to the Unix community.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: way way off topic

2012-10-23 Thread Gary Kline
On Tue, Oct 23, 2012 at 08:52:49AM +0200, Polytropon wrote:
> On Tue, 23 Oct 2012 11:31:18 +0700, Olivier Nicole wrote:
> > Gary,
> > 
> > On Tue, Oct 23, 2012 at 11:20 AM, Gary Kline  wrote:
> > >
> > > apologies up front for this math type quandary. I had it in a std C 
> > > program,
> > > but 3+ hours of grepping havent found it.  I would have bet my last cent 
> > > that I
> > > had a summary Somewhere, but cant find that either.
> > >
> > > here is the problem as best I can remember it.
> > >
> > >
> > > let's say that john is 8 and his older friend, jim, is 22.
> > > how much older is exact percentage terms is jim?
> > 
> > That should be 22/8=2.75
> > Jim is 275% older than John
> 
> Jim is 175% _older_. Why? Because 100% older means 16 years,
> as 100% refers to 8 years (8+8=16, 200% older is 8+8+8=24).
> Percentage is always a reference to something else, in this
> question, Jim's age in relation to John's. The word "older"
> means "adding percentage", refering to the base value of 8,
> "divided in 100 parts" (floating point considerations aside),
> to finally reach the value 22.
> 
> If the question would be different, say, "What's the percentage
> of John's age regarding Jim's age?" In that case, it would be
> 8/22=0.3636 being 36%. Obvious: John's age is approximately
> 1/3 of Jim's age.
> 
> The easiest way for creating the proper calculation is to refer
> to the equation
> 
>  percentage * 100
>   percentage value = 
>base value
> 
> and resolve it to whatever is required.
> 


I just took a cup's worth of coffee/caffeine to bring me back up! but
it seems to me that your logic is about the same as I remember 
otherwise stated in getting the true differences in ages or speeds
[say or cars. x == 200clicks/hr, y == 400 clicks/hour.] or 
*whatever*.  it isn't as easy as it would seem at first thought.



> -- 
> Polytropon
> Magdeburg, Germany
> Happy FreeBSD user since 4.0
> Andra moi ennepe, Mousa, ...

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
  Twenty-six years of service to the Unix community.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: way way off topic

2012-10-23 Thread Gary Kline
On Tue, Oct 23, 2012 at 11:34:36AM +0700, Erich Dollansky wrote:
> Hi,
> 
> On Mon, 22 Oct 2012 21:20:07 -0700
> Gary Kline  wrote:
> 
> > 
> > apologies up front for this math type quandary. I had it in a std C
> > program, but 3+ hours of grepping havent found it.  I would have bet
> > my last cent that I had a summary Somewhere, but cant find that
> > either.
> > 
> > here is the problem as best I can remember it.
> > 
> > 
> > let's say that john is 8 and his older friend, jim, is 22.  
> > how much older is exact percentage terms is jim?
> > 
> > to find the answer I had to find the relative difference {22 - 8} and
> > then do something with the difference.  this isn't any kind of trick
> > or "advanced-cognition"; I just thought it was clever [and exact].
> > it obviously works for finding the abs() results in subtraction.
> > it's something I found on the web and swipes and save the prose
> > discussion.  BZZT: Lost, :-(
> > 
> It seems that I am also lost. What should abs() do here?
> 
> I would multiply the age of john and the difference with 100 and then
> divide the result to get the percentage.
> 
> Or did I get lost here?
> 
> > if this seems dumb, I plead guilty!
> > 
> > im asking here because -questions is the sharpest list on the net.
> > 
> 
> Are you sure?
> 
> Erich

LOL.  yes!  

it's been years since I used the steps to find the accurant amount of
difference.  it may not have involved a %.  I can only think of one
concrete example.

lets say that x == 15 and y == 16.  Q:  how much less is x than y?
it is not just "1"; there was some other way of finding the answer.  


-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
  Twenty-six years of service to the Unix community.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: way way off topic

2012-10-23 Thread Gary Kline
On Tue, Oct 23, 2012 at 11:31:18AM +0700, Olivier Nicole wrote:
> Gary,
> 
> On Tue, Oct 23, 2012 at 11:20 AM, Gary Kline  wrote:
> >
> > apologies up front for this math type quandary. I had it in a std C program,
> > but 3+ hours of grepping havent found it.  I would have bet my last cent 
> > that I
> > had a summary Somewhere, but cant find that either.
> >
> > here is the problem as best I can remember it.
> >
> >
> > let's say that john is 8 and his older friend, jim, is 22.
> > how much older is exact percentage terms is jim?
> 
> That should be 22/8=2.75
> Jim is 275% older than John
> 
> Olivier
> 

thanks.  but this wasn't the formula I remember mousing 
down.  I'll keep looking.

gary

ps:  it was involved; something with three or more steps.
things that I had crammed together in one line of C... 


> > to find the answer I had to find the relative difference {22 - 8} and then
> > do something with the difference.  this isn't any kind of trick or
> > "advanced-cognition"; I just thought it was clever [and exact].  it 
> > obviously
> > works for finding the abs() results in subtraction.  it's something I found 
> > on
> > the web and swipes and save the prose discussion.  BZZT: Lost, :-(
> >
> > if this seems dumb, I plead guilty!
> >
> > im asking here because -questions is the sharpest list on the net.
> >
> > --
> >  Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
> >   Twenty-six years of service to the Unix community.
> >
> > ___
> > freebsd-questions@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
  Twenty-six years of service to the Unix community.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: way way off topic

2012-10-23 Thread perryh
Olivier Nicole  wrote:
> On Tue, Oct 23, 2012 at 11:20 AM, Gary Kline  wrote:
> > apologies up front for this math type quandary. I had it in
> > a std C program, but 3+ hours of grepping havent found it.
> > I would have bet my last cent that I had a summary Somewhere,
> > but cant find that either.
> >
> > here is the problem as best I can remember it.
> >
> > let's say that john is 8 and his older friend, jim, is 22.
> > how much older is exact percentage terms is jim?
>
> That should be 22/8=2.75
> Jim is 275% older than John

No, a subtraction is needed if we wish to use the term "older".
Suppose Jim were 9; the above approach would give 9/8 => 1.125
so Jim is 113% older than John, which is clearly wrong (although
one could correctly say in that case that John's age is 113% of
Jim's age).

I think the OP is probably looking for

  ((22 - 8) * 100 + (8/2)) / 8

which will give the answer directly as a correctly-rounded
integral percentage.  (For a fractional percentage, use floats
instead of ints and omit the (8/2) part -- but in that case
you probably also want to express the ages in something other
than whole years.)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: way way off topic

2012-10-22 Thread Polytropon
On Tue, 23 Oct 2012 11:31:18 +0700, Olivier Nicole wrote:
> Gary,
> 
> On Tue, Oct 23, 2012 at 11:20 AM, Gary Kline  wrote:
> >
> > apologies up front for this math type quandary. I had it in a std C program,
> > but 3+ hours of grepping havent found it.  I would have bet my last cent 
> > that I
> > had a summary Somewhere, but cant find that either.
> >
> > here is the problem as best I can remember it.
> >
> >
> > let's say that john is 8 and his older friend, jim, is 22.
> > how much older is exact percentage terms is jim?
> 
> That should be 22/8=2.75
> Jim is 275% older than John

Jim is 175% _older_. Why? Because 100% older means 16 years,
as 100% refers to 8 years (8+8=16, 200% older is 8+8+8=24).
Percentage is always a reference to something else, in this
question, Jim's age in relation to John's. The word "older"
means "adding percentage", refering to the base value of 8,
"divided in 100 parts" (floating point considerations aside),
to finally reach the value 22.

If the question would be different, say, "What's the percentage
of John's age regarding Jim's age?" In that case, it would be
8/22=0.3636 being 36%. Obvious: John's age is approximately
1/3 of Jim's age.

The easiest way for creating the proper calculation is to refer
to the equation

   percentage * 100
percentage value = 
 base value

and resolve it to whatever is required.

-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: way way off topic

2012-10-22 Thread Erich Dollansky
Hi,

On Mon, 22 Oct 2012 21:20:07 -0700
Gary Kline  wrote:

> 
> apologies up front for this math type quandary. I had it in a std C
> program, but 3+ hours of grepping havent found it.  I would have bet
> my last cent that I had a summary Somewhere, but cant find that
> either.
> 
> here is the problem as best I can remember it.
> 
> 
>   let's say that john is 8 and his older friend, jim, is 22.  
>   how much older is exact percentage terms is jim?
> 
> to find the answer I had to find the relative difference {22 - 8} and
> then do something with the difference.  this isn't any kind of trick
> or "advanced-cognition"; I just thought it was clever [and exact].
> it obviously works for finding the abs() results in subtraction.
> it's something I found on the web and swipes and save the prose
> discussion.  BZZT: Lost, :-(
> 
It seems that I am also lost. What should abs() do here?

I would multiply the age of john and the difference with 100 and then
divide the result to get the percentage.

Or did I get lost here?

> if this seems dumb, I plead guilty!
> 
> im asking here because -questions is the sharpest list on the net.
> 

Are you sure?

Erich
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: way way off topic

2012-10-22 Thread Olivier Nicole
Gary,

On Tue, Oct 23, 2012 at 11:20 AM, Gary Kline  wrote:
>
> apologies up front for this math type quandary. I had it in a std C program,
> but 3+ hours of grepping havent found it.  I would have bet my last cent that 
> I
> had a summary Somewhere, but cant find that either.
>
> here is the problem as best I can remember it.
>
>
> let's say that john is 8 and his older friend, jim, is 22.
> how much older is exact percentage terms is jim?

That should be 22/8=2.75
Jim is 275% older than John

Olivier

> to find the answer I had to find the relative difference {22 - 8} and then
> do something with the difference.  this isn't any kind of trick or
> "advanced-cognition"; I just thought it was clever [and exact].  it obviously
> works for finding the abs() results in subtraction.  it's something I found on
> the web and swipes and save the prose discussion.  BZZT: Lost, :-(
>
> if this seems dumb, I plead guilty!
>
> im asking here because -questions is the sharpest list on the net.
>
> --
>  Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
>   Twenty-six years of service to the Unix community.
>
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"