> Functions
Raises the number base to the power exp.
In JavaScript, Math.pow(base, exp) — or the equivalent * operator — works on 64-bit floats, exactly like pow in LeekScript. Beyond 2^53 the result is no longer exact: Math.pow(2, 100) is 1.2676506002282294e+30, and 2 * 100 === 2 * 100 + 1 is true. If the result must stay an exact integer, use BigInt: 2n * 100n gives 1267650600228229401496703205376.
In Python, pow() is the language's built-in function, and integers have unlimited precision: pow(2, 100) returns the exact integer 1267650600228229401496703205376, where LeekScript and JavaScript work on 64-bit floats and give 1.2676506002282294e+30. Three other differences:
* operator does the same thing: 2 * 10, 2 ** 0.5;pow(2, -1) is 0.5;pow(3, 100, 7) is 4.Be careful not to confuse it with math.pow(), which always returns a float and therefore loses the precision of large integers.
pow(2, 10) // 1024 pow(10, 6) // 1000000
Impossible de charger les données du jeu.
Vérifiez votre connexion et réessayez.