Sponsored links: Algebra eBooks
 

Related

rat

n: 1000000;

k: 1;

rat((k+1)*n^k-n^(k+1)...

Calculate

rat

eq1: (x-x1)^2+(y-y1)^...

eq2: (x-x2)^2+(y-y2)^...

eq3: rat(eq1-eq2,y,x);

Calculate

rat

0.5*(2*x/L-1)*((2*x/L...

rat(0.5*(2*x/L-1)*((2...

Calculate

rat-resultant

A:u^3+3*p*u+2*p*q;

B:u^3-q*u^2+b*u+c;

C:resultant(A,B,u);

Calculate

rat

n: 14;

rat((n+10)!/(2*n-1)!!);

Calculate

rat

n1: a;

n2: b;

n3: (n1 + n2)/2;

Calculate

rat

Ta: (k1 * k2r * k4 * ...

Tb: (k1r * k2 * k4 * ...

Tab: (k1r * k2r * k4r...

Calculate

rat-solve-subst

eq: rat(subst(solve( ...

Calculate

rat

log2(x):=log(x)/log(2);

rat(log2(3));

Calculate

rat

f(x):= %i *(x + b + c...

g(x):= f(f(x));

h(x):= g(g(x));

Calculate

rat

Run Example
(%i1)rat(0.1234);

rat: replaced 0.1234 by 617/5000 = 0.1234
                                     617
(%o1)/R/                             ----
                                     5000
(%i2) rat(0.12345);

rat: replaced 0.12345 by 2469/20000 = 0.12345
                                     2469
(%o2)/R/                             -----
                                     20000
(%i3) rat(0.12345);

rat: replaced 0.12345 by 2469/20000 = 0.12345
                                     2469
(%o3)/R/                             -----
                                     20000
(%i4) mod(12345, 1000)/100000, numer;
(%o4)                               0.00345
(%i5) lastdigits(fnum, lastn):=block([m:10*fnum, ans, n:lastn], /* it doesn't help when lastn is bigger than the total digits in fnum it returns the whole digits in fnum anyway without erroring! and fnum=%pi stuff works only upto 8 digits cause num(rat(fnum)) has somuch only! */ratprint:false, k:rat(fnum), ans:mod(m, (10^-n))/(mod(m, 10)*denom(k)), return(float(ans)));
(%o5) lastdigits(fnum, lastn) := block([m : 10 fnum, ans, n : lastn], 
                                                   - n
                                          mod(m, 10   )
ratprint : false, k : rat(fnum), ans : -------------------, return(float(ans)))
                                       mod(m, 10) denom(k)
(%i6) lastdigits(0.12345, 3);
(%o6)                        2.0251113811259619E-8
(%i7) 
Run Example
simp:false;
(%o1)                                false
(%i2) radexpand:false;
(%o2)                                false
(%i3) 1/a, simp:false;
                                       1
(%o3)                                  -
                                       a
(%i4) 1/b, simp:false;
                                       1
(%o4)                                  -
                                       b
(%i5) 1/(a*b), simp:false;
                                       1
(%o5)                                 ---
                                      a b
(%i6) tellsimp(1/(a*b), ((1/a)*(1/b)));
(%o6)                         [/rule1, simpquot]
(%i7) 1/(a*b);
                                       1
(%o7)                                 ---
                                      a b
(%i8) disprule(all);
                                       1     1  1
(%t8)                        /rule1 : --- -> - (-)
                                      a b    a  b

(%o8)                                [%t8]
(%i9) 1/(a*b);
                                       1
(%o9)                                 ---
                                      a b
(%i10) properties("*");
(%o10)              [mirror symmetry, nary, rule, operator]
(%i11) rat(1/(a*b));
                                       1
(%o11)/R/                             ---
                                      a b
(%i12) map('ratsimp, 1/(a*b));
                                       1
(%o12)                                ---
                                      a b
(%i13) grind(1/(a*b));

1/(a*b)$
(%o13)                               done
(%i14) partfrac(1/(a*b), a);
                                     1  - 1
(%o14)                            + (- a   )
                                     b
(%i15) a^-1;
                                      - 1
(%o15)                               a
(%i16) 
Run Example
rat(+ 0.76895553987651);

rat: replaced 0.76895553987651 by 4513/5869 = 0.76895552905095
                                     4513
(%o1)/R/                             ----
                                     5869
(%i2) 
[algebraic,carg,ev,expand,float,linsolve,numer,pi,polarform,rat,rhs,simp,true] [algebraic,carg,ev,expand,float,linsolve,numer,pi,rat,rhs,simp,true] [apply,block,coeff,copylist,do,expand,length,makelist,print,rat,return,subst,sum] [at,block,denom,float,mod,numer,rat,ratprint] [at,factor,rat] [at,rat,sqrt] [at,rat] [atan,beta,diff,ev,gamma,rat] [bftorat,block,delete,float,if,integerp,mod,rat,ratdenom,ratepsilon,ratprint] [binomial,ceiling,coeff,expand,rat,sum] [binomial,floor,rat,sum] [coeff,expand,factor,rat,remainder,resultant,subst] [coeff,expand,factor,rat,remainder,resultant] [coeff,expand,factor,rat,resultant,solve,subst] [coeff,expand,factor,rat,resultant,solve] [coeff,expand,factor,rat,resultant] [coeff,expand,rat,remainder,resultant] [coeff,expand,rat,resultant,subst] [coeff,expand,rat,resultant] [coeff,factor,rat,remainder,resultant,subst] [coeff,factor,rat,remainder,resultant] [coeff,factor,rat,resultant,subst] [coeff,factor,rat,resultant] [coeff,hipow,makelist,num,rat,solve,subst,sum] [coeff,rat,remainder,resultant] [coeff,rat,resultant] [coeff,rat] [cos,rat,ratsubst,sin,trigexpand] [determinant,expand,makelist,matrix,rat,solve] [diff,do,expand,gcd,print,rat] [diff,exp,gamma,plot2d,rat,rootscontract] [diff,makelist,rat,subst] [diff,rat] [display2d,false,rat] [disprule,false,grind,map,partfrac,properties,radexpand,rat,simp,tellsimp] [exp,rat] [expand,factor,map,plot2d,rat,realroots,resultant,solve] [expand,matrix,rat,solve,subst,transpose] [expand,rat,round,sum] [expand,rat,subst,sum] [expand,rat,subst] [expand,rat,sum] [expand,rat] [fpprec,rat] [imagpart,rat,realpart] [inf,kill,limit,print,rat] [num,rat,rhs,solve,subst] [rat,remainder,resultant] [rat,resultant] [rat]

Related Help

Help for Rat