A little surprise (to me) was 
   plot 1 sphvol i.30 
(for example)

Can you predict it?

greetings,
Ben
________________________________________
From: Programming [[email protected]] on behalf of Raul 
Miller [[email protected]]
Sent: Tuesday, August 15, 2017 19:55
To: Programming forum
Subject: [Jprogramming] "n-volume" of an "n-sphere"

   sphvol=: (1p1&^%!)@-:@] * ^
   1 sphvol 3
4.18879
   1 sphvol i.7
1 2 3.14159 4.18879 4.9348 5.26379 5.16771

Left argument is the radius of the "n-sphere".

Right argument is the number of dimensions.

I put "n-volume" in quotes, because if the dimension is 2 (for
example), the "n-volume" is what we call the area of the circle. (And
if the dimension is 1 that "n-volume" is the length of a line
segment).

Anyways, I stumbled across this and thought it might be interesting
for someone else.

Thanks,

--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to