erk.

And Stuart reminded me, off list, that I had forgotten to mention that
the code depends on calling bc with the "-l" option, for the "library"
power of e function I'm using below.

I'm just not with it today.

On Mon, Jan 11, 2016 at 5:19 PM, Joel Rees <[email protected]> wrote:
> Oh, neverr mind. Sorry about the noise.
>
> On Mon, Jan 11, 2016 at 4:23 PM, Joel Rees <[email protected]> wrote:
>> Given the following code,
>>
>> ----------------------------
>> define vc(vs,t,r,c) {
>>   return vs * (1-e(-t/(r*c)));
>> }
>>
>> scale = 5;
>> vs = 120;
>> r = 60;
>> c = .01;
>> for ( t=0.0; t<5.0; t += 0.1 ) {
>>   vc = vc(vs,t,r,c );
>>   vr = vs - vc;
>>   a = vr / r;
>>   p = vr * a;
>>   print"t: ", t, "  vc:", vc(vs,t,r,c ), "  a: ", a, "  p: ", p,  "\n"
>> }
>> ----------------------------
>>
>> openbsd's bc puts out a lot of
>>
>>     bc: [Unicode proxy 0001 or so](01) is unimplemented
>>
>> messages. In spite of those messages, it seems to be running alright,
>> seems to give correct answers mixed in with the messages about
>> unimplemented (operations?).
>>
>> I get the messages whether I type it in by hand or copy/paste it from my 
>> blog.
>>
>> Is this known behavior?
>
> I remember now. Identifiers are only one letter:
>
> --------------------
> define v(s,t,r,c) {
>   return s * (1-e(-t/(r*c)));
> }
>
> scale = 5;
> s = 120;
> r = 60;
> c = .01;
> for ( t=0.0; t<5.0; t += 0.1 ) {
>   v = v(s,t,r,c );
>   z = s - v;
>   a = z / r;
>   p = z * a;
>   print "t: ", t, "  vc:", v, "  a: ", a, "  p: ", p,  "\n"
> }
> --------------------

-- 
Joel Rees

Be careful when you look at conspiracy.
Arm yourself with knowledge of yourself, as well:
http://reiisi.blogspot.jp/2011/10/conspiracy-theories.html

Reply via email to