annotate lib/trigl.h @ 40057:b06060465f09

maint: Run 'make update-copyright'
author Paul Eggert <eggert@cs.ucla.edu>
date Tue, 01 Jan 2019 00:25:11 +0100
parents 10eb9086bea0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18109
244355088b86 maint: add coding cookies to non-ASCII sources
Paul Eggert <eggert@cs.ucla.edu>
parents: 17848
diff changeset
1 /* Declarations for sinl, cosl, tanl internal functions. -*- coding: utf-8 -*-
4239
b33b8603715c Transcendental functions for 'long double', from Paolo Bonzini.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
2 Contributed by Paolo Bonzini
b33b8603715c Transcendental functions for 'long double', from Paolo Bonzini.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3
40057
b06060465f09 maint: Run 'make update-copyright'
Paul Eggert <eggert@cs.ucla.edu>
parents: 19484
diff changeset
4 Copyright 2002-2003, 2009-2019 Free Software Foundation, Inc.
4239
b33b8603715c Transcendental functions for 'long double', from Paolo Bonzini.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5
b33b8603715c Transcendental functions for 'long double', from Paolo Bonzini.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 This file is part of gnulib.
b33b8603715c Transcendental functions for 'long double', from Paolo Bonzini.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 5848
diff changeset
8 This program is free software: you can redistribute it and/or modify
4435
d4efdb886b2a Switch from LGPL to GPL.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4239
diff changeset
9 it under the terms of the GNU General Public License as published by
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 5848
diff changeset
10 the Free Software Foundation; either version 3 of the License, or
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 5848
diff changeset
11 (at your option) any later version.
4239
b33b8603715c Transcendental functions for 'long double', from Paolo Bonzini.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12
4435
d4efdb886b2a Switch from LGPL to GPL.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4239
diff changeset
13 This program is distributed in the hope that it will be useful,
d4efdb886b2a Switch from LGPL to GPL.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4239
diff changeset
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
d4efdb886b2a Switch from LGPL to GPL.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4239
diff changeset
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d4efdb886b2a Switch from LGPL to GPL.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4239
diff changeset
16 GNU General Public License for more details.
4239
b33b8603715c Transcendental functions for 'long double', from Paolo Bonzini.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 5848
diff changeset
18 You should have received a copy of the GNU General Public License
19190
9759915b2aca all: prefer https: URLs
Paul Eggert <eggert@cs.ucla.edu>
parents: 18626
diff changeset
19 along with this program. If not, see <https://www.gnu.org/licenses/>. */
4239
b33b8603715c Transcendental functions for 'long double', from Paolo Bonzini.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20
12994
d63de5fca804 Fix values returned by sinl, cosl.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
21 /* Decompose x into x = k * π/2 + r
d63de5fca804 Fix values returned by sinl, cosl.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
22 where k is an integer and abs(r) <= π/4.
d63de5fca804 Fix values returned by sinl, cosl.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
23 Store r in y[0] and y[1] (main part in y[0], small additional part in
d63de5fca804 Fix values returned by sinl, cosl.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
24 y[1], r = y[0] + y[1]).
d63de5fca804 Fix values returned by sinl, cosl.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
25 Return k. */
4239
b33b8603715c Transcendental functions for 'long double', from Paolo Bonzini.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26 extern int ieee754_rem_pio2l (long double x, long double *y);
12994
d63de5fca804 Fix values returned by sinl, cosl.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
27
d63de5fca804 Fix values returned by sinl, cosl.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
28 /* Compute and return sinl (x + y), where x is the main part and y is the
d63de5fca804 Fix values returned by sinl, cosl.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
29 small additional part of a floating-point number.
d63de5fca804 Fix values returned by sinl, cosl.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
30 iy is 0 when y is known to be 0.0, otherwise iy is 1. */
4239
b33b8603715c Transcendental functions for 'long double', from Paolo Bonzini.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31 extern long double kernel_sinl (long double x, long double y, int iy);
12994
d63de5fca804 Fix values returned by sinl, cosl.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
32
d63de5fca804 Fix values returned by sinl, cosl.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
33 /* Compute and return cosl (x + y), where x is the main part and y is the
d63de5fca804 Fix values returned by sinl, cosl.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
34 small additional part of a floating-point number. */
4239
b33b8603715c Transcendental functions for 'long double', from Paolo Bonzini.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
35 extern long double kernel_cosl (long double x, long double y);