Guruh talabasi no`’monov saidakbarning python tilida dasturlash fanidan mustaqil ishi


Modul math – odin iz naivajneyshix v Python. Etot modul predostavlyaet obshirnыy funksional dlya rabotы s chislami


Download 30.36 Kb.
bet3/5
Sana24.12.2022
Hajmi30.36 Kb.
#1056585
1   2   3   4   5
Bog'liq
NO`\'MONOV SAIDAKBAR MUSTAQIL ISH

Modul math – odin iz naivajneyshix v Python. Etot modul predostavlyaet obshirnыy funksional dlya rabotы s chislami.



math.ceil(X) – okrugleniye do blijayshego bolshego chisla.



math.copysign(X, Y) - vozvraщayet chislo, imeyuщye modul takoy je, kak i u chisla X, a znak - kak u chisla Y.



math.fabs(X) - modul X.



math.factorial(X) - faktorial chisla X.



math.floor(X) - okrugleniye vniz.



math.fmod(X, Y) - ostatok ot deleniya X na Y.



math.frexp(X) - vozvraщayet mantissu i eksponentu chisla.



math.ldexp(X, I) - X * 2i. Funksiya, obratnaya funksii math.frexp().



math.fsum(posledovatelnost) - summa vsex chlenov posledovatelnosti. Ekvivalent vstroyennoy funksii sum(), no math.fsum() bolye tochna dlya chisel s plavayuщey tochkoy.



math.isfinite(X) - yavlyaetsya li X chislom.



math.isinf(X) - yavlyaetsya li X beskonechnostyu.



math.isnan(X) - yavlyaetsya li X NaN (Not a Number - ne chislo).



math.modf(X) - vozvraщayet drobnuyu i seluyu chast chisla X. Oba chisla imeyut tot je znak, chto i X.



math.trunc(X) - usekayet znacheniye X do selogo.



math.exp(X) - eX.



math.expm1(X) - eX - 1. Pri X → 0 tochnye, chem math.exp(X)-1.



math.log(X, [base]) - logarifm X po osnovaniyu base. Yesli base ne ukazan, vыchislyaetsya naturalnыy logarifm.



math.log1p(X) - naturalnыy logarifm (1 + X). Pri X → 0 tochnye, chem math.log(1+X).



math.log10(X) - logarifm X po osnovaniyu 10.




Download 30.36 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2025
ma'muriyatiga murojaat qiling