All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Jaeger <aj-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>
To: Michael Kerrisk <mtk.manpages-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
Cc: Fabian Kreutz
	<kreutz-WMH0Fc3rTAP1qYPpFx2fzhvVK+yQ3ZXh@public.gmane.org>,
	Andries Brouwer <Andries.Brouwer-rh8NL+sEX9E@public.gmane.org>,
	linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: math_error.7 draft 4, for review
Date: Fri, 25 Jul 2008 14:50:48 +0200	[thread overview]
Message-ID: <m3myk6cel3.fsf@gromit.moeb> (raw)
In-Reply-To: <cfd18e0f0807250349jaa38928kaac968720c377322-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> (Michael Kerrisk's message of "Fri, 25 Jul 2008 12:49:47 +0200")

[-- Attachment #1: Type: text/plain, Size: 1740 bytes --]

"Michael Kerrisk" <mtk.manpages-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> writes:

> On Fri, Jul 25, 2008 at 12:36 PM, Andreas Jaeger <aj-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org> wrote:
>> "Michael Kerrisk" <mtk.manpages-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> writes:
>>
>>> Well, for example, according to my tests, cos(3) does not set errno.
>>> Is that what you would have expected?
>>
>> No, I wouldn't.
>
> (Slightly confused here, since you seem to contradict my result, but
> then the text below seems to agree with my result.  But maybe I'm just
> misreading your text.)

I was confused as well ;)

>> And double checking, it's the other way round :-(.  We
>> test the exception handling, not the error handling, so tests like
>> (libc/math/libm-test.inc) these
>>
>>  TEST_f_f (cos, plus_infty, nan_value, INVALID_EXCEPTION);
>>  TEST_f_f (cos, minus_infty, nan_value, INVALID_EXCEPTION);
>>
>> test that cos with input plus/minus infinity returns a NaN and raises
>> and invalid exception which is tested with fetestexcept.  And if you
>> have different results, please tell me,
>
> When I run the program belwo, this is what I see for a domain error from cos():
>
> $ ./a.out inf
> errno == 0
> fetestexcept() says: 1 FE_INVALID
> cos(inf)=nan

Which is the correct behaviour for the exception AFAIK.  Setting of
errno is indeed missing - if math_errhandling has the right value which
is unfortunately missing,

Andreas
-- 
 Andreas Jaeger, Director Platform/openSUSE, aj-l3A5Bk7waGM@public.gmane.org
  SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
   Maxfeldstr. 5, 90409 Nürnberg, Germany
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

  parent reply	other threads:[~2008-07-25 12:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-21 10:23 math_error.7 draft 4, for review Michael Kerrisk
     [not found] ` <cfd18e0f0807210323m4912a31pa5359c2b7409167c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-21 10:25   ` Michael Kerrisk
     [not found]     ` <cfd18e0f0807210325m7606441as19811b6802661a8c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-25  9:30       ` Andreas Jaeger
     [not found]         ` <m3zlo6b9b8.fsf-Qr39nsLl7G5WFLYQ/5USTw@public.gmane.org>
2008-07-25  9:36           ` Michael Kerrisk
     [not found]             ` <cfd18e0f0807250236y476023fan90e97822e772859e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-25 10:02               ` Andreas Jaeger
     [not found]                 ` <m37ibab7sr.fsf-Qr39nsLl7G5WFLYQ/5USTw@public.gmane.org>
2008-07-25 10:16                   ` Michael Kerrisk
     [not found]                     ` <cfd18e0f0807250316k4bb6cbd1t8c6f20317f669c4a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-25 10:36                       ` Andreas Jaeger
     [not found]                         ` <m3y73q9ro3.fsf-Qr39nsLl7G5WFLYQ/5USTw@public.gmane.org>
2008-07-25 10:49                           ` Michael Kerrisk
     [not found]                             ` <cfd18e0f0807250349jaa38928kaac968720c377322-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-25 12:50                               ` Andreas Jaeger [this message]
     [not found]                                 ` <m3myk6cel3.fsf-Qr39nsLl7G5WFLYQ/5USTw@public.gmane.org>
2008-07-25 12:56                                   ` Michael Kerrisk
     [not found]                                     ` <cfd18e0f0807250556p40ae6cd3l8b6617fadabd6411-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-25 13:11                                       ` Andreas Jaeger

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=m3myk6cel3.fsf@gromit.moeb \
    --to=aj-et1tbqhtxzrqt0dzr+alfa@public.gmane.org \
    --cc=Andries.Brouwer-rh8NL+sEX9E@public.gmane.org \
    --cc=kreutz-WMH0Fc3rTAP1qYPpFx2fzhvVK+yQ3ZXh@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.