Sponsored links: Algebra eBooks
 

Related

rat

a = 10;

b = rat(a + 1);

Calculate

rat-remainder-resultant

A:u^4+p*u+q;

B:v^3+a*v+b-u*(v^2+c*...

C:rat(resultant(A,B,u...

Calculate

rat

o: rat(c[i]/a,c[i]) /...

o[active]: o*a /* act...

o[inactive]: o*(1-a) ...

Calculate

rat

A:((x - 2*y)^4/(x^2 -...

rat (A, y, a, x);

rat(A, a,x,y);

Calculate

rat

n: 1;

rat((x-x^n)/(1-x)-n*x...

Calculate

rat

trsf: y=x^2-A*x-B-A/x...

eq: a*y^2+b*y+c;

eq1: rat(x^4*subs(trs...

Calculate

rat-rootscontract-sqrt

r:(4/sqrt(10+2*sqrt(5...

c:rat(r);

rootscontract(c);

Calculate

rat

n1: a;

n2: b;

n3: (n1 + n2)/2;

Calculate

rat

n: 100000000;

k: 3;

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

Calculate

rat

eq1:x*2 + x;

rat(eq1);

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] [append,build_info,map,plot2d,rat,resultant,solve,sqrt] [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,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] [num,rat,rhs,solve,subst] [plot2d,rat,solve,sqrt] [rat,remainder,resultant] [rat,resultant] [rat]

Related Help

Help for Rat