sbase

suckless unix tools
git clone git://git.suckless.org/sbase
Log | Files | Refs | README | LICENSE

commit 2cf8559bad6eef27f2f4279afb0282f678a95c09
parent 2e9d76d21711d3c8f62d350e5cf9e68deda78031
Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
Date:   Tue, 25 Nov 2025 17:14:35 +0100

bc: Fix indentation in bc.library

Diffstat:
Mbc.library | 44++++++++++++++++++++++----------------------
1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/bc.library b/bc.library @@ -164,7 +164,7 @@ define a(x){ if(x==0) return(0) if(x==1) { if(scale<52) { -return(.7853981633974483096156608458198757210492923498437764/1) + return(.7853981633974483096156608458198757210492923498437764/1) } } t = scale @@ -198,35 +198,35 @@ return(.7853981633974483096156608458198757210492923498437764/1) } define j(n,x){ -auto a,b,c,d,e,g,i,s,k,t + auto a,b,c,d,e,g,i,s,k,t t = scale k = 1.36*x + 1.16*t - n k = length(k) - scale(k) if(k>0) scale = scale + k -s= -x*x/4 -if(n<0){ - n= -n - x= -x + s= -x*x/4 + if(n<0){ + n= -n + x= -x } -a=1 -c=1 -for(i=1;i<=n;i++){ - a=a*x - c = c*2*i + a=1 + c=1 + for(i=1;i<=n;i++){ + a=a*x + c = c*2*i } -b=a -d=1 -e=1 -for(i=1;1;i++){ - a=a*s - b=b*i*(n+i) + a - c=c*i*(n+i) - g=b/c - if(g==e){ - scale = t - return(g/1) + b=a + d=1 + e=1 + for(i=1;1;i++){ + a=a*s + b=b*i*(n+i) + a + c=c*i*(n+i) + g=b/c + if(g==e){ + scale = t + return(g/1) } e=g }