Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //lab1maznev.sce
- //6+8
- 2.35*(1.8-0.25)+1.34^2/3.12
- 1+2+3+4+5+6...
- 7+8+9+10+...
- +11+12+13
- 1+2;
- 1+2
- a=2.3
- b=-34.7
- x=1;y=2;z=(x+y)-a/b
- c+3/2
- c='a'
- h='мама мыла раму'
- x=3; y=-1;
- clear x
- y
- a=1;b=2;
- clear;
- a
- b
- 25.7-3.14
- 2*ans
- x=ans^0.3
- ans
- a=5.4; b=0.1;
- F=cos(%pi/3)+(a-b)*%e^2
- sin(pi/2)
- 0.123
- -6.42e+2
- 3.2e-6
- %pi
- q=0123.4567890123456
- printf("%1.12f",%pi)
- printf("%1.2f",q)
- printf("%f",q)
- x=1.2; y=0.3;
- z=sqrt(abs(sin(x/y)))*exp(x^y)
- deff('z=fun1(x,y)', 'z=sqrt(abs(sin(x/y)))*exp(x^y)');
- x=1.2;y=0.3;z=fun1(x,y)
- deff('S=G(a,b,c)','p=(a+b+c)/2;S=sqrt((p-a)*(p-b)*(p-c))');
- G(2,3,3)
- deff('[x1,x2]=korni(a,b,c)','d=b^2-4*a*c;x1=(-b+sqrt(d))/2/a;x2=(-b-sqrt(d))/2/a');
- [x1,x2]=korni(-2,-3,-5)
- exec('D:\cubMaznev.sce');
- disp('execdone');
- [x1,x2,x3]=cub(3,-20,-3,4)
- //cub.sce
- function[x1,x2,x3]=cub(a,b,c,d)
- r=b/a;
- s=c/a;
- t=d/a;
- p=(3*s-r^2)/3;
- q=2*r^3/27-r*s/3+t;
- D=(p/3)^3+(q/2)^2;
- u=(-q/2+sqrt(D))^(1/3);
- v=(-q/2-sqrt(D))^(1/3);
- y1=u+v;
- y2=-(u+v)/2+(u-v)/2*%i*sqrt(3);
- y3=-(u+v)/2-(u-v)/2*%i*sqrt(3);
- x1=y1-r/3;
- x2=y2-r/3;
- x3=y3-r/3;
- endfunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement