public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
From: Visar Zejnullahu <visar@siva.mk>
To: ecos-devel@ecos.sourceware.org
Subject: Testing newlib
Date: Mon, 25 Jul 2011 11:30:00 -0000	[thread overview]
Message-ID: <4E2D53B4.1060108@siva.mk> (raw)

Hi.

As announced here:
http://sourceware.org/ml/ecos-devel/2011-07/msg00003.html we are working
on a port of Newlib's single precision floating point math library
(float vs double...).

I know part of the questions should be addressed to the Newlib's mailing
list (which I have done as well), but I am asking help on the Ecos part
of the problems.

We've reached the testing phase of the single precision functions.
First, I have noticed the tests provided in Ecos are different from
those of Newlib's. Can anyone tell how are the test cases chosen? As one
can notice, the test cases in Ecos are random, but are they randomly
chosen over some interval that is "critical" for some specific function
(i.e. some interval in which the specific function might return some
value that differs from the value it should return, that is, in this
interval the function might be erroneous). On the other hand, the test
cases in Newlib are from the interval [-1.2;1.19] with step 0.01, and
some other test cases that do not exceed the interval [-30;30].

Second, I have noticed, there are no tests provided in the
current/tests/vectors directory (where all tests for the corresponding
functions are) for these functions: acosh, atanh, gamma functions,
hypot, Bessel functions, remainder, scalb, asinh, cbrt, copysign, error
function, expm1, finite, ilogb, isnan, log1p, nextafter, rint, scalbn
and significand (I am talking about the standard
double-receiving-and-returning functions, not their float counterparts
we are working on). From these functions. I could not find tests on the
corresponding test folder of the Newlib (1.19.0) for these functions:
remainder, scalb, cbrt, copysign, expm1, finite, ilogb, nextafter, rint,
scalbn and significand. How could this be explained? I know that some of
them are not standard ANSI C functions, and some of them are closely
related with other similar functions (for example, expm1(x) is exp(x) -
1, as the name suggests).

Also, I have noticed that in some functions, when the argument is out of
range, the function returns value other than specified in documentation
of the Newlib. For example, when asin receives argument not in the range
[-1;1], the documentation says it should return NaN, while in fact it
returns zero.

And lastly, about the gamma function - I've used the tests provided from
Newlib, and when I try to compile the test files about this function, I
get the error
ecos/packages/language/c/libm/current/src/double/ieee754-api/w_gamma.c:99:
undefined reference to `signgam'. Can anyone help on this?

Kind regards,
Visar

             reply	other threads:[~2011-07-25 11:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-25 11:30 Visar Zejnullahu [this message]
2011-07-25 18:02 ` Sergei Gavrikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E2D53B4.1060108@siva.mk \
    --to=visar@siva.mk \
    --cc=ecos-devel@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).