By definition NaN never equals any other number, including NaN itself, so
isn't it a perfectly valid scenario to generate double NaNs?
(Note: I've not used spec yet, so correct me if I'm completely off track)
Am Montag, 7. November 2016 23:07:14 UTC+1 schrieb Alex Miller:
>
> I think it would be
Yes it did: https://dev.clojure.org/jira/browse/CLJ-2054
On Tuesday, March 6, 2018 at 12:15:26 PM UTC-7, Wes Morgan wrote:
>
> Did this ticket get created?
>
> On Monday, November 7, 2016 at 3:26:15 PM UTC-7, Jim foo.bar wrote:
>>
>> Alright cool, I'll do that tomorrow :)
>>
>> Thanks,
>>
>> Dimi
Did this ticket get created?
On Monday, November 7, 2016 at 3:26:15 PM UTC-7, Jim foo.bar wrote:
>
> Alright cool, I'll do that tomorrow :)
>
> Thanks,
>
> Dimitris
>
> On 07/11/16 22:07, Alex Miller wrote:
>
> I think it would be reasonable to log a jira enhancement request for the
> spec any?
Alright cool, I'll do that tomorrow :)
Thanks,
Dimitris
On 07/11/16 22:07, Alex Miller wrote:
I think it would be reasonable to log a jira enhancement request for
the spec any? generator to avoid generating double NaNs.
On Monday, November 7, 2016 at 12:30:24 PM UTC-6, Jim foo.bar wrote:
I think it would be reasonable to log a jira enhancement request for the
spec any? generator to avoid generating double NaNs.
On Monday, November 7, 2016 at 12:30:24 PM UTC-6, Jim foo.bar wrote:
>
> Hi Alex,
>
> Oh yeah I've seen `s/double-in` but as you point out that doesn't help me
> if I wa
Hi Alex,
Oh yeah I've seen `s/double-in` but as you point out that doesn't help
me if I want to :ret spec a function with similar semantics as remove (a
fn that transforms a seq given a predicate), which I find a very common
indeed. I'm only starting playing with clojure.spec (in fact i've on
Please also take a look at s/double-in, which allows you to exclude NaN
(and Infinity/-Infinity) as valid values.
(I realize this does not address the any? question, but that seems like a
rarer issue to me than cases where I'm explicitly spec'ing a double but
don't want to allow NaN.)
On Monda
Hi all,
clojure.spec helped me realise that NaNs totally break [1] equality (per
`clojure.core/=`). Even though in real production code this might not be
an issue due to how infrequently one deals with NaNs, but during
gen-testing I've found them extremely annoying, and I've essentially
worke