Skip to content

Commit

Permalink
tighten the variable ratios for elliptics
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtized committed Sep 12, 2023
1 parent 980c04b commit a0035e6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/shimmers/sketches/elliptics.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
(defn generate-time-factors [n]
(let [primes (sm/primes-between 2 50)]
(->> (repeatedly (fn []
(let [num (dr/rand-nth primes)]
(/ num (dr/rand-nth (remove #{num} primes))))))
(filter (fn [x] (<= 0.1 x 2.5)))
(let [num (dr/rand-nth primes)
denom (dr/rand-nth (remove #{num} primes))]
(/ num denom))))
(filter (fn [x] (<= 0.25 x 2.0)))
(take n)
vec)))

Expand Down

0 comments on commit a0035e6

Please sign in to comment.