http://github.com/richhickey/clojure/commit/5772be9fc5ac9ddf92b727908c20b9aab971224a

On Mon, May 31, 2010 at 2:12 PM, alux <alu...@googlemail.com> wrote:
> Yep, know that, been there ;-))
>
> On 31 Mai, 21:39, ataggart <alex.tagg...@gmail.com> wrote:
>> On May 31, 12:18 am, alux <alu...@googlemail.com> 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 okay of course.
>>
>> > So. Whether this helps, I dont know too. I still dont have the lever,
>> > but now I have a point to place it at ;-)
>>
>> > Regards, alux
>>
>> > On 31 Mai, 04:10, ataggart <alex.tagg...@gmail.com> wrote:
>>
>> > > Ratio doesn't emit the numerator and 
>> > > denominator:http://github.com/richhickey/clojure/blob/master/src/jvm/clojure/lang...
>>
>> > > 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 unchecked math functions which are subject to
>> > > truncation (e.g., unchecked-multiply).
>>
>> > > On May 30, 1:32 pm, alux <alu...@googlemail.com> wrote:
>>
>> > > > 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 would really like is a possibility to round to a numer of a
>> > > > certain size. Like, to an continued fraction of a certain size. But,
>> > > > there I need access to the length of numerator and denominator.
>>
>> > > > Now the question - is there any way to access this (or to reach to
>> > > > goal of rounding to a rational), that is easier than using the
>> > > > BigIntegers myself?
>>
>> > > > Thank you, alux
>
> --
> 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



-- 
And what is good, Phaedrus,
And what is not good—
Need we ask anyone to tell us these things?

-- 
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