groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bc and dc.


From: Alejandro Colomar
Subject: Re: bc and dc.
Date: Fri, 28 Apr 2023 15:46:28 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0

Hi Raplh,

On 4/28/23 15:43, Ralph Corderoy wrote:
> Hi Alejandro,
> 
>> I could only see this:
>>
>>     $ echo 'l(1114112) / l(2)' | bc -lc
>>     @iK1114112:C2,0:K2:C2,0:/W@r
>>     @i
> 
> That's GNU bc.  Its -c dumps its internal byte code rather than dc code
> because it nevers runs dc.
> 
>>     $ echo 'l(1114112) / l(2)' | /usr/lib/plan9/bin/bc -c
>>      1114112 l<12>x 2 l<12>x/ps.
>>     q
> 
> That's correct output.  The <12> is ASCII FF and is the name of the l()
> function as defined by the dc code in bc's -l maths library.
> 
>>     $ echo 'l(1114112) / l(2)' | /usr/lib/plan9/bin/bc -lc
>>     c[cannot open input file:1, ]pc
>>      1114112 l<12>x 2 l<12>x/ps.
>>     q
> 
> There's your problem.  When your plan9/bin/bc is given -l, it produces
> dc to print ‘cannot open input file:1, ’.  Looks like the installation
> is incomplete or the file is present but in the wrong place.
> 
> At a guess, have you a /usr/lib/plan9/lib/bclib?

It seems Debian's plan9 port is incomplete in that regard:

$ apt-file find /usr/lib/plan9/lib/bclib
$ apt-file find bclib
$
$ apt-file find /usr/lib/plan9/bin/bc
9base: /usr/lib/plan9/bin/bc

:(


Cheers,
Alex



reply via email to

[Prev in Thread] Current Thread [Next in Thread]