33 as a sum of three cubes - NARS2000

38 views
Skip to first unread message

brent.hildebrand

unread,
Mar 12, 2019, 10:53:49 PM3/12/19
to APLWin
A new math result recently found:

(x y z)←8866128975287528x ¯8778405442862239x ¯2736111468807040x
      +/x y z * 3
33


OK - it is just interesting to me... 

Davin Church

unread,
Mar 13, 2019, 12:20:07 AM3/13/19
to APLWin
Cute!  But them's big numbers!

Bob Smith

unread,
Mar 13, 2019, 7:14:33 AM3/13/19
to APLWin
Me, too.  Where did you read of this?

BTW, you need only one suffix of 'x' in a strand to mark the entire strand as Multiple-Precision.  Typically it's easiest to suffix just the rightmost number.  Also, you can use a suffix of 'x' on floating point numbers, too, as in

      3.1x
31r10

brent.hildebrand

unread,
Mar 13, 2019, 8:01:00 AM3/13/19
to APLWin
Here is the article describing the problem and technique used to solve this sum or three cubes problem:


Here is a Numberphile video interview on the finding:
https://youtu.be/ASoz_NuIvP0


brent.hildebrand

unread,
Mar 13, 2019, 10:59:40 AM3/13/19
to APLWin
Here is just running the result in the language Julia which has many APLish ideas.  Julia has a REPL (read, execute, print and loop) giving it the interactive feel of the APL session.  It also can show you the code that it emits when it create a function.  Again - it is just interesting to me...

julia> f(x) = sum(x.^3)
f (generic function with 1 method)

julia> x = (8866128975287528, -8778405442862239, -2736111468807040)

(8866128975287528, -8778405442862239, -2736111468807040)

julia> f(x)
33

julia> @code_native f(x)
.text
; ┌ @ REPL[1]:1 within `f'
; │┌ @ broadcast.jl:753 within `materialize'
; ││┌ @ broadcast.jl:953 within `copy'
; │││┌ @ tuple.jl:161 within `ntuple'
; ││││┌ @ broadcast.jl:953 within `#19'
; │││││┌ @ broadcast.jl:551 within `_broadcast_getindex'
; ││││││┌ @ broadcast.jl:578 within `_broadcast_getindex_evalf'
; │││││││┌ @ intfuncs.jl:244 within `literal_pow'
; ││││││││┌ @ operators.jl:502 within `*' @ REPL[1]:1
movq (%rdi), %rax
movq %rax, %rcx
imulq %rcx, %rcx
imulq %rax, %rcx
vmovdqu 8(%rdi), %xmm0
vpmullq %xmm0, %xmm0, %xmm1
vpmullq %xmm0, %xmm1, %xmm0
; │└└└└└└└└
; │┌ @ tuple.jl:395 within `sum'
; ││┌ @ operators.jl:502 within `+' @ int.jl:53
vmovq %xmm0, %rdx
addq %rcx, %rdx
vpextrq $1, %xmm0, %rax
addq %rdx, %rax
; │└└
retq
nopw %cs:(%rax,%rax)
; └

brent.hildebrand

unread,
Apr 3, 2019, 4:20:01 PM4/3/19
to APLWin
Here is one place that NARS2000 needs several 'x's to get the right answer:

      *(163x*.5x)×○1
262537412640768333.516358125973357125101
      *(163x*.5x)×○1x
262537412640768743.999999999999250072589
      *(163x*.5)×○1x
262537412640768743.999999999999250072589
      *(163*.5)×○1x
262537412640768247.571355416771299107802
      *(163x*.5)×○1x
262537412640768743.999999999999250072589  <---  correct answer.  x is needed on 163 and ○1x.  Probably due to right to left interpretation? 

It is enteresting that e raised to the power of pi times the squareroot of 163 is so close to a real number....   .999999999999  close.   :-)
Reply all
Reply to author
Forward
Message has been deleted
0 new messages