bug-gsl
[Top][All Lists]
Advanced

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

Re: [Bug-gsl] GSL fails to honor zero's sign at branch cuts


From: Brian Gough
Subject: Re: [Bug-gsl] GSL fails to honor zero's sign at branch cuts
Date: Tue, 15 Nov 2011 22:23:55 +0000
User-agent: Wanderlust/2.15.6 (Almost Unreal) Emacs/23.3 Mule/6.0 (HANACHIRUSATO)

At Sun, 13 Nov 2011 00:23:32 +0100,
Richard B. Kreckel wrote:
> With that patch, some checks fail. Where they fail it should be 
> sufficient to flip the sign of the zero real or imaginary part in the 
> argument. (Of course, if one wishes, one can add new test vectors for 
> the opposite signed zero.)

Hello Richard.  Thanks for the patch.  I'm happy to apply this and
follow the general signed zero convention -- I'm not in a position to
check it myself so I'll just go with whatever you submit, but I just
wanted to confirm some things:

- in the manual we say "for multiple-valued functions the branch cuts
have been chosen to follow the conventions of Abramowitz and Stegun in
the Handbook of Mathematical Functions. The functions return
principal values which are the same as those in GNU Calc, which in
turn are the same as those in Common Lisp, The Language (Second
Edition) and the HP-28/48 series of calculators."

Does this still hold?  I generated the test values with GNU Calc
(complex/test.el) so there's some kind of inconsistency if the tests
are failing (maybe because GNU Calc does not have signed zero?).
Maybe they should be generated with a common lisp implementation with
signed zero instead.

- we aim to support old C89 compilers.  Is there a portable way to do
a signbit() function in C89?

-- 
Brian Gough




reply via email to

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