Perfect Cube Checker
Check whether an integer is a perfect cube. The result is 1 for yes and 0 for no, including negative integers and zero.
Formula
n is a perfect cube if n=k³ for an integer k.
Perfect cube? 1=yes, 0=no ≈ 1-min(1,abs(abs((27))-(3)^3))
How to use
- Enter an integer between −1,000,000,000 and 1,000,000,000.
- Keep its sign.
- Read 1 for a perfect cube or 0 otherwise.
Examples
- 27 and −8 return 1; 26 returns 0.
Frequently asked questions
Can a negative integer be a perfect cube?
Yes. For example, (−2)³=−8.
Is zero a perfect cube?
Yes, because 0³=0.
Are decimals accepted?
No. This check concerns cubes of integers.
Sources
Updated: