From 95aca4b4d8fa62815d4bd412fff1a364f842814a Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Thu, 29 Apr 2021 16:16:42 -0700 Subject: remove retired locales (#699) --- .../reference/global_objects/math/log/index.html | 138 --------------------- 1 file changed, 138 deletions(-) delete mode 100644 files/ca/web/javascript/reference/global_objects/math/log/index.html (limited to 'files/ca/web/javascript/reference/global_objects/math/log') diff --git a/files/ca/web/javascript/reference/global_objects/math/log/index.html b/files/ca/web/javascript/reference/global_objects/math/log/index.html deleted file mode 100644 index e92c8c05d2..0000000000 --- a/files/ca/web/javascript/reference/global_objects/math/log/index.html +++ /dev/null @@ -1,138 +0,0 @@ ---- -title: Math.log() -slug: Web/JavaScript/Reference/Global_Objects/Math/log -translation_of: Web/JavaScript/Reference/Global_Objects/Math/log -original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/log ---- -
{{JSRef}}
- -

La funció Math.log() retorna el logaritme natural (base {{jsxref("Math.E", "e")}}) d'un nombre, és a dir

- -

x>0,Math.log(x)=ln(x)=la únicaytal queey=x\forall x > 0, \mathtt{\operatorname{Math.log}(x)} = \ln(x) = \text{the unique} \; y \; \text{such that} \; e^y = x

- -

Sintaxi

- -
Math.log(x)
- -

Paràmetres

- -
-
x
-
Un nombre.
-
- -

Descripció

- -

Si el valor de x és negatiu, el valor retornat sempre serà {{jsxref("NaN")}}.

- -

Degut a que log() és un mètode estàtic de Math, sempre s'utilitza com a Math.log(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).

- -

Exemples

- -

Utilitzar Math.log()

- -
Math.log(-1); // NaN, fora de rang
-Math.log(0);  // -Infinit
-Math.log(1);  // 0
-Math.log(10); // 2.302585092994046
-
- -

Utilitzar Math.log() amb una base diferent

- -

La funció següent retorna el logaritme de y amb base x (és a dir, logxy\log_x y):

- -
function getBaseLog(x, y) {
-  return Math.log(y) / Math.log(x);
-}
-
- -

Si es crida getBaseLog(10, 1000) retornarà 2.9999999999999996 degut a l'arrodoniment de punt flotant, el qual és molt proper a la resposta real: 3.

- -

Especificacions

- - - - - - - - - - - - - - - - - - - - - - - - -
EspecificacionsEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.2.10', 'Math.log')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-math.log', 'Math.log')}}{{Spec2('ES6')}} 
- -

Compatibilitat amb navegadors

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - -
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - -
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
-
- -

Vegeu també

- - -- cgit v1.2.3-54-g00ecf