Blame src/math/ucb/cos.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
// cosd(+-max) 
nsz f9d179
// cosd(tiny) is ~1.0
nsz f9d179
T(RN,                 0x1p-30,                  0x1p+0,          0x1p-9, INEXACT)
nsz f9d179
T(RN,                -0x1p-30,                  0x1p+0,          0x1p-9, INEXACT)
nsz f9d179
T(RN,               0x1p-1022,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN,              -0x1p-1022,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN,               0x1p-1074,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN,              -0x1p-1074,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
// cosd(+-0) is 1.0
nsz f9d179
T(RN,                  0x0p+0,                  0x1p+0,          0x0p+0, 0)
nsz f9d179
T(RN,                 -0x0p+0,                  0x1p+0,          0x0p+0, 0)
nsz f9d179
T(RZ,                  0x0p+0,                  0x1p+0,          0x0p+0, 0)
nsz f9d179
T(RZ,                 -0x0p+0,                  0x1p+0,          0x0p+0, 0)
nsz f9d179
T(RU,                  0x0p+0,                  0x1p+0,          0x0p+0, 0)
nsz f9d179
T(RU,                 -0x0p+0,                  0x1p+0,          0x0p+0, 0)
nsz f9d179
T(RD,                  0x0p+0,                  0x1p+0,          0x0p+0, 0)
nsz f9d179
T(RD,                 -0x0p+0,                  0x1p+0,          0x0p+0, 0)
nsz f9d179
// cosd(nan or inf) is nan
nsz f9d179
T(RN,                     inf,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RN,                    -inf,                     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(RD,               0x1p-1074,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD,               0x1p-1073,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD,               0x1p-1024,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD,               0x1p-1023,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD, 0x1.ffffffffffffcp-1023,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD, 0x1.ffffffffffffep-1023,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD,               0x1p-1022,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD, 0x1.0000000000001p-1022,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD, 0x1.0000000000002p-1022,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD,               0x1p-1021,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD,               0x1p-1020,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD,                 0x1p-26,    0x1.fffffffffffffp-1,  -0x1.55554p-56, INEXACT)
nsz f9d179
T(RD,               0x1.8p-25,    0x1.ffffffffffff7p-1,      -0x1.bp-50, INEXACT)
nsz f9d179
T(RD,              -0x1p-1074,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD,              -0x1p-1073,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD,            -0x1.2p-1071,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD,              -0x1p-1024,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD,              -0x1p-1023,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD,-0x1.ffffffffffffcp-1023,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD,-0x1.ffffffffffffep-1023,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD,              -0x1p-1022,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD,-0x1.0000000000001p-1022,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD,-0x1.0000000000002p-1022,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD,-0x1.ffffffffffffbp-1022,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD,              -0x1p-1021,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD,-0x1.0000000000003p-1021,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD,              -0x1p-1020,    0x1.fffffffffffffp-1,         -0x1p+0, INEXACT)
nsz f9d179
T(RD,                -0x1p-26,    0x1.fffffffffffffp-1,  -0x1.55554p-56, INEXACT)
nsz f9d179
T(RD,              -0x1.8p-25,    0x1.ffffffffffff7p-1,      -0x1.bp-50, INEXACT)
nsz f9d179
T(RD,                     nan,                     nan,          0x0p+0, 0)
nsz f9d179
T(RD,                     inf,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RD,                     nan,                     nan,          0x0p+0, 0)
nsz f9d179
T(RD,                    -inf,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RD,                 0x1p-27,    0x1.fffffffffffffp-1,  -0x1.800002p-1, INEXACT)
nsz f9d179
T(RD,                -0x1p-27,    0x1.fffffffffffffp-1,  -0x1.800002p-1, INEXACT)
nsz f9d179
T(RN,               0x1p-1073,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN,             0x1.2p-1071,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN,               0x1p-1024,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN,               0x1p-1023,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN, 0x1.ffffffffffffcp-1023,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN, 0x1.ffffffffffffep-1023,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN, 0x1.0000000000001p-1022,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN, 0x1.0000000000002p-1022,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN, 0x1.ffffffffffffbp-1022,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN,               0x1p-1021,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN, 0x1.0000000000003p-1021,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN,               0x1p-1020,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN,                 0x1p-27,                  0x1p+0,          0x1p-3, INEXACT)
nsz f9d179
T(RN,                 0x1p-26,    0x1.fffffffffffffp-1,  -0x1.55556p-56, INEXACT)
nsz f9d179
T(RN,               0x1.8p-25,    0x1.ffffffffffff7p-1,      -0x1.bp-50, INEXACT)
nsz f9d179
T(RN,              -0x1p-1073,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN,            -0x1.2p-1071,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN,              -0x1p-1024,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN,              -0x1p-1023,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN,-0x1.ffffffffffffcp-1023,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN,-0x1.ffffffffffffep-1023,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN,-0x1.0000000000001p-1022,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN,-0x1.0000000000002p-1022,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN,-0x1.ffffffffffffbp-1022,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN,              -0x1p-1021,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN,-0x1.0000000000003p-1021,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN,              -0x1p-1020,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RN,                -0x1p-27,                  0x1p+0,          0x1p-3, INEXACT)
nsz f9d179
T(RN,                -0x1p-26,    0x1.fffffffffffffp-1,  -0x1.55556p-56, INEXACT)
nsz f9d179
T(RN,              -0x1.8p-25,    0x1.ffffffffffff7p-1,      -0x1.bp-50, INEXACT)
nsz f9d179
T(RU,               0x1p-1074,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU,               0x1p-1073,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU,             0x1.2p-1071,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU,               0x1p-1024,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU,               0x1p-1023,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU, 0x1.ffffffffffffcp-1023,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU, 0x1.ffffffffffffep-1023,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU,               0x1p-1022,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU, 0x1.0000000000001p-1022,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU, 0x1.0000000000002p-1022,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU, 0x1.ffffffffffffbp-1022,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU,               0x1p-1021,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU, 0x1.0000000000003p-1021,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU,               0x1p-1020,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU,                 0x1p-27,                  0x1p+0,          0x1p-3, INEXACT)
nsz f9d179
T(RU,                 0x1p-26,                  0x1p+0,          0x1p-1, INEXACT)
nsz f9d179
T(RU,               0x1.8p-25,    0x1.ffffffffffff8p-1,          0x1p+0, INEXACT)
nsz f9d179
T(RU,              -0x1p-1074,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU,              -0x1p-1073,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU,              -0x1p-1024,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU,              -0x1p-1023,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU,-0x1.ffffffffffffcp-1023,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU,-0x1.ffffffffffffep-1023,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU,              -0x1p-1022,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU,-0x1.0000000000001p-1022,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU,-0x1.0000000000002p-1022,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU,              -0x1p-1021,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU,              -0x1p-1020,                  0x1p+0,          0x0p+0, INEXACT)
nsz f9d179
T(RU,                -0x1p-27,                  0x1p+0,          0x1p-3, INEXACT)
nsz f9d179
T(RU,                -0x1p-26,                  0x1p+0,          0x1p-1, INEXACT)
nsz f9d179
T(RU,              -0x1.8p-25,    0x1.ffffffffffff8p-1,          0x1p+0, INEXACT)
nsz f9d179
T(RU,                     nan,                     nan,          0x0p+0, 0)
nsz f9d179
T(RU,                     nan,                     nan,          0x0p+0, 0)
nsz f9d179
T(RU,                     inf,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RU,                    -inf,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RZ,               0x1p-1074,    0x1.fffffffffffffp-1,  -0x1.fffffep-1, INEXACT)
nsz f9d179
T(RZ,               0x1p-1073,    0x1.fffffffffffffp-1,  -0x1.fffffep-1, INEXACT)
nsz f9d179
T(RZ,               0x1p-1024,    0x1.fffffffffffffp-1,  -0x1.fffffep-1, INEXACT)
nsz f9d179
T(RZ,               0x1p-1023,    0x1.fffffffffffffp-1,  -0x1.fffffep-1, INEXACT)
nsz f9d179
T(RZ, 0x1.ffffffffffffcp-1023,    0x1.fffffffffffffp-1,  -0x1.fffffep-1, INEXACT)
nsz f9d179
T(RZ, 0x1.ffffffffffffep-1023,    0x1.fffffffffffffp-1,  -0x1.fffffep-1, INEXACT)
nsz f9d179
T(RZ,               0x1p-1022,    0x1.fffffffffffffp-1,  -0x1.fffffep-1, INEXACT)
nsz f9d179
T(RZ, 0x1.0000000000001p-1022,    0x1.fffffffffffffp-1,  -0x1.fffffep-1, INEXACT)
nsz f9d179
T(RZ, 0x1.0000000000002p-1022,    0x1.fffffffffffffp-1,  -0x1.fffffep-1, INEXACT)
nsz f9d179
T(RZ,               0x1p-1021,    0x1.fffffffffffffp-1,  -0x1.fffffep-1, INEXACT)
nsz f9d179
T(RZ,               0x1p-1020,    0x1.fffffffffffffp-1,  -0x1.fffffep-1, INEXACT)
nsz f9d179
T(RZ,                 0x1p-26,    0x1.fffffffffffffp-1,  -0x1.55554p-56, INEXACT)
nsz f9d179
T(RZ,               0x1.8p-25,    0x1.ffffffffffff7p-1, -0x1.affffep-50, INEXACT)
nsz f9d179
T(RZ,              -0x1p-1074,    0x1.fffffffffffffp-1,  -0x1.fffffep-1, INEXACT)
nsz f9d179
T(RZ,              -0x1p-1073,    0x1.fffffffffffffp-1,  -0x1.fffffep-1, INEXACT)
nsz f9d179
T(RZ,              -0x1p-1024,    0x1.fffffffffffffp-1,  -0x1.fffffep-1, INEXACT)
nsz f9d179
T(RZ,              -0x1p-1023,    0x1.fffffffffffffp-1,  -0x1.fffffep-1, INEXACT)
nsz f9d179
T(RZ,-0x1.ffffffffffffcp-1023,    0x1.fffffffffffffp-1,  -0x1.fffffep-1, INEXACT)
nsz f9d179
T(RZ,-0x1.ffffffffffffep-1023,    0x1.fffffffffffffp-1,  -0x1.fffffep-1, INEXACT)
nsz f9d179
T(RZ,              -0x1p-1022,    0x1.fffffffffffffp-1,  -0x1.fffffep-1, INEXACT)
nsz f9d179
T(RZ,-0x1.0000000000001p-1022,    0x1.fffffffffffffp-1,  -0x1.fffffep-1, INEXACT)
nsz f9d179
T(RZ,-0x1.0000000000002p-1022,    0x1.fffffffffffffp-1,  -0x1.fffffep-1, INEXACT)
nsz f9d179
T(RZ,              -0x1p-1021,    0x1.fffffffffffffp-1,  -0x1.fffffep-1, INEXACT)
nsz f9d179
T(RZ,              -0x1p-1020,    0x1.fffffffffffffp-1,  -0x1.fffffep-1, INEXACT)
nsz f9d179
T(RZ,                -0x1p-26,    0x1.fffffffffffffp-1,  -0x1.55554p-56, INEXACT)
nsz f9d179
T(RZ,              -0x1.8p-25,    0x1.ffffffffffff7p-1, -0x1.affffep-50, INEXACT)
nsz f9d179
T(RZ,                     nan,                     nan,          0x0p+0, 0)
nsz f9d179
T(RZ,                     nan,                     nan,          0x0p+0, 0)
nsz f9d179
T(RZ,                     inf,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RZ,                    -inf,                     nan,          0x0p+0, INVALID)
nsz f9d179
T(RZ,                 0x1p-27,    0x1.fffffffffffffp-1,       -0x1.8p-1, INEXACT)
nsz f9d179
T(RZ,                -0x1p-27,    0x1.fffffffffffffp-1,       -0x1.8p-1, INEXACT)