From: Matthew Flatt <mflatt@cs.utah.edu> To: plt-scheme@po.cs.brown.edu Subject: [plt-scheme] 205.6 Date: Fri, 21 Nov 2003 08:56:32 -0700 The exp-tagged code in CVS for MzScheme and MrEd is now version 205.6. The improvements, by Scott Owens and myself, are all related to bignum arithmetic: * Added `integer-sqrt’, which takes an integer and returns its integer square-root. For positive `n’, the result is the largest positive integer bounded by `(sqrt n)’. For negative `n’, the result is `(* (integer-sqrt (- n)) 0+i)’. Of course, the result is always exact for an exact input. * Added `integer-sqrt/remainder’, where `(integer-sqrt/remainder n)’ returns two values: `(integer-sqrt n)’ and `(- n (expt (integer-sqrt n) 2))’. * Added `quotient/remainder’, where `(quotient/remainder n1 n2)’ returns two values: `(quotient n1 n2)’ and `(remainder n1 n2)’. * Improved performance of some other operations, notably `sqrt’ and `gcd’ on bignums. See also the comp.lang.scheme post cited below. (A reply with more details will appear on the newsgroup.) If anyone knows better or more standard names for the new functions, please let me know. I could only find a precedent for `integer-sqrt’ (from SLIB), and I didn’t like the precedent I found for `quotient/remainder’ (called `divide’ in VSCM). Matthew comp.lang.scheme post: http://groups.google.com/groups?q=g:thl2022410197d&dq=&hl=en&lr=&ie=UTF-8&safe=off&selm=77776c11.0311101033.63194e64%40posting.google.com