|
elif is_in(disc, nepositiveINT) then print("Yechimga ega emas")
|
bet | 62/78 | Sana | 22.07.2021 | Hajmi | 7,05 Mb. | | #15506 |
elif is_in(disc, nepositiveINT) then print("Yechimga ega emas");
else X1:=(([-1.,-1.] &* B) &/ ([2.,2.] &* A)); print("Bitta yechimga ega"); end if;
Misol-2.
> A:=[1.,3.]; B:=[3.,6.]; C:=[4.,7.];
A * X^2 + B * X + C =0;
> disc:=(B &**2) &- ([4.,4.] &* A &* C);
positiveINT:=[0., infinity];
nepositiveINT:=[-infinity,0.];
> if is_in(disc, positiveINT) then X1:=(([-1.,-1.] &* B) &+ ((disc) &**(1/2))) &/ (2 &* A);
X2:=(([-1.,-1.] &* B) &- ((disc) &**(1/2))) &/ (2 &* A);
elif (is_in(disc, nepositiveINT)) then print("Yechimga ega emas");
else X1:=(([-1.,-1.] &* B) &/ ([2.,2.] &* A)); end if;
|
| |