mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-23 00:00:09 +08:00
Revert "Other minor dependencies updates in 7.1.x patch"
This reverts commit5a5f544a48. Rationale: base64-js update in5a5f544causes extra base64-js version to be installed under plist (node_modules/plist/node_modules/base64-js), which would need to be committed to satisfy the needs of the deprecated Node.js 4 version. The extra base64-js version in node_modules/plist/node_modules/base64-js was missed at the time5a5f544was committed. The base64-js update in5a5f544is now deemed as not wanted due to the extra base64-js version that would need to be committed. The other dependencies updates in5a5f544may be nice to have but not considered necessary for the patch release. Reverting now to unblock the upcoming 7.1.4 patch release. Note that neither5a5f544nor this revert will show up in the master branch.
This commit is contained in:
+5
-5
@@ -219,15 +219,15 @@ Returns `true` if the number is prime, `false` otherwise.
|
||||
|
||||
Returns `true` if the number is very likely to be prime, `false` otherwise.
|
||||
Argument is optional and determines the amount of iterations of the test (default: `5`). The more iterations, the lower chance of getting a false positive.
|
||||
This uses the [Miller Rabin test](https://en.wikipedia.org/wiki/Miller%E2%80%93Rabin_primality_test).
|
||||
This uses the [Fermat primality test](https://en.wikipedia.org/wiki/Fermat_primality_test).
|
||||
|
||||
- `bigInt(5).isProbablePrime()` => `true`
|
||||
- `bigInt(49).isProbablePrime()` => `false`
|
||||
- `bigInt(1729).isProbablePrime()` => `false`
|
||||
- `bigInt(1729).isProbablePrime(50)` => `false`
|
||||
|
||||
Note that this function is not deterministic, since it relies on random sampling of factors, so the result for some numbers is not always the same.
|
||||
If the number is composite then the Miller–Rabin primality test declares the number probably prime with a probability at most `4` to the power `−iterations`.
|
||||
If the number is prime, this function always returns `true`.
|
||||
Note that this function is not deterministic, since it relies on random sampling of factors, so the result for some numbers is not always the same. [Carmichael numbers](https://en.wikipedia.org/wiki/Carmichael_number) are particularly prone to give unreliable results.
|
||||
|
||||
For example, `bigInt(1729).isProbablePrime()` returns `false` about 76% of the time and `true` about 24% of the time. The correct result is `false`.
|
||||
|
||||
#### `isUnit()`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user