Sponsored links: Algebra eBooks
 

Related

sign-sqrt

sign(sqrt(-x^2-x^4));

Calculate

sign

sign(-23)*3;

Calculate

sign

sign(0);

sign(-10);

sign(20);

Calculate

sign

sign(-2);

Calculate

sign

eq1:sign(-5)+1;

Calculate

sign

eq1:sign(-5)+1;

Calculate

sign

sign(-23)*3;

Calculate

sign

sign(3-2);

Calculate

sign

sign(43);

Calculate

sign

Run Example
(%i1)fpprec: 100;
(%o1)                                 100
(%i2) S(a0,n0) := block(    [sum:0,sign:1,a:a0,n:n0,m],    while (n >
 0) do        if( a >
 2 ) then         (            m : floor(a-1),            sum : sum + sign*m*n*(n+1)/2,            a : a - m        ) else        (            m    : floor(a*n),            sum  : sum + sign*m*(m+1)/2,            sign : -sign,            a    : a/(a-1),            n    : m-n        ),    sum);
(%o2) S(a0, n0) := block([sum : 0, sign : 1, a : a0, n : n0, m], 
                                                            sign m n (n + 1)
while n > 0 do if a > 2 then (m : floor(a - 1), sum : sum + ----------------, 
                                                                   2
                                             sign m (m + 1)
a : a - m) else (m : floor(a n), sum : sum + --------------, sign : - sign, 
                                                   2
      a
a : -----, n : m - n), sum)
    a - 1
(%i3) S(bfloat(%e),10000000000000000000000000000000000000000000000000001);
(%o3) 135914091422952261768014373567633124887862354684998014522575808271882361\
921989450018506575284964726871203
(%i4) 
Run Example
fpprec: 100;
(%o1)                                 100
(%i2) S(a0,n0) := block(    [sum:0,sign:1,a:a0,n:n0,m],    while (n >
 0) do        if( a >
 2 ) then         (            m : floor(a-1),            sum : sum + sign*m*n*(n+1)/2,            a : a - m        ) else        (            m    : floor(a*n),            sum  : sum + sign*m*(m+1)/2,            sign : -sign,            a    : a/(a-1),            n    : m-n        ),    sum);
(%o2) S(a0, n0) := block([sum : 0, sign : 1, a : a0, n : n0, m], 
                                                            sign m n (n + 1)
while n > 0 do if a > 2 then (m : floor(a - 1), sum : sum + ----------------, 
                                                                   2
                                             sign m (m + 1)
a : a - m) else (m : floor(a n), sum : sum + --------------, sign : - sign, 
                                                   2
      a
a : -----, n : m - n), sum)
    a - 1
(%i3) S(bfloat(%e),10000000000000000000000000000000000000000000000000000);
(%o3) 135914091422952261768014373567633124887862354684997987339757523681430008\
319114736491881597712493789871605
(%i4) 
Run Example
S(a0,n0) := block(    [sum:0,sign:1,a:a0,n:n0,m],    while (n >
 0) do        if( a >
 2 ) then         (            m : floor(a-1),            sum : sum + sign*m*n*(n+1)/2,            a : a - m        ) else        (            m    : floor(a*n),            sum  : sum + sign*m*(m+1)/2,            sign : -sign,            a    : a/(a-1),            n    : m-n        ),    sum);
(%o1) S(a0, n0) := block([sum : 0, sign : 1, a : a0, n : n0, m], 
                                                            sign m n (n + 1)
while n > 0 do if a > 2 then (m : floor(a - 1), sum : sum + ----------------, 
                                                                   2
                                             sign m (m + 1)
a : a - m) else (m : floor(a n), sum : sum + --------------, sign : - sign, 
                                                   2
      a
a : -----, n : m - n), sum)
    a - 1
(%i2) S(sqrt(2),5);
(%o2)                                 19
(%i3) 

Related Help

Help for Sign