summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--miscutils/bc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/miscutils/bc.c b/miscutils/bc.c
index f0c323d..547af8e 100644
--- a/miscutils/bc.c
+++ b/miscutils/bc.c
@@ -7213,16 +7213,13 @@ static const char bc_lib[] ALIGN1 = {
"\n" "return(r/1)"
"\n" "}"
"\n" "define s(x){"
-"\n" "auto b,s,r,n,a,q,i"
+"\n" "auto b,s,r,a,q,i"
+"\n" "if(x<0)return(-s(-x))"
"\n" "b=ibase"
"\n" "ibase=A"
"\n" "s=scale"
"\n" "scale=1.1*s+2"
"\n" "a=a(1)"
-"\n" "if(x<0){"
-"\n" "n=1"
-"\n" "x=-x"
-"\n" "}"
"\n" "scale=0"
"\n" "q=(x/a+2)/4"
"\n" "x-=4*q*a"
@@ -7236,7 +7233,6 @@ static const char bc_lib[] ALIGN1 = {
"\n" "}"
"\n" "scale=s"
"\n" "ibase=b"
-"\n" "if(n)r=-r"
"\n" "return(r/1)"
"\n" "}"
"\n" "define c(x){"