On Thursday, July 21, 2016 at 8:50:21 AM UTC-5, miner wrote: > > With a little help from Java, you can make equivalent open intervals for > the desired bounds. For example, > > Also, you can use java.lang.Math/nextUp and nextAfter to get adjacent > doubles for your bounds. > > (java.lang.Math/nextUp 1.1) > ;=> 1.1000000000000003 > > (java.lang.Math/nextAfter 1.1 Double/NEGATIVE_INFINITY) > ;=> 1.0999999999999999 > > There are a few tricky situations around the zeroes and infinities so you > should read the doc on nextAfter, especially if you’re dealing with extreme > doubles. >
Cool--very nice to know. Thanks. I may use it. Ideally, I'd rather not have to descend to that level for a spec, because the meaning becomes less clear, and I'd rather let built-in language constructs hide differences between Clojure and Clojurescript whenever possible. Testing for being > 0.0 and < 1.1 won't involve a meaningful difference in different clojure variants, for most purposes. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.