[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] New division operators, and optimization for fractions

From: Mark Weaver
Subject: Re: [PATCH] New division operators, and optimization for fractions
Date: Sat, 12 Feb 2011 14:38:38 -0800 (PST)

Okay, I see what I need to do.  I'll change the API as you suggest, and make an internal wrapper function for SCM_WTA_DISPATCH_2 that unpacks the values object returned from GOOPS and returns the values via the SCM* output parameters.  I should be able to do this by Monday.


--- On Sat, 2/12/11, Andy Wingo <address@hidden> wrote:

From: Andy Wingo <address@hidden>
Subject: Re: [PATCH] New division operators, and optimization for fractions
To: "Mark Weaver" <address@hidden>
Cc: "Ludovic Courtès" <address@hidden>, "guile-devel" <address@hidden>
Date: Saturday, February 12, 2011, 9:54 PM

Hi Mark,

On Sat 12 Feb 2011 22:03, Mark Weaver <address@hidden> writes:

> I really hope you decide to at least apply the first patch for 2.0.
> They are very useful operators, and also they make the existing
> floor/ceiling/truncate/round operators a whole lot faster when applied
> to fractions.  I worked very hard to get them ready for 2.0, and I
> really hope you reconsider.

Ludovic and I really appreciate your work on the numerics side of Guile.
It is wonderful to have someone as careful as you are in this area.  And
it is obvious that this was not only careful work, it was a lot of it.

But do you really want these in, as they are?  Look at the C API here:

  SCM scm_round_divide (SCM, SCM)

It would be better if it were:

  void scm_round_divide (SCM, SCM, SCM*, SCM*)

But it's not, because of our bad multiple-values story.  If we are able
to reach the more appropriate API in the future, we'll have to give it
yet another name (because the right name is taken).  Obviously we
couldn't do that for 2.0, because hey, that's Wednesday.  But we can do
it for 2.0.1.

If you really want this API for 2.0.0, I think we can probably do it,
because this is your area.  But I would like to ask you to consider what
it will be like working with this API in two years, or in five.  If it's
still what you want, let me know, and I will merge it and the other
patches.  (I'm not concerned about the SCM_INTERNAL values hack because
it can always be removed.).  Otherwise, we have time to talk about it
for 2.0.1 :-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]