Re: control loop for contraction

Re: control loop for contraction

am 23.10.2007 10:42:48 von Joe Smith

Wade Ward wrote:
> no takers?

It was only 4.5 hours since you first posted your question. You should
wait at least 36 hours for your posting to propagate through USENET before
coming to the conclusion that there are no takers.

> I'm trying to calculate an x s.t. 10 = (2**x )*1600.

The code from the first posting is a bit bizarre, and does not appear
to have anything to do with that statement. And your subject line:
did you mean to say "reduction" instead? "contraction" does not make sense here.
The pseudo code from the second posting is less coherent.

10 = (2**x) * 1600
10/1600 = 2 ** x
log(10/1600) = log(2) * x
x = log(10/1600) / log(2)

linux% perl -le 'print log(10/1600)/log(2)'
-7.32192809488736
linux% perl -le 'print +(2**-7.32192809488736)*1600'
10

-Joe

Re: control loop for contraction

am 24.10.2007 09:28:42 von Joe Smith

Wade Ward wrote:

> my $number14 = 42;
> $number14 = ++ $number14;

Don't attempt to change the value of a variable on both the left and
the right of an equal sign at the same time. Use just one of these three:

$number14 = $number14 + 1;
++$number14;
$number14++;

> # a cup is a twelfth of a quart

No, a pint is half a quart and a cup is half a pint.
A cup is one quarter of a quart.

Why in the heck is there a comment about line 16 of sugar.pl?
Why even bother with anything before "$no10=7.5"? All worthless.

I give up. It appears that you are not serious.

-Joe