Blame src/math/ucb/acos.h

nsz f9d179
// Copyright (C) 1988-1994 Sun Microsystems, Inc. 2550 Garcia Avenue
nsz f9d179
// Mountain View, California  94043 All rights reserved.
nsz f9d179
//
nsz f9d179
// Any person is hereby authorized to download, copy, use, create bug fixes,
nsz f9d179
// and distribute, subject to the following conditions:
nsz f9d179
//
nsz f9d179
// 	1.  the software may not be redistributed for a fee except as
nsz f9d179
// 	    reasonable to cover media costs;
nsz f9d179
// 	2.  any copy of the software must include this notice, as well as
nsz f9d179
// 	    any other embedded copyright notices; and
nsz f9d179
// 	3.  any distribution of this software or derivative works thereof
nsz f9d179
// 	    must comply with all applicable U.S. export control laws.
nsz f9d179
//
nsz f9d179
// THE SOFTWARE IS MADE AVAILABLE "AS IS" AND WITHOUT EXPRESS OR IMPLIED
nsz f9d179
// WARRANTY OF ANY KIND, INCLUDING BUT NOT LIMITED TO THE IMPLIED
nsz f9d179
// WARRANTIES OF DESIGN, MERCHANTIBILITY, FITNESS FOR A PARTICULAR
nsz f9d179
// PURPOSE, NON-INFRINGEMENT, PERFORMANCE OR CONFORMANCE TO
nsz f9d179
// SPECIFICATIONS.
nsz f9d179
//
nsz f9d179
// BY DOWNLOADING AND/OR USING THIS SOFTWARE, THE USER WAIVES ALL CLAIMS
nsz f9d179
// AGAINST SUN MICROSYSTEMS, INC. AND ITS AFFILIATED COMPANIES IN ANY
nsz f9d179
// JURISDICTION, INCLUDING BUT NOT LIMITED TO CLAIMS FOR DAMAGES OR
nsz f9d179
// EQUITABLE RELIEF BASED ON LOSS OF DATA, AND SPECIFICALLY WAIVES EVEN
nsz f9d179
// UNKNOWN OR UNANTICIPATED CLAIMS OR LOSSES, PRESENT AND FUTURE.
nsz f9d179
//
nsz f9d179
// IN NO EVENT WILL SUN MICROSYSTEMS, INC. OR ANY OF ITS AFFILIATED
nsz f9d179
// COMPANIES BE LIABLE FOR ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL,
nsz f9d179
// INDIRECT AND CONSEQUENTIAL DAMAGES, EVEN IF IT HAS BEEN ADVISED OF THE
nsz f9d179
// POSSIBILITY OF SUCH DAMAGES.
nsz f9d179
//
nsz f9d179
// This file is provided with no support and without any obligation on the
nsz f9d179
// part of Sun Microsystems, Inc. ("Sun") or any of its affiliated
nsz f9d179
// companies to assist in its use, correction, modification or
nsz f9d179
// enhancement.  Nevertheless, and without creating any obligation on its
nsz f9d179
// part, Sun welcomes your comments concerning the software and requests
nsz f9d179
// that they be sent to fdlibm-comments@sunpro.sun.com.
nsz f9d179
// acosd(+-1) is 0,pi
nsz f9d179
T(RN,                  0x1p+0,                  0x0p+0,          0x0p+0, 0)
nsz f9d179
T(RN,                 -0x1p+0,    0x1.921fb54442d18p+1,  -0x1.1a6264p-2, INEXACT)
nsz f9d179
// acosd(+-(1 - tiny)) :=:  sqrt(2*tiny) or pi-sqrt(2*tiny)
nsz f9d179
T(RN,    0x1.fffffffffffffp-1,                 0x1p-26,  -0x1.555556p-5, INEXACT)
nsz f9d179
T(RZ,    0x1.fffffffffffffp-1,                 0x1p-26,  -0x1.555554p-5, INEXACT)
nsz f9d179
T(RU,    0x1.fffffffffffffp-1,   0x1.0000000000001p-26,   0x1.eaaaacp-1, INEXACT)
nsz f9d179
T(RD,    0x1.fffffffffffffp-1,                 0x1p-26,  -0x1.555556p-5, INEXACT)
nsz f9d179
T(RN,   -0x1.fffffffffffffp-1,    0x1.921fb52442d18p+1,  -0x1.1a6264p-2, INEXACT)
nsz f9d179
T(RZ,   -0x1.fffffffffffffp-1,    0x1.921fb52442d18p+1,  -0x1.1a6262p-2, INEXACT)
nsz f9d179
T(RU,   -0x1.fffffffffffffp-1,    0x1.921fb52442d19p+1,    0x1.72cedp-1, INEXACT)
nsz f9d179
T(RD,   -0x1.fffffffffffffp-1,    0x1.921fb52442d18p+1,  -0x1.1a6264p-2, INEXACT)
nsz f9d179
// acosd(tiny) = pi/2-tiny
nsz f9d179
T(RN,                 0x1p-44,    0x1.921fb54442c18p+0,  -0x1.1a6264p-2, INEXACT)
nsz f9d179
T(RN,                -0x1p-44,    0x1.921fb54442e18p+0,  -0x1.1a6264p-2, INEXACT)
nsz f9d179
T(RN,                 0x1p-67,    0x1.921fb54442d18p+0,  -0x1.1a5a64p-2, INEXACT)
nsz f9d179
T(RN,                -0x1p-67,    0x1.921fb54442d18p+0,  -0x1.1a6a64p-2, INEXACT)
nsz f9d179
T(RN,               0x1p-1022,    0x1.921fb54442d18p+0,  -0x1.1a6264p-2, INEXACT)
nsz f9d179
T(RN,              -0x1p-1022,    0x1.921fb54442d18p+0,  -0x1.1a6264p-2, INEXACT)
nsz f9d179
T(RN,                  0x0p+0,    0x1.921fb54442d18p+0,  -0x1.1a6264p-2, INEXACT)
nsz f9d179
// some random number between -1 and 1
nsz f9d179
T(RN,   -0x1.13284b2b5006dp-2,    0x1.d7c4e61020905p+0,  -0x1.25171ap-2, INEXACT)
nsz f9d179
T(RN,    0x1.6ca8dfb825911p-1,    0x1.8e6756e27c366p-1,   0x1.4928b8p-4, INEXACT)
nsz f9d179
T(RN,    0x1.c2ca609de7505p-1,     0x1.f9d748eaf956p-2,   0x1.c4a6d2p-4, INEXACT)
nsz f9d179
T(RN,   -0x1.55f11fba96889p-1,    0x1.26abdc68d07aap+1,  -0x1.6d356ep-4, INEXACT)
nsz f9d179
T(RN,   -0x1.15679e27084ddp-2,    0x1.d85a44ea44fe4p+0,   0x1.7c88dep-4, INEXACT)
nsz f9d179
T(RN,   -0x1.41e131b093c41p-5,    0x1.9c2f688eee8abp+0,   0x1.6e23dap-3, INEXACT)
nsz f9d179
T(RN,    0x1.281b0d18455f5p-1,    0x1.e881b1d4eb2a1p-1,  -0x1.fb853ep-2, INEXACT)
nsz f9d179
T(RN,    0x1.b5ce34a51b239p-1,    0x1.1713f567a87efp-1,  -0x1.bf1bf6p-2, INEXACT)
nsz f9d179
T(RN,   -0x1.583481079de4dp-3,    0x1.bd5acbe8fcc59p+0,  -0x1.5e7314p-5, INEXACT)
nsz f9d179
T(RN,   -0x1.ea8223103b871p-1,    0x1.6ce7d66f628e5p+1,   0x1.b5a774p-6, INEXACT)
nsz f9d179
T(RZ,   -0x1.13284b2b5006dp-2,    0x1.d7c4e61020905p+0,  -0x1.25171ap-2, INEXACT)
nsz f9d179
T(RZ,    0x1.6ca8dfb825911p-1,    0x1.8e6756e27c365p-1,  -0x1.d6dae8p-1, INEXACT)
nsz f9d179
T(RZ,    0x1.c2ca609de7505p-1,    0x1.f9d748eaf955fp-2,  -0x1.c76b24p-1, INEXACT)
nsz f9d179
T(RZ,   -0x1.55f11fba96889p-1,    0x1.26abdc68d07aap+1,  -0x1.6d356cp-4, INEXACT)
nsz f9d179
T(RZ,   -0x1.15679e27084ddp-2,    0x1.d85a44ea44fe3p+0,  -0x1.d06ee4p-1, INEXACT)
nsz f9d179
T(RZ,   -0x1.41e131b093c41p-5,    0x1.9c2f688eee8aap+0,  -0x1.a47708p-1, INEXACT)
nsz f9d179
T(RZ,    0x1.281b0d18455f5p-1,    0x1.e881b1d4eb2a1p-1,  -0x1.fb853ep-2, INEXACT)
nsz f9d179
T(RZ,    0x1.b5ce34a51b239p-1,    0x1.1713f567a87efp-1,  -0x1.bf1bf4p-2, INEXACT)
nsz f9d179
T(RZ,   -0x1.583481079de4dp-3,    0x1.bd5acbe8fcc59p+0,  -0x1.5e7314p-5, INEXACT)
nsz f9d179
T(RZ,   -0x1.ea8223103b871p-1,    0x1.6ce7d66f628e4p+1,  -0x1.f252c4p-1, INEXACT)
nsz f9d179
T(RU,   -0x1.13284b2b5006dp-2,    0x1.d7c4e61020906p+0,   0x1.6d7474p-1, INEXACT)
nsz f9d179
T(RU,    0x1.6ca8dfb825911p-1,    0x1.8e6756e27c366p-1,   0x1.4928b8p-4, INEXACT)
nsz f9d179
T(RU,    0x1.c2ca609de7505p-1,     0x1.f9d748eaf956p-2,   0x1.c4a6d4p-4, INEXACT)
nsz f9d179
T(RU,   -0x1.55f11fba96889p-1,    0x1.26abdc68d07abp+1,   0x1.d25954p-1, INEXACT)
nsz f9d179
T(RU,   -0x1.15679e27084ddp-2,    0x1.d85a44ea44fe4p+0,   0x1.7c88dep-4, INEXACT)
nsz f9d179
T(RU,   -0x1.41e131b093c41p-5,    0x1.9c2f688eee8abp+0,   0x1.6e23dap-3, INEXACT)
nsz f9d179
T(RU,    0x1.281b0d18455f5p-1,    0x1.e881b1d4eb2a2p-1,   0x1.023d62p-1, INEXACT)
nsz f9d179
T(RU,    0x1.b5ce34a51b239p-1,     0x1.1713f567a87fp-1,   0x1.207206p-1, INEXACT)
nsz f9d179
T(RU,   -0x1.583481079de4dp-3,    0x1.bd5acbe8fcc5ap+0,    0x1.ea18dp-1, INEXACT)
nsz f9d179
T(RU,   -0x1.ea8223103b871p-1,    0x1.6ce7d66f628e5p+1,   0x1.b5a774p-6, INEXACT)
nsz f9d179
T(RD,   -0x1.13284b2b5006dp-2,    0x1.d7c4e61020905p+0,  -0x1.25171cp-2, INEXACT)
nsz f9d179
T(RD,    0x1.6ca8dfb825911p-1,    0x1.8e6756e27c365p-1,  -0x1.d6daeap-1, INEXACT)
nsz f9d179
T(RD,    0x1.c2ca609de7505p-1,    0x1.f9d748eaf955fp-2,  -0x1.c76b26p-1, INEXACT)
nsz f9d179
T(RD,   -0x1.55f11fba96889p-1,    0x1.26abdc68d07aap+1,  -0x1.6d356ep-4, INEXACT)
nsz f9d179
T(RD,   -0x1.15679e27084ddp-2,    0x1.d85a44ea44fe3p+0,  -0x1.d06ee6p-1, INEXACT)
nsz f9d179
T(RD,   -0x1.41e131b093c41p-5,    0x1.9c2f688eee8aap+0,  -0x1.a4770ap-1, INEXACT)
nsz f9d179
T(RD,    0x1.281b0d18455f5p-1,    0x1.e881b1d4eb2a1p-1,   -0x1.fb854p-2, INEXACT)
nsz f9d179
T(RD,    0x1.b5ce34a51b239p-1,    0x1.1713f567a87efp-1,  -0x1.bf1bf6p-2, INEXACT)
nsz f9d179
T(RD,   -0x1.583481079de4dp-3,    0x1.bd5acbe8fcc59p+0,  -0x1.5e7316p-5, INEXACT)
nsz f9d179
T(RD,   -0x1.ea8223103b871p-1,    0x1.6ce7d66f628e4p+1,  -0x1.f252c6p-1, INEXACT)
nsz f9d179
// exception cases
nsz f9d179
T(RN,    0x1.0000000000001p+0,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RZ,    0x1.0000000000001p+0,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RU,    0x1.0000000000001p+0,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RD,    0x1.0000000000001p+0,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RN,   -0x1.0000000000001p+0,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RN,                  0x1p+1,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RN,   0x1.0000000000001p+16,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RN,  -0x1.fffffffffffffp+16,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RN,                     nan,                     nan,          0x0p+0, 0)
nsz f9d179
T(RN,                     nan,                     nan,          0x0p+0, 0)
nsz f9d179
T(RZ,                     nan,                     nan,          0x0p+0, 0)
nsz f9d179
T(RU,                     nan,                     nan,          0x0p+0, 0)
nsz f9d179
T(RD,                     nan,                     nan,          0x0p+0, 0)
nsz f9d179
T(RZ,                     nan,                     nan,          0x0p+0, 0)
nsz f9d179
T(RU,                     nan,                     nan,          0x0p+0, 0)
nsz f9d179
T(RD,                     nan,                     nan,          0x0p+0, 0)
nsz f9d179
T(RD,                  0x1p+0,                  0x0p+0,          0x0p+0, 0)
nsz f9d179
T(RD,    0x1.0000000000002p+0,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RD,                  0x1p+1,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RD,                  0x1p+2,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RD,               0x1p+1022,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RD,               0x1p+1023,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RD, 0x1.ffffffffffffep+1023,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RD, 0x1.fffffffffffffp+1023,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RD,                     inf,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RD,   -0x1.0000000000001p+0,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RD,   -0x1.0000000000002p+0,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RD,                 -0x1p+1,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RD,                 -0x1p+2,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RD,              -0x1p+1022,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RD,              -0x1p+1023,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RD,-0x1.ffffffffffffep+1023,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RD,-0x1.fffffffffffffp+1023,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RD,                    -inf,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RD,     0x1.ffffffffffffp-1,                 0x1p-24,  -0x1.555556p-1, INEXACT)
nsz f9d179
T(RN,     0x1.ffffffffffffp-1,   0x1.0000000000001p-24,   0x1.555556p-2, INEXACT)
nsz f9d179
T(RN,    0x1.0000000000002p+0,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RN,                  0x1p+2,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RN,               0x1p+1022,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RN,               0x1p+1023,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RN, 0x1.ffffffffffffep+1023,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RN, 0x1.fffffffffffffp+1023,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RN,                     inf,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RN,   -0x1.0000000000002p+0,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RN,                 -0x1p+1,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RN,                 -0x1p+2,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RN,              -0x1p+1022,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RN,              -0x1p+1023,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RN,-0x1.ffffffffffffep+1023,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RN,-0x1.fffffffffffffp+1023,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RN,                    -inf,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RU,                  0x1p+0,                  0x0p+0,          0x0p+0, 0)
nsz f9d179
T(RU,    0x1.0000000000002p+0,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RU,                  0x1p+1,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RU,                  0x1p+2,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RU,               0x1p+1022,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RU,               0x1p+1023,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RU, 0x1.ffffffffffffep+1023,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RU, 0x1.fffffffffffffp+1023,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RU,                     inf,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RU,   -0x1.0000000000001p+0,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RU,   -0x1.0000000000002p+0,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RU,                 -0x1p+1,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RU,                 -0x1p+2,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RU,              -0x1p+1022,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RU,              -0x1p+1023,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RU,-0x1.ffffffffffffep+1023,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RU,-0x1.fffffffffffffp+1023,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RU,                    -inf,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RU,    0x1.fffffffffffe7p-1,   0x1.4000000000002p-24,   0x1.655556p-1, INEXACT)
nsz f9d179
T(RU,     0x1.ffffffffffffp-1,   0x1.0000000000001p-24,   0x1.555556p-2, INEXACT)
nsz f9d179
T(RZ,                  0x1p+0,                  0x0p+0,          0x0p+0, 0)
nsz f9d179
T(RZ,    0x1.0000000000002p+0,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RZ,                  0x1p+1,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RZ,                  0x1p+2,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RZ,               0x1p+1022,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RZ,               0x1p+1023,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RZ, 0x1.ffffffffffffep+1023,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RZ, 0x1.fffffffffffffp+1023,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RZ,                     inf,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RZ,   -0x1.0000000000001p+0,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RZ,   -0x1.0000000000002p+0,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RZ,                 -0x1p+1,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RZ,                 -0x1p+2,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RZ,              -0x1p+1022,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RZ,              -0x1p+1023,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RZ,-0x1.ffffffffffffep+1023,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RZ,-0x1.fffffffffffffp+1023,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RZ,                    -inf,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RZ,    0x1.fffffffffffe7p-1,   0x1.4000000000001p-24,  -0x1.355554p-2, INEXACT)
nsz f9d179
T(RZ,     0x1.ffffffffffffp-1,                 0x1p-24,  -0x1.555554p-1, INEXACT)