Random rationals do not have random denominators.
NB. denominator of rational
denom=:{: @ (2&x:)
NB. generate some random rationals
f=:_2 %/\ x: @: >: @ ?. @: #~
NB. proportion of odd denominators
g=:(+/%#) @: (1 = 2 |denom"0)
g 1e6 f 1e4
0.6806
About 2/3 of the rationals have odd denominators, and only 1/3 have
even denominators.
Problem: Why?
Best wishes,
John
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm