I would keep finite? for the semantics associated with the name even if it is just a renaming of rational?. Particularly since you can&#39;t just use (not (infinite? x)) when NaNs are a possibility. [I personally don&#39;t like using rational? for an abstraction that includes irrational numbers.]<br>
<br>On Friday, November 18, 2011, Matthew Flatt &lt;<a href="mailto:mflatt@cs.utah.edu">mflatt@cs.utah.edu</a>&gt; wrote:<br>&gt; Except for `finite?&#39; (which seems to be covered by `rational?&#39;), these<br>&gt; additions sound fine to me.<br>
&gt;<br>&gt; I&#39;m not sure whether they should go in `racket/math&#39; or `racket/base&#39;,<br>&gt; though. Although it feels wrong to keep adding to `racket/base&#39;, two<br>&gt; thoughts make me lean in that direction:<br>
&gt;<br>&gt;  * It will be confusing to have bindings such as<br>&gt;   `exact-nonnegative-integer?&#39; in `racket/base&#39;, while binding such as<br>&gt;   `nonnegative-real?&#39; are in `racket/math&#39;. Putting all of those<br>
&gt;   functions in the same place seems more consistent.<br>&gt;<br>&gt;  * Adding things to `racket/base&#39; probably leads to fewer compatibility<br>&gt;   issues. That&#39;s because `racket/math&#39; could be explicitly imported<br>
&gt;   into a module that defines `nonnegative-real?&#39;, leading to an<br>&gt;   import--definition conflict. If `racket/base&#39; as a module language<br>&gt;   provides nonnegative-real?&#39;, then a module&#39;s own definition of<br>
&gt;   `nonnegative-real?&#39; can shadow it without conflict.<br>&gt;<br>&gt; At Fri, 18 Nov 2011 12:47:16 -0700, Ryan Culpepper wrote:<br>&gt;&gt; On 11/18/2011 12:34 PM, Neil Toronto wrote:<br>&gt;&gt; &gt; On 11/18/2011 12:22 PM, Ryan Culpepper wrote:<br>
&gt;&gt; &gt;&gt; On 11/18/2011 12:13 PM, Neil Toronto wrote:<br>&gt;&gt; &gt;&gt;&gt; I&#39;ve moved this to dev from a private discussion with Doug, who has just<br>&gt;&gt; &gt;&gt;&gt; tried the nightly build.<br>&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; On 11/18/2011 11:43 AM, Williams, Doug wrote:<br>&gt;&gt; &gt;&gt;&gt;&gt; 2) The plot/utils has nan? and infinite?, which are also exported from<br>&gt;&gt; &gt;&gt;&gt;&gt; the science collection and I had to explicitly exclude them in the<br>
&gt;&gt; &gt;&gt;&gt;&gt; require. Can we talk to the powers that be and see about getting them<br>&gt;&gt; &gt;&gt;&gt;&gt; (and finite?) moved to racket/math? Then we can both remove them from<br>&gt;&gt; &gt;&gt;&gt;&gt; our code. [I&#39;m not sure about any interaction with the r6rs functions.]<br>
&gt;&gt; &gt;&gt;&gt;<br>&gt;&gt; &gt;&gt;&gt; Powers That Be, Doug and I would like `nan?&#39; and `infinite?&#39; to be in<br>&gt;&gt; &gt;&gt;&gt; `racket/math&#39;.<br>&gt;&gt; &gt;&gt;&gt;<br>&gt;&gt; &gt;&gt;&gt; I made an exact equivalent of Doug&#39;s `finite?&#39;, but called it<br>
&gt;&gt; &gt;&gt;&gt; `regular-real?&#39;. I use it in all kinds of function contracts (it returns<br>&gt;&gt; &gt;&gt;&gt; #f for non-reals). We would also like that one, with either name, in<br>&gt;&gt; &gt;&gt;&gt; `racket/math&#39;.<br>
&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; How does &#39;finite?&#39; differ from &#39;rational?&#39;?<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; Whoa! It doesn&#39;t!<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; If we&#39;re making a wishlist, I&#39;d really like<br>
&gt;&gt; &gt;&gt; &#39;{positive,nonnegative}-{real,rational}?&#39;.<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; For use or for contracts? For contracts, we already have `&gt;/c&#39;, `&lt;/c&#39;,<br>&gt;&gt; &gt; `&gt;=/c&#39; and `&lt;=/c&#39;, which can do the same as `positive-real?&#39;,<br>
&gt;&gt; &gt; `negative-real?&#39;, `nonnegative-real?&#39; and `nonpositive-real?&#39; if applied<br>&gt;&gt; &gt; to 0, and are arguably easier to read.<br>&gt;&gt;<br>&gt;&gt; I&#39;d argue that they&#39;re less easy to read. Also, despite their<br>
&gt;&gt; availability, I&#39;ve still seen contracts that say &#39;real?&#39; even when they<br>&gt;&gt; mean &#39;(&gt;=/c 0)&#39;, etc. (Or possibly &#39;nonnegative-rational?&#39;.)<br>&gt;&gt;<br>&gt;&gt; &gt; For the `*-rational?&#39; ones, would they identify only exact rationals?<br>
&gt;&gt; &gt; Because that would be inconsistent with `rational?&#39;.<br>&gt;&gt;<br>&gt;&gt; No, they should be consistent with &#39;rational?&#39; and accept inexacts.<br>&gt;&gt;<br>&gt;&gt; &gt; If we *are* making a wishlist, I&#39;d like to add exact-round, exact-floor,<br>
&gt;&gt; &gt; exact-truncate and exact-ceiling. I rarely need to chop off fractional<br>&gt;&gt; &gt; parts without also making the result exact.<br>&gt;&gt;<br>&gt;&gt; +1<br>&gt;&gt;<br>&gt;&gt; Ryan<br>&gt;<br>&gt; _________________________________________________<br>
&gt;  For list-related administrative tasks:<br>&gt;  <a href="http://lists.racket-lang.org/listinfo/dev">http://lists.racket-lang.org/listinfo/dev</a><br>&gt;