Skip to content

Commit e5b5cf6

Browse files
authored
Realized BigInt support is unnecessary
The algorithm would be exactly the same, so there's no added educational value
1 parent b7743e1 commit e5b5cf6

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

Maths/PerfectCube.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*
55
* Infinity is an undefined cube, so return false for any sign.
66
* This uses `round` instead of `floor` or `trunc`, to guard against rounding errors.
7-
* currently, the function doesn't support `BigInt`s
87
*/
98

109
const perfectCube = (num) => Number.isFinite(num) && Math.round(Math.cbrt(num)) ** 3 === num

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy