Sponsored links: Algebra eBooks
 

Related

rat

p(z):= a*z^2+b;

q(z):= c*z^2+d;

nxt(ns) := rat(ns[1]^...

Calculate

rat

eq1:x*2 + x;

rat(eq1);

Calculate

rat

n1: a;

n2: b;

n3: (n1 + n2)/2;

Calculate

rat

eq1: - Kiw * ((Niw)*(...

rat(eq1,Niw);

eq2: (Kiw - 1) * (Ni-...

Calculate

rat

y:x^2-4;

rat(y);

Calculate

rat

x:1.1;

rat(x);

Calculate

rat

eq1: - Kiw * ((Niw)*(...

rat(eq1,Niw);

eq2: (Kiw - 1) * (Ni-...

Calculate

rat

y:x^2-4;

x:5;

rat(y);

Calculate

rat-remainder-resultant

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

B:v^3+b-u*(v^2+c*v+d);

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

Calculate

rat-realroots-resultant-solve

f: x^3-(A+2)*x^2+B*x-A;

g: 2*x^2+B*x-A*(B+2*A...

r:resultant(f,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] [append,build_info,map,plot2d,rat,resultant,solve,sqrt] [at,block,denom,float,mod,numer,rat,ratprint] [at,factor,rat] [at,rat,sqrt] [at,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,hipow,makelist,num,rat,solve,subst,sum] [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,remainder,sqfr] [diff,do,expand,gcd,print,rat] [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,solve] [rat]

Related Help

Help for Rat