Sponsored links: Algebra eBooks
 

Related

round-sqrt-sum

round((sum ((s^2-r^2-...

Calculate

round

:lisp (apropos 'round);

Calculate

round

round(3.1415);

Calculate

round

:lisp (apropos 'round);

Calculate

round-sqrt

px:960;

py: 540;

ds: 4.3;

Calculate

round-sqrt

px:1280;

py: 720;

ds: 5;

Calculate

round

:lisp (apropos 'round);

Calculate

round-sqrt

round(ratsimple((ln(6...

Calculate

round-sqrt

px:1280;

py: 720;

ds: 5;

Calculate

round

Run Example
(%i1)plot2d(round(1.5 * (1-cos(6.28318530718*x))), [x,0,1], [y,-1,4]);
plotplot2d(round(1.5 * (1-cos(6.28318530718*x))), [x,0,1], [y,-1,4]);
Run Example
numer:true;
(%o1)                                true
(%i2) ln(x):=log(x)/log(%e);
                                        log(x)
(%o2)                          ln(x) := -------
                                        log(%e)
(%i3) redondeo(num,decimales):=block(       [a:0],   a:round(num*10^decimales)*10^-decimales,    return(a));
(%o3) redondeo(num, decimales) := block([a : 0], 
                                           decimales    - decimales
                          a : 'round(num 10         ) 10           , return(a))
(%i4) biseccion(a,b,expo,N):=block(       [indice:0,bool:true,fa,fp,fb,fafp,TOL,p,er,tabla:matrix(['N,'a,'b,'p,'f('a),'f('b),'f('p),'f('a)*'f('p),'error])],      fa:f(a),   fa:redondeo(fa,expo+2),   TOL:(10)^(-expo),   for i:1 step 1 while (i<
=N and bool=true) do   (      indice:i,      p:((a+b)/2),         p:redondeo(p,expo+2),      fp:f(p),         fp:redondeo(fp,expo+2),      fb:f(b),         fb:redondeo(fb,expo+2),      er:((b-a)/2),         er:redondeo(er,expo+2),      fafp:redondeo(fa*fp,expo+2),            if ( (fa<
0 and fb<
0) or (fa>
0 and fb>
0) ) then      (	           print("No hay cambio de signo"),	 bool:false      ),      tabla:addrow(tabla,[i,a,b,p,fa,fb,fp,fafp,er]),            if ((fp=0) or (er <
 TOL)) then      (         print("tolerancia cumplida"),	 bool:false      )      elseif (fafp>
0) then      (         a:p,         fa:fp      )      else      (         b:p      )   ),      if (indice=N) then    (      print(concat("Parametro N=",N," se cumplio. Hay cambios de signo f(a) f(b)")),      print("en las iteraciones hechas.")   ),   display(indice,N),   return(tabla));
(%o4) biseccion(a, b, expo, N) := block([indice : 0, bool : true, fa, fp, fb, 
fafp, TOL, p, er, tabla : matrix(['N, 'a, 'b, 'p, 'f('a), 'f('b), 'f('p), 
'f('a) 'f('p), 'error])], fa : f(a), fa : redondeo(fa, expo + 2), 
        - expo
TOL : 10      , for i while (i <= N) and (bool = true) 
                    a + b
do (indice : i, p : -----, p : redondeo(p, expo + 2), fp : f(p), 
                      2
fp : redondeo(fp, expo + 2), fb : f(b), fb : redondeo(fb, expo + 2), 
     b - a
er : -----, er : redondeo(er, expo + 2), fafp : redondeo(fa fp, expo + 2), 
       2
if ((fa < 0) and (fb < 0)) or ((fa > 0) and (fb > 0))
 then (print("No hay cambio de signo"), bool : false), 
tabla : addrow(tabla, [i, a, b, p, fa, fb, fp, fafp, er]), 
if (fp = 0) or (er < TOL) then (print("tolerancia cumplida"), bool : false)
 elseif fafp > 0 then (a : p, fa : fp) else b : p), 
if indice = N then (print(concat("Parametro N=", N, 
" se cumplio. Hay cambios de signo f(a) f(b)")), 
print("en las iteraciones hechas.")), display(indice, N), return(tabla))
(%i5) f(x):=x-2^-x;
                                            - x
(%o5)                          f(x) := x - 2
(%i6) biseccion(0,1,3,3);
Parametro N=3 se cumplio. Hay cambios de signo f(a) f(b) 
en las iteraciones hechas. 
                                  indice = 3

                                     N = 3

      [ N   a    b      p      f(a)      f(b)     f(p)     f(a) f(p)  error ]
      [                                                                     ]
      [ 1   0    1     0.5     - 1.0     0.5    - 0.20711   0.20711    0.5  ]
(%o6) [                                                                     ]
      [ 2  0.5   1    0.75   - 0.20711   0.5     0.1554    - 0.03218  0.25  ]
      [                                                                     ]
      [ 3  0.5  0.75  0.625  - 0.20711  0.1554  - 0.02342   0.00485   0.125 ]
(%i7) 
Run Example
a:75.47;
(%o1)                                75.47
(%i2) b:3.56;
(%o2)                                3.56
(%i3) hbtssn(n):=block([p], while n>
10 do (n: n/10), while n<
1 do (n: n * 10), p: truncate(n), p);
                                                  n
(%o3) hbtssn(n) := block([p], while n > 10 do n : --, 
                                                  10
                                 while n < 1 do n : n 10, p : 'truncate(n), p)
(%i4) c: hbtssn(b);
(%o4)                                  3
(%i5) d: round(b);
(%o5)                                  4
(%i6) e: truncate(b);
(%o6)                                  3
(%i7) 
[addrow,block,concat,display,false,if,log,matrix,numer,print,return,round,true,while] [addrow,block,concat,display,if,log,matrix,numer,print,return,round,true,while] [addrow,block,concat,false,if,log,matrix,numer,print,return,round,true,while] [addrow,block,display,if,log,matrix,numer,print,return,round,true,while] [addrow,block,if,log,matrix,numer,print,return,round,true,while] [apply,cos,fpprec,li,load,makelist,outermap,plot2d,round,sin,sort,string] [array,block,cos,float,floor,genmatrix,lambda,mod,plot3d,random,round,sin,subst] [bfloat,bftorat,block,emptyp,equal,first,fpprec,if,is,mod,not,numer,ratepsilon,ratprint,return,round] [bfloat,float,round] [bftorat,block,emptyp,equal,first,float,fpprec,if,is,mod,not,numer,ratepsilon,ratprint,return,round] [block,do,float,fpprintprec,round] [block,do,float,round] [block,do,round] [ceiling,floor,round] [coeff,false,float,notequal,part,ratprint,round,solve] [coeff,false,float,part,ratprint,round,solve] [concat,max,min,print,random,round] [cos,fpprec,li,load,makelist,outermap,plot2d,round,sin,sort,string] [cos,plot2d,round] [do,ev,false,float,lambda,round,simp,true] [expand,rat,round,sum] [factor,float,ilt,ratdenom,ratsimp,round,solve] [find_root,round] [float,is,random,round,simp,true] [float,matrix,plot2d,plot3d,round] [float,matrix,plot3d,round] [float,max,random,round,simp,true] [float,random,round,simp,true] [float,round,sqrt] [fresnel_c,fresnel_s,load,round,sqrt] [fresnel_c,fresnel_s,round,sqrt] [integrate,round] [linsolve,round] [makelist,round,sin] [max,min,print,random,round] [max,min,random,round] [plot2d,round] [random,round,simp,true] [round,sqrt] [round]

Related Help

Help for Round