Skip to main content
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

J, 27 21

3 :'+/,y>:%:+/~*:i:y' 

Very brutal: computes sqrt(x²+y²) over the [-n,n] range and counts items ≤n. Still very acceptable times for 1000.

Edit: i:y is quite a bit shorter than y-i.>:+:y. Thanks Jesse MillikanJesse Millikan!

J, 27 21

3 :'+/,y>:%:+/~*:i:y' 

Very brutal: computes sqrt(x²+y²) over the [-n,n] range and counts items ≤n. Still very acceptable times for 1000.

Edit: i:y is quite a bit shorter than y-i.>:+:y. Thanks Jesse Millikan!

J, 27 21

3 :'+/,y>:%:+/~*:i:y' 

Very brutal: computes sqrt(x²+y²) over the [-n,n] range and counts items ≤n. Still very acceptable times for 1000.

Edit: i:y is quite a bit shorter than y-i.>:+:y. Thanks Jesse Millikan!

i:
Source Link
J B
  • 10.1k
  • 28
  • 60

J, 2727 21

3 :'+/,y>:%:+/~*:y-i.>:+:y' 

Very brutal: computes sqrt(x²+y²) over the [-n,n] range and counts items ≤n. Still very acceptable times for 1000.

Edit: i:y is quite a bit shorter than y-i.>:+:y. Thanks Jesse Millikan!

J, 27

3 :'+/,y>:%:+/~*:y-i.>:+:y' 

Very brutal: computes sqrt(x²+y²) over the [-n,n] range and counts items ≤n. Still very acceptable times for 1000.

J, 27 21

3 :'+/,y>:%:+/~*:i:y' 

Very brutal: computes sqrt(x²+y²) over the [-n,n] range and counts items ≤n. Still very acceptable times for 1000.

Edit: i:y is quite a bit shorter than y-i.>:+:y. Thanks Jesse Millikan!

Source Link
J B
  • 10.1k
  • 28
  • 60

J, 27

3 :'+/,y>:%:+/~*:y-i.>:+:y' 

Very brutal: computes sqrt(x²+y²) over the [-n,n] range and counts items ≤n. Still very acceptable times for 1000.