Verify Sum Of Three Cubes Equal To 33: Fails In R, Works In Python
Newly, there was a solution found for the following equation in integers: x^3 + y^3 + z^3 = 33 Namely, it holds for x = 8866128975287528, y= -8778405442862239, and z=-27361114688
Solution 1:
The biggest number with 32 bit is 2,147,483,647. You have to use special libraries.
You can use the library(opennssl)
with the function bignum()
.
library(openssl)
bignum(8866128975287528)^3 - bignum(8778405442862239)^3 - bignum(2736111468807040)^3
> 33
Solution 2:
R uses 32-bit integers, which means the largest integer R can hold is around 2 billion. You can use the package int64 to try to get around this. See this question for more information.
Post a Comment for "Verify Sum Of Three Cubes Equal To 33: Fails In R, Works In Python"