[gambit-list] Proposed patch

Marc Feeley feeley at iro.umontreal.ca
Tue Dec 10 12:10:34 EST 2013


On Dec 10, 2013, at 11:45 AM, Bradley Lucier <lucier at math.purdue.edu> wrote:

> Thanks for the comments.
> 
> On 12/10/2013 09:38 AM, Marc Feeley wrote:
>> 
>> On Dec 9, 2013, at 10:28 PM, Bradley Lucier <lucier at math.purdue.edu> wrote:
>> 
>>> lib/_num.scm: Add ##flsquare, ##square, and square.
>> Is the naming consistent with other Schemes?
> 
> Yes.
> 
>> 
>>>  Add ##exact-int.negative?
>> Fine.
>> 
>>> Use it in ##abs.  Add functions from Kahan's paper: ##kahan.abs, ##kahan.arg,
>>> ##kahan.cssqs, ##kahan.csqrt, ##kahan.cacos, ##kahan.casin, ##kahan.casinh,
>>> ##kahan.catanh, ##kahan.ctanh, ##kahan.ctan; and constants ##kahan.omega,
>>> ##kahan.epsilon, ##kahan.lambda.
>> I dislike the naming.  Is "kahan" the best prefix?  In any case, for consistency with the rest, it should be "kahan-" not "kahan." because the prefix "T." is used to name functions related to type T.  Kahan is not a type (or is it?).
> 
> I renamed all the ##kahan. functions to just begin with "##c" (as in "c"omplex).
> 
>> 
>>>  Add functions ##conjugate and conjugate.
>> Is the naming consistent with other Schemes?
> 
> Yes.

Great.

>>> Marc: I'd like to have the compiler recognize ##flsquare.
>> Easy.
>> 
>>> I'll attach the patch.  I would really appreciate any comments.
>> What is missing for this patch is a bunch of unit tests.  Each of the new inlined primitives should be tested for precision (after all, that is why they were added, so unit tests should verify this).
> 
> Later.  I promise. :-)

Not good enough!  If I don't take a hard line on this one, things will slip.  But I can help you!

From now on, patches for new functionality will have to come with appropriate unit tests.  Unit tests for existing features will have to be added too.

Marc




More information about the Gambit-list mailing list