Skip to content

Commit

Permalink
Add random(QQ)
Browse files Browse the repository at this point in the history
  • Loading branch information
d-torrance committed Sep 21, 2024
1 parent 5c31d32 commit 6f5e7ef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions M2/Macaulay2/m2/reals.m2
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@ RR'.random = opts -> R -> rawRandomRRUniform R.precision
CC'.random = opts -> C -> rawRandomCC C.precision
random RingFamily := opts -> R -> random(default R,opts)

random QQ := QQ => opts -> x -> rawFareyApproximation(
random numeric x, opts.Height)

-- algebraic operations and functions

RR.isBasic = CC.isBasic = RRi.isBasic = true
Expand Down

0 comments on commit 6f5e7ef

Please sign in to comment.