Re: ArithmeticException with doubles

2009-07-10 Thread Mike Hinchey
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

Re: ArithmeticException with doubles

2009-07-10 Thread Daniel Lyons
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 --~--~-~

Re: ArithmeticException with doubles

2009-07-10 Thread Kevin Downey
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

Re: ArithmeticException with doubles

2009-07-10 Thread Daniel Lyons
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'

Re: ArithmeticException with doubles

2009-07-10 Thread Sean Devlin
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? --~--~-~--~~~---

ArithmeticException with doubles

2009-07-10 Thread John Harrop
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