A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/es/docs/Web/JavaScript/Reference/Global_Objects/Math/sqrt below:

Math.sqrt() - JavaScript | MDN

Math.sqrt()

Baseline Widely available

La función Math.sqrt() retorna la raíz cuadrada de un número, que es

x ≥ 0 , M a t h . s q r t ( x ) = x = the unique y ≥ 0 such that y2 = x \forall x \geq 0, \mathtt{Math.sqrt(x)} = \sqrt{x} = \text{the unique} ; y \geq 0 ; \text{such that} ; y^2 = x Sintaxis Parámetros Valor de Retorno

La raíz cuadrada del número proporcionado. Si los números son negativos, NaN es devuelto.

Descripción

Si el valor de x es negativo Math.sqrt() retorna NaN.

Debido a que sqrt() es un método estático de Math, siempre úsalo como Math.sqrt(), en lugar de un método del objeto Math que hayas creado (Math no es un constructor).

Ejemplos Usando Math.sqrt()
Math.sqrt(9); // 3
Math.sqrt(2); // 1.414213562373095

Math.sqrt(1); // 1
Math.sqrt(0); // 0
Math.sqrt(-1); // NaN
Especificaciones Compatibilidad con navegadores Ver también

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4