public inbox for ecos-patches@sourceware.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugs.ecos.sourceware.org
To: ecos-patches@ecos.sourceware.org
Subject: [Bug 1001539] Single precision floating point math library
Date: Fri, 28 Jun 2013 17:26:00 -0000	[thread overview]
Message-ID: <bug-1001539-104-VYSlYoDqOS@http.bugs.ecos.sourceware.org/> (raw)
In-Reply-To: <bug-1001539-104@http.bugs.ecos.sourceware.org/>

Please do not reply to this email, use the link below.

http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001539

--- Comment #46 from Ilija Kocho <ilijak@siva.com.mk> ---
I just posted a collection of patches that apply changes announced in comments
above.


Ref: Comment #33
The inlining option CYGSEM_LIBM_IEEE_API_INLINE is applied to most of
ieee754-api functions. This had an impact on math.h, but although it looks very
different, with default CDL settings, after macro expansion, the legacy
declarations are same as before.
The inlining may suppress generation of GCC builtin functions so there is an
override provision. The overriding is typically enforced by architecture HAL.
As an example, overriding is implemented in Cortex-M architecture (precidely
Cortex-M4F) for sqrtf() (Attachment 2295). For backward compatibility inlining
is disabled by default.


In reply to comment #25
John,
Now all tests pass for IEEE mode. With CYGOPT_LIBM_COMPAT_POSIX_IEEE option
enabled they pass for POSIX as well.
The problem with frexpf() was a wrong test vector (the exponent part). I got
the test generation program, adapted output to eCos port and generated correct
test vectors.


In reply to comment #28 and comment #30
Jifl,
I added option CYGOPT_LIBM_COMPAT_POSIX_IEEE so now user can select whether on
out-of-domain error functions return 0 or NaN. In order to provide same
behavior for all double and single precision functions, the code from
standard.c has moved in standard.inl, which is then included in bot standard.c
and standard_float.c
When CYGOPT_LIBM_COMPAT_POSIX_IEEE is enabled POSIX mode passes the test.
When CYGOPT_LIBM_COMPAT_POSIX_IEEE is disabled i.e. functions return 0.0 the
test fails. Following code snippet can make test pass (example acosf.h).
Please advise.

--- acosf.h------

+#if defined(CYGSEM_LIBM_COMPAT_IEEE_ONLY) ||
+    defined (CYGOPT_LIBM_COMPAT_POSIX_IEEE)
+#define EDOM_RETVAL (2143289344u)
+#else
+#define EDOM_RETVAL (0)
+#endif

 static const Cyg_libm_test_float_vec_t acosf_vec[] = {

-{0, 3214514586u, 1115684864u, 2143289344u, EDOM, ACOS_TOLERANCE, 0},
+{0, 3214514586u, 1115684864u, EDOM_RETVAL, EDOM, ACOS_TOLERANCE, 0},
 .....
 };

---END-----------


Ref comment #33 (again)
Complex functions are added in attachment 2294. I have nothing to add to my
discussion in comment 33 except a question: "Should we change the title of this
bug?"


Bottom line:
Considering the size of this patches, I would invite all who had already
commented (other people are welcome of course), to steal some time to do it
again. I am testing on Cortex-M4 and it would be good if somebody could test on
other platforms. Perhaps there may be interest to test this patches in a course
of Gnutools test release tests?

Ilija

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2013-06-28 17:26 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-20 19:23 [Bug 1001539] New: " bugzilla-daemon
2012-03-20 19:24 ` [Bug 1001539] " bugzilla-daemon
2012-03-20 19:26 ` bugzilla-daemon
2012-03-20 19:39 ` bugzilla-daemon
2012-03-20 19:39 ` bugzilla-daemon
2012-03-20 19:40 ` bugzilla-daemon
2012-03-20 19:41 ` bugzilla-daemon
2012-03-20 19:43 ` bugzilla-daemon
2012-03-20 19:47 ` bugzilla-daemon
2012-03-21 13:44 ` bugzilla-daemon
2012-03-21 15:56 ` bugzilla-daemon
2012-03-21 18:36 ` bugzilla-daemon
2012-03-21 19:52 ` bugzilla-daemon
2012-03-22 10:24 ` bugzilla-daemon
2012-03-22 10:25 ` bugzilla-daemon
2012-03-22 10:26 ` bugzilla-daemon
2012-03-22 10:27 ` bugzilla-daemon
2012-03-22 10:28 ` bugzilla-daemon
2012-03-22 11:01 ` bugzilla-daemon
2012-03-22 13:42 ` bugzilla-daemon
2012-03-22 18:05 ` bugzilla-daemon
2012-03-22 23:53 ` bugzilla-daemon
2012-08-08 11:48 ` bugzilla-daemon
2013-05-15 20:00 ` bugzilla-daemon
2013-05-16  9:59 ` bugzilla-daemon
2013-06-07  9:17 ` bugzilla-daemon
2013-06-07 12:47 ` bugzilla-daemon
2013-06-07 20:20 ` bugzilla-daemon
2013-06-08 12:24 ` bugzilla-daemon
2013-06-08 15:37 ` bugzilla-daemon
2013-06-08 19:04 ` bugzilla-daemon
2013-06-08 19:08 ` bugzilla-daemon
2013-06-08 19:39 ` bugzilla-daemon
2013-06-09  9:39 ` bugzilla-daemon
2013-06-09  9:42 ` bugzilla-daemon
2013-06-09 18:23 ` bugzilla-daemon
2013-06-28 15:42 ` bugzilla-daemon
2013-06-28 15:44 ` bugzilla-daemon
2013-06-28 15:46 ` bugzilla-daemon
2013-06-28 15:51 ` bugzilla-daemon
2013-06-28 15:52 ` bugzilla-daemon
2013-06-28 15:53 ` bugzilla-daemon
2013-06-28 15:55 ` bugzilla-daemon
2013-06-28 15:56 ` bugzilla-daemon
2013-06-28 15:57 ` bugzilla-daemon
2013-06-28 15:58 ` bugzilla-daemon
2013-06-28 17:26 ` bugzilla-daemon [this message]
2013-08-09 15:44 ` bugzilla-daemon
2013-08-25 15:41 ` bugzilla-daemon
2013-09-24 18:08 ` bugzilla-daemon

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=bug-1001539-104-VYSlYoDqOS@http.bugs.ecos.sourceware.org/ \
    --to=bugzilla-daemon@bugs.ecos.sourceware.org \
    --cc=ecos-patches@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).