The square root of the product is written

   4([:%:*)16
8
then multiply by x
   4([*[:%:*)16
32
or
   4([*[:%:*)17
32.9848
add one half
   4(0.5+[*[:%:*)17
33.4848
and round down
  4([:<.0.5+[*[:%:*)17
33


More experienced J'ers than me will provide even simpler solutions!
  




>________________________________
> Fra: m l <[email protected]>
>Til: [email protected] 
>Sendt: 10:29 lørdag den 26. november 2011
>Emne: [Jprogramming] FW: A simple function
> 
>
>I`m a beginner in J programming.
>I need writing a simple function:
>
>round ( x * sqrt (x*y))
>
>Thanks in advance.
>
>Matxin
>                          
>----------------------------------------------------------------------
>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