Comment

Comment by bruturis

Analogous code in J,

  /:~ s -. p [ p =: s*/s [ s=: 2+i.48
An exercise for numpy, test that GCD(x,y) * LCM(x,y) = x*y using 1000 random numbers in the range 0..99 for x e y.

  test =:  (* = *. * +.) & ?
  *./ test~  1000 # 100
parent bruturis 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton