user> (/ (double 1.0) (double 0.0))
Infinity
This seems reasonable since by using (double 0.0), you're asking for
double-spec "math" rather than math. :)
-Mike
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure
On Jul 10, 2009, at 2:05 PM, Kevin Downey wrote:
> using math knowledge to answer (corner) cases of the floating point
> spec is silly
> people using doubles should be able to expect doubles to behave like
> doubles
I don't think it's silly, but fair enough.
—
Daniel Lyons
--~--~-~
On Fri, Jul 10, 2009 at 1:00 PM, Daniel Lyons wrote:
>
>
> On Jul 10, 2009, at 12:24 PM, Sean Devlin wrote:
>
>>
>> A quick java program:
>>
>> public static void main(String[] args) {
>> System.out.println(1.0/0.0);
>> }
>>
>> Infinity
>>
>>
>> On Jul 10, 11:08 am, John Harrop wrote:
>>> This
On Jul 10, 2009, at 12:24 PM, Sean Devlin wrote:
>
> A quick java program:
>
> public static void main(String[] args) {
>System.out.println(1.0/0.0);
> }
>
> Infinity
>
>
> On Jul 10, 11:08 am, John Harrop wrote:
>> This is odd:
>> user=> (/ 1.0 0.0)
>> #> (NO_SOURCE_FILE:0)>
>>
>> Shouldn'
A quick java program:
public static void main(String[] args) {
System.out.println(1.0/0.0);
}
Infinity
On Jul 10, 11:08 am, John Harrop wrote:
> This is odd:
> user=> (/ 1.0 0.0)
> # (NO_SOURCE_FILE:0)>
>
> Shouldn't it be Double/POSITIVE_INFINITY?
--~--~-~--~~~---
This is odd:
user=> (/ 1.0 0.0)
#
Shouldn't it be Double/POSITIVE_INFINITY?
--~--~-~--~~~---~--~~
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 post