Re: Rationals, and their size

2010-06-01 Thread Kevin Downey
http://github.com/richhickey/clojure/commit/5772be9fc5ac9ddf92b727908c20b9aab971224a On Mon, May 31, 2010 at 2:12 PM, alux wrote: > Yep, know that, been there ;-)) > > On 31 Mai, 21:39, ataggart wrote: >> On May 31, 12:18 am, alux wrote: >> >> > Ah, thank you - I still shy away from looking int

Re: Rationals, and their size

2010-05-31 Thread alux
Yep, know that, been there ;-)) On 31 Mai, 21:39, ataggart wrote: > On May 31, 12:18 am, alux wrote: > > > Ah, thank you - I still shy away from looking into Richs sources, but > > here it helps: Ratio doesn't have getter for numerator and denominator > > - they are just public ;-) > > Ha! A bli

Re: Rationals, and their size

2010-05-31 Thread ataggart
On May 31, 12:18 am, alux wrote: > Ah, thank you - I still shy away from looking into Richs sources, but > here it helps: Ratio doesn't have getter for numerator and denominator > - they are just public ;-) Ha! A blindspot due to writing idiomatic java for far too long. > > Being final thats

Re: Rationals, and their size

2010-05-31 Thread alux
Ah, thank you - I still shy away from looking into Richs sources, but here it helps: Ratio doesn't have getter for numerator and denominator - they are just public ;-) Being final thats okay of course. So. Whether this helps, I dont know too. I still dont have the lever, but now I have a point to

Re: Rationals, and their size

2010-05-30 Thread ataggart
Ratio doesn't emit the numerator and denominator: http://github.com/richhickey/clojure/blob/master/src/jvm/clojure/lang/Ratio.java I'm not sure that would help solve your problem, even if it were available. You either need to turn the ratio into a non-ratio (using float or double) or use unchecke

Rationals, and their size

2010-05-30 Thread alux
Hello, I careless used rationals in a function, and, well, it took some minutes to understand why it was slowing down. (I did this formatting by (println (* 1.0 x)) when it started being unreadable - and forgot that). I still see rationals as very nice, but try to use them carefully now. What I w