I take it you are referring to the difference in capitalization.  I am
using java 1.7.0_07 on Mac OS X 10.7.5.

$ java -version
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)

On Tue, Oct 30, 2012 at 2:35 PM, JvJ <kfjwhee...@gmail.com> wrote:
> I executed the same test in java and got "infinity" as a result.  What
> version of the JDK are you using?  I'm using 1.7
>
>
> On Tuesday, 30 October 2012 11:10:17 UTC-4, Tim Olsen wrote:
>>
>> Hello Clojurians.
>>
>> Normally by some IEEE floating-point standard, division by 0.0 should
>> give Infinity (or NaN if the divisor is also 0.0).  This is the case
>> when using primitive doubles in clojure:
>>
>> (/ 1.0 0.0)
>> => Infinity
>>
>> And even when using boxed Doubles in java:
>>
>> public class BoxedDoubleDivideZero {
>>
>>     public static void main(String[] args) {
>>         Double a = new Double(4.0);
>>         Double b = new Double(0.0);
>>
>>         System.out.println(a/b);
>>     }
>> }
>>
>> $ javac BoxedDoubleDivideZero.java
>> $ java BoxedDoubleDivideZero
>> Infinity
>>
>> But it is not the case when using boxed Doubles in clojure:
>>
>> (/ (Double. 1.0) (Double. 0.0))
>> ArithmeticException Divide by zero  clojure.lang.Numbers.divide
>> (Numbers.java:156)
>>
>> Is this considered a bug or feature?
>>
>> Thanks,
>> Tim
>
> --
> 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 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

Reply via email to