Help / Release / J 7.01 / 5 p: y Improved

From J Wiki
Jump to navigation Jump to search


>> << Pri JfC LJ Phr Dic Voc !: Rel NuVoc wd Help Release



5 p: y Improved

initial writing: 2009-11-04
last updated: 2009-11-04


5 p: y (totient function; the number of numbers relatively prime to y) is now faster. The following benchmarks illustrate the improvements.

   timer=: 6!:2
   y=: 2x+i.1e5

   timer '5 p: y'  NB. J7.01
0.796005

   timer '5 p: y'  NB. J6.02
2.7178




>> << Pri JfC LJ Phr Dic Voc !: Rel NuVoc wd Help Release