Exponentielles des grands nombres
vendredi 25 juillet 2025
en cours de rédaction
1 – Grands nombres
?
# Affichage d'un flottant donné par son écriture scientifique.
def AfficherTrèsGros(M, E) :
Afficher(M)
print(" * 10 ** ", E, sep = "")
2 – Retour de la fonction exponentielle
?
# ln(10)
ε = Décimal(10) ** (-NB_CHIFFRES)
x1 = argcoth(Décimal(5), ε / (3 * 12))
x2 = argcoth(Décimal(17), ε / (3 * 2))
x3 = argcoth(Décimal(161), ε / (3 * 2))
ln_de_10 = 12 * x1 - 2 * x2 - 2 * x3
?
# Plus grande puissance de 2 ajoutable à E sans dépasser x
def PGPDDA(E, x) :
p = 1 ; deux_p = 2
while E + deux_p <= x :
p = deux_p ; deux_p *= 2
return p
# Partie entière d'un décimal (sous forme d'un int)
def PartieEntière(x) :
E = 0
while E + 1 <= x :
E += PGPDDA(E, x)
return E
# Renvoie (M, E) tels que exp(x) = M * 10 ** E, pour un x positif.
def GrandeExponentielle(x) :
X = x / ln_de_10
E = PartieEntière(X) ; F = X - E
M = Exponentielle(F * ln_de_10)
return (M, E)
>>> (M, E) = GrandeExponentielle(Décimal(10 ** 1000))
>>> AfficherTrèsGros(M, E)
1.095824249303054798083778635499933469257966962642151282563694064376835440089538798705976984782483442666122386288171361944982608168496720652543168737784641211559617202825153645613487643392315228072528572565967860911470739936082868474575039781779988445642476712273786325465647350352610200512399822241921502955596895036997060497773121622790296636807313073780762509636617672762125942042344734437122172695552264787047138015103220253150094171206154167151715734589529951550684861930589841249098596621252188370920482651221880005519396524345665447962961704290353020830694092155949815508485971211577635051692806653254659615129298522298994838245035640627958758561048442534123928848485309034007696866312660865071584809717104626963858876679792820921878701473350884959733883167936072821490861077364628699488262521330649171819650515468888333557977825963634577341947619099582275050394298472579112239031429878751339084660690744129426983595726770928419247171514414978525359895670602938755298467306395654352210350498960 * 10 ** 4342944819032518276511289189166050822943970058036665661144537831658646492088707747292249493384317483187061067447663037336416792871589639065692210646628122658521270865686703295933708696588266883311636077384905142844348666768646586085135561482123487653435434357317253835622281395603048646652366095539377356176323431916710991411597894962993512457934926357655469077671082419150479910989674900103277537653570270087328550951731440674697951899513594088040423931518868108402544654089797029863286828762624144013457043546132920600712605104028367125954846287707861998992326748439902348171535934551079475492552482577820679220140931468164467381030560475635720408883383209488996522717494541331791417640247407505788767860971099257547730046048656049515610057985741340272675201439247917970859047931285212493341197329877226463885350226083881626316463883553685501768460295286399391633510647555704050513182342988874882120643595023818902643317711537382203362634416478397146001858396093006317333986134035135741787144971453
Bon alors maintenant à quoi cela sert-il ? À rien, tout simplement.