// Copyright (C) 1988-1994 Sun Microsystems, Inc. 2550 Garcia Avenue
// Mountain View, California 94043 All rights reserved.
//
// Any person is hereby authorized to download, copy, use, create bug fixes,
// and distribute, subject to the following conditions:
//
// 1. the software may not be redistributed for a fee except as
// reasonable to cover media costs;
// 2. any copy of the software must include this notice, as well as
// any other embedded copyright notices; and
// 3. any distribution of this software or derivative works thereof
// must comply with all applicable U.S. export control laws.
//
// THE SOFTWARE IS MADE AVAILABLE "AS IS" AND WITHOUT EXPRESS OR IMPLIED
// WARRANTY OF ANY KIND, INCLUDING BUT NOT LIMITED TO THE IMPLIED
// WARRANTIES OF DESIGN, MERCHANTIBILITY, FITNESS FOR A PARTICULAR
// PURPOSE, NON-INFRINGEMENT, PERFORMANCE OR CONFORMANCE TO
// SPECIFICATIONS.
//
// BY DOWNLOADING AND/OR USING THIS SOFTWARE, THE USER WAIVES ALL CLAIMS
// AGAINST SUN MICROSYSTEMS, INC. AND ITS AFFILIATED COMPANIES IN ANY
// JURISDICTION, INCLUDING BUT NOT LIMITED TO CLAIMS FOR DAMAGES OR
// EQUITABLE RELIEF BASED ON LOSS OF DATA, AND SPECIFICALLY WAIVES EVEN
// UNKNOWN OR UNANTICIPATED CLAIMS OR LOSSES, PRESENT AND FUTURE.
//
// IN NO EVENT WILL SUN MICROSYSTEMS, INC. OR ANY OF ITS AFFILIATED
// COMPANIES BE LIABLE FOR ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL,
// INDIRECT AND CONSEQUENTIAL DAMAGES, EVEN IF IT HAS BEEN ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGES.
//
// This file is provided with no support and without any obligation on the
// part of Sun Microsystems, Inc. ("Sun") or any of its affiliated
// companies to assist in its use, correction, modification or
// enhancement. Nevertheless, and without creating any obligation on its
// part, Sun welcomes your comments concerning the software and requests
// that they be sent to fdlibm-comments@sunpro.sun.com.
// asins(+-1) is +-pi/2
T(RN, 0x1p+0, 0x1.921fb6p+0, 0x1.777a5cp-2, INEXACT)
T(RN, -0x1p+0, -0x1.921fb6p+0, -0x1.777a5cp-2, INEXACT)
// asins(+-(1 - tiny)) :=: +-(pi/2-sqrt(2*tiny))
T(RN, 0x1.fffffep-1, 0x1.920914p+0, -0x1.4bb4ep-2, INEXACT)
T(RN, -0x1.fffffep-1, -0x1.920914p+0, 0x1.4bb4ep-2, INEXACT)
T(RZ, 0x1.fffffep-1, 0x1.920914p+0, -0x1.4bb4dep-2, INEXACT)
T(RZ, -0x1.fffffep-1, -0x1.920914p+0, 0x1.4bb4dep-2, INEXACT)
T(RU, 0x1.fffffep-1, 0x1.920916p+0, 0x1.5a2592p-1, INEXACT)
T(RU, -0x1.fffffep-1, -0x1.920914p+0, 0x1.4bb4ep-2, INEXACT)
T(RD, 0x1.fffffep-1, 0x1.920914p+0, -0x1.4bb4ep-2, INEXACT)
T(RD, -0x1.fffffep-1, -0x1.920916p+0, -0x1.5a2592p-1, INEXACT)
// asins(tiny) is tiny (only in nearest mode)
T(RN, 0x1.ffa2e6p-16, 0x1.ffa2e6p-16, -0x1.549b44p-9, INEXACT)
T(RN, -0x1.ffa2e6p-16, -0x1.ffa2e6p-16, 0x1.549b44p-9, INEXACT)
T(RN, 0x1p-126, 0x1p-126, 0x0p+0, INEXACT)
T(RN, -0x1p-126, -0x1p-126, 0x0p+0, INEXACT)
// asins(+-0) is +-0
T(RN, 0x0p+0, 0x0p+0, 0x0p+0, 0)
T(RN, -0x0p+0, -0x0p+0, 0x0p+0, 0)
T(RZ, 0x0p+0, 0x0p+0, 0x0p+0, 0)
T(RZ, -0x0p+0, -0x0p+0, 0x0p+0, 0)
T(RU, 0x0p+0, 0x0p+0, 0x0p+0, 0)
T(RU, -0x0p+0, -0x0p+0, 0x0p+0, 0)
T(RD, 0x0p+0, 0x0p+0, 0x0p+0, 0)
T(RD, -0x0p+0, -0x0p+0, 0x0p+0, 0)
// random arguments between -1 and 1
T(RN, -0x1.13284cp-2, -0x1.1694c4p-2, 0x1.88bdaap-6, INEXACT)
T(RN, 0x1.6ca8ep-1, 0x1.95d814p-1, -0x1.8cc59ep-6, INEXACT)
T(RN, 0x1.c2ca6p-1, 0x1.13a9e2p+0, -0x1.8c0144p-3, INEXACT)
T(RN, -0x1.55f12p-1, -0x1.767008p-1, -0x1.1002bep-2, INEXACT)
T(RN, -0x1.15679ep-2, -0x1.18ea3ep-2, 0x1.bdf0fp-3, INEXACT)
T(RN, -0x1.41e132p-5, -0x1.41f66ap-5, -0x1.6c33a2p-3, INEXACT)
T(RN, 0x1.281b0ep-1, 0x1.3bbdbap-1, 0x1.82c4ap-4, INEXACT)
T(RN, 0x1.b5ce34p-1, 0x1.0695bap+0, 0x1.d93dfcp-6, INEXACT)
T(RN, -0x1.583482p-3, -0x1.59d8b6p-3, 0x1.0e3a4p-4, INEXACT)
T(RN, -0x1.ea8224p-1, -0x1.47affap+0, -0x1.86a51ap-2, INEXACT)
// exception cases
T(RN, 0x1.000002p+0, nan, 0x0p+0, INVALID)
T(RZ, 0x1.000002p+0, nan, 0x0p+0, INVALID)
T(RU, 0x1.000002p+0, nan, 0x0p+0, INVALID)
T(RD, 0x1.000002p+0, nan, 0x0p+0, INVALID)
T(RN, -0x1.000002p+0, nan, 0x0p+0, INVALID)
T(RN, 0x1p+1, nan, 0x0p+0, INVALID)
T(RN, 0x1.e00002p+2, nan, 0x0p+0, INVALID)
T(RN, -0x1.fffffep+2, nan, 0x0p+0, INVALID)
T(RN, nan, nan, 0x0p+0, 0)
T(RN, nan, nan, 0x0p+0, 0)
T(RZ, nan, nan, 0x0p+0, 0)
T(RU, nan, nan, 0x0p+0, 0)
T(RD, nan, nan, 0x0p+0, 0)
T(RZ, nan, nan, 0x0p+0, 0)
T(RU, nan, nan, 0x0p+0, 0)
T(RD, nan, nan, 0x0p+0, 0)
T(RD, 0x1.000002p-126, 0x1.000002p-126, 0x0p+0, INEXACT)
T(RD, 0x1.000004p-126, 0x1.000004p-126, 0x0p+0, INEXACT)
T(RD, 0x1p-125, 0x1p-125, 0x0p+0, INEXACT)
T(RD, 0x1p-124, 0x1p-124, 0x0p+0, INEXACT)
T(RD,-0x1.000002p-126,-0x1.000004p-126, -0x1p+0, INEXACT)
T(RD,-0x1.000004p-126,-0x1.000006p-126, -0x1p+0, INEXACT)
T(RD, -0x1p-125,-0x1.000002p-125, -0x1p+0, INEXACT)
T(RD, -0x1p-124,-0x1.000002p-124, -0x1p+0, INEXACT)
T(RD, 0x1p-149, 0x1p-149, 0x0p+0, INEXACT|UNDERFLOW)
T(RD, 0x1p-148, 0x1p-148, 0x0p+0, INEXACT|UNDERFLOW)
T(RD, 0x1p-128, 0x1p-128, 0x0p+0, INEXACT|UNDERFLOW)
T(RD, 0x1p-127, 0x1p-127, 0x0p+0, INEXACT|UNDERFLOW)
T(RD, 0x1.fffff8p-127, 0x1.fffff8p-127, 0x0p+0, INEXACT|UNDERFLOW)
T(RD, 0x1.fffffcp-127, 0x1.fffffcp-127, 0x0p+0, INEXACT|UNDERFLOW)
T(RD, 0x1p-126, 0x1p-126, 0x0p+0, INEXACT)
T(RD, -0x1p-149, -0x1p-148, -0x1p+0, INEXACT|UNDERFLOW)
T(RD, -0x1p-148, -0x1.8p-148, -0x1p+0, INEXACT|UNDERFLOW)
T(RD, -0x1p-128,-0x1.000008p-128, -0x1p+0, INEXACT|UNDERFLOW)
T(RD, -0x1p-127,-0x1.000004p-127, -0x1p+0, INEXACT|UNDERFLOW)
T(RD,-0x1.fffff8p-127,-0x1.fffffcp-127, -0x1p+0, INEXACT|UNDERFLOW)
T(RD,-0x1.fffffcp-127, -0x1p-126, -0x1p+0, INEXACT|UNDERFLOW)
T(RD, -0x1p-126,-0x1.000002p-126, -0x1p+0, INEXACT)
T(RD, 0x1.000004p+0, nan, 0x0p+0, INVALID)
T(RD, 0x1p+1, nan, 0x0p+0, INVALID)
T(RD, 0x1p+2, nan, 0x0p+0, INVALID)
T(RD, 0x1p+126, nan, 0x0p+0, INVALID)
T(RD, 0x1p+127, nan, 0x0p+0, INVALID)
T(RD, 0x1.fffffcp+127, nan, 0x0p+0, INVALID)
T(RD, 0x1.fffffep+127, nan, 0x0p+0, INVALID)
T(RD, inf, nan, 0x0p+0, INVALID)
T(RD, -0x1.000002p+0, nan, 0x0p+0, INVALID)
T(RD, -0x1.000004p+0, nan, 0x0p+0, INVALID)
T(RD, -0x1p+1, nan, 0x0p+0, INVALID)
T(RD, -0x1p+2, nan, 0x0p+0, INVALID)
T(RD, -0x1p+126, nan, 0x0p+0, INVALID)
T(RD, -0x1p+127, nan, 0x0p+0, INVALID)
T(RD,-0x1.fffffcp+127, nan, 0x0p+0, INVALID)
T(RD,-0x1.fffffep+127, nan, 0x0p+0, INVALID)
T(RD, -inf, nan, 0x0p+0, INVALID)
T(RD, 0x1.8p-27, 0x1.8p-27, -0x1.200002p-32, INEXACT)
T(RD, 0x1p-26, 0x1p-26, -0x1.555556p-32, INEXACT)
T(RD, 0x1p-12, 0x1p-12, -0x1.555556p-4, INEXACT)
T(RD, 0x1.8p-12, 0x1.8p-12, -0x1.200002p-2, INEXACT)
T(RD, -0x1.8p-27, -0x1.800002p-27, -0x1p+0, INEXACT)
T(RD, -0x1p-26, -0x1.000002p-26, -0x1p+0, INEXACT)
T(RD, -0x1p-12, -0x1.000002p-12, -0x1.d55556p-1, INEXACT)
T(RD, -0x1.8p-12, -0x1.800002p-12, -0x1.7p-1, INEXACT)
T(RN, 0x1.000002p-126, 0x1.000002p-126, 0x0p+0, INEXACT)
T(RN, 0x1.000004p-126, 0x1.000004p-126, 0x0p+0, INEXACT)
T(RN, 0x1p-125, 0x1p-125, 0x0p+0, INEXACT)
T(RN, 0x1p-124, 0x1p-124, 0x0p+0, INEXACT)
T(RN, 0x1.8p-27, 0x1.8p-27, -0x1.2p-32, INEXACT)
T(RN, 0x1p-26, 0x1p-26, -0x1.555556p-32, INEXACT)
T(RN, 0x1p-12, 0x1p-12, -0x1.555556p-4, INEXACT)
T(RN, 0x1.8p-12, 0x1.8p-12, -0x1.200002p-2, INEXACT)
T(RN,-0x1.000002p-126,-0x1.000002p-126, 0x0p+0, INEXACT)
T(RN,-0x1.000004p-126,-0x1.000004p-126, 0x0p+0, INEXACT)
T(RN, -0x1p-125, -0x1p-125, 0x0p+0, INEXACT)
T(RN, -0x1p-124, -0x1p-124, 0x0p+0, INEXACT)
T(RN, -0x1.8p-27, -0x1.8p-27, 0x1.2p-32, INEXACT)
T(RN, -0x1p-26, -0x1p-26, 0x1.555556p-32, INEXACT)
T(RN, -0x1p-12, -0x1p-12, 0x1.555556p-4, INEXACT)
T(RN, -0x1.8p-12, -0x1.8p-12, 0x1.200002p-2, INEXACT)
T(RN, 0x1p-149, 0x1p-149, 0x0p+0, INEXACT|UNDERFLOW)
T(RN, 0x1p-148, 0x1p-148, 0x0p+0, INEXACT|UNDERFLOW)
T(RN, 0x1p-128, 0x1p-128, 0x0p+0, INEXACT|UNDERFLOW)
T(RN, 0x1p-127, 0x1p-127, 0x0p+0, INEXACT|UNDERFLOW)
T(RN, 0x1.fffff8p-127, 0x1.fffff8p-127, 0x0p+0, INEXACT|UNDERFLOW)
T(RN, 0x1.fffffcp-127, 0x1.fffffcp-127, 0x0p+0, INEXACT|UNDERFLOW)
T(RN, -0x1p-149, -0x1p-149, 0x0p+0, INEXACT|UNDERFLOW)
T(RN, -0x1p-148, -0x1p-148, 0x0p+0, INEXACT|UNDERFLOW)
T(RN, -0x1p-128, -0x1p-128, 0x0p+0, INEXACT|UNDERFLOW)
T(RN, -0x1p-127, -0x1p-127, 0x0p+0, INEXACT|UNDERFLOW)
T(RN,-0x1.fffff8p-127,-0x1.fffff8p-127, 0x0p+0, INEXACT|UNDERFLOW)
T(RN,-0x1.fffffcp-127,-0x1.fffffcp-127, 0x0p+0, INEXACT|UNDERFLOW)
T(RN, 0x1.000004p+0, nan, 0x0p+0, INVALID)
T(RN, 0x1p+2, nan, 0x0p+0, INVALID)
T(RN, 0x1p+126, nan, 0x0p+0, INVALID)
T(RN, 0x1p+127, nan, 0x0p+0, INVALID)
T(RN, 0x1.fffffcp+127, nan, 0x0p+0, INVALID)
T(RN, 0x1.fffffep+127, nan, 0x0p+0, INVALID)
T(RN, inf, nan, 0x0p+0, INVALID)
T(RN, -0x1.000004p+0, nan, 0x0p+0, INVALID)
T(RN, -0x1p+1, nan, 0x0p+0, INVALID)
T(RN, -0x1p+2, nan, 0x0p+0, INVALID)
T(RN, -0x1p+126, nan, 0x0p+0, INVALID)
T(RN, -0x1p+127, nan, 0x0p+0, INVALID)
T(RN,-0x1.fffffcp+127, nan, 0x0p+0, INVALID)
T(RN,-0x1.fffffep+127, nan, 0x0p+0, INVALID)
T(RN, -inf, nan, 0x0p+0, INVALID)
T(RU, 0x1.000002p-126, 0x1.000004p-126, 0x1p+0, INEXACT)
T(RU, 0x1.000004p-126, 0x1.000006p-126, 0x1p+0, INEXACT)
T(RU, 0x1p-125, 0x1.000002p-125, 0x1p+0, INEXACT)
T(RU, 0x1p-124, 0x1.000002p-124, 0x1p+0, INEXACT)
T(RU,-0x1.000002p-126,-0x1.000002p-126, 0x0p+0, INEXACT)
T(RU,-0x1.000004p-126,-0x1.000004p-126, 0x0p+0, INEXACT)
T(RU, -0x1p-125, -0x1p-125, 0x0p+0, INEXACT)
T(RU, -0x1p-124, -0x1p-124, 0x0p+0, INEXACT)
T(RU, 0x1p-149, 0x1p-148, 0x1p+0, INEXACT|UNDERFLOW)
T(RU, 0x1p-148, 0x1.8p-148, 0x1p+0, INEXACT|UNDERFLOW)
T(RU, 0x1p-128, 0x1.000008p-128, 0x1p+0, INEXACT|UNDERFLOW)
T(RU, 0x1p-127, 0x1.000004p-127, 0x1p+0, INEXACT|UNDERFLOW)
T(RU, 0x1.fffff8p-127, 0x1.fffffcp-127, 0x1p+0, INEXACT|UNDERFLOW)
T(RU, 0x1.fffffcp-127, 0x1p-126, 0x1p+0, INEXACT|UNDERFLOW)
T(RU, 0x1p-126, 0x1.000002p-126, 0x1p+0, INEXACT)
T(RU, -0x1p-149, -0x1p-149, 0x0p+0, INEXACT|UNDERFLOW)
T(RU, -0x1p-148, -0x1p-148, 0x0p+0, INEXACT|UNDERFLOW)
T(RU, -0x1p-128, -0x1p-128, 0x0p+0, INEXACT|UNDERFLOW)
T(RU, -0x1p-127, -0x1p-127, 0x0p+0, INEXACT|UNDERFLOW)
T(RU,-0x1.fffff8p-127,-0x1.fffff8p-127, 0x0p+0, INEXACT|UNDERFLOW)
T(RU,-0x1.fffffcp-127,-0x1.fffffcp-127, 0x0p+0, INEXACT|UNDERFLOW)
T(RU, -0x1p-126, -0x1p-126, 0x0p+0, INEXACT)
T(RU, 0x1.000004p+0, nan, 0x0p+0, INVALID)
T(RU, 0x1p+1, nan, 0x0p+0, INVALID)
T(RU, 0x1p+2, nan, 0x0p+0, INVALID)
T(RU, 0x1p+126, nan, 0x0p+0, INVALID)
T(RU, 0x1p+127, nan, 0x0p+0, INVALID)
T(RU, 0x1.fffffcp+127, nan, 0x0p+0, INVALID)
T(RU, 0x1.fffffep+127, nan, 0x0p+0, INVALID)
T(RU, inf, nan, 0x0p+0, INVALID)
T(RU, -0x1.000002p+0, nan, 0x0p+0, INVALID)
T(RU, -0x1.000004p+0, nan, 0x0p+0, INVALID)
T(RU, -0x1p+1, nan, 0x0p+0, INVALID)
T(RU, -0x1p+2, nan, 0x0p+0, INVALID)
T(RU, -0x1p+126, nan, 0x0p+0, INVALID)
T(RU, -0x1p+127, nan, 0x0p+0, INVALID)
T(RU,-0x1.fffffcp+127, nan, 0x0p+0, INVALID)
T(RU,-0x1.fffffep+127, nan, 0x0p+0, INVALID)
T(RU, -inf, nan, 0x0p+0, INVALID)
T(RU, 0x1.8p-27, 0x1.800002p-27, 0x1p+0, INEXACT)
T(RU, 0x1p-26, 0x1.000002p-26, 0x1p+0, INEXACT)
T(RU, 0x1p-12, 0x1.000002p-12, 0x1.d55556p-1, INEXACT)
T(RU, 0x1.8p-12, 0x1.800002p-12, 0x1.7p-1, INEXACT)
T(RU, -0x1.8p-27, -0x1.8p-27, 0x1.200002p-32, INEXACT)
T(RU, -0x1p-26, -0x1p-26, 0x1.555556p-32, INEXACT)
T(RU, -0x1p-12, -0x1p-12, 0x1.555556p-4, INEXACT)
T(RU, -0x1.8p-12, -0x1.8p-12, 0x1.200002p-2, INEXACT)
T(RZ, 0x1.000002p-126, 0x1.000002p-126, 0x0p+0, INEXACT)
T(RZ, 0x1.000004p-126, 0x1.000004p-126, 0x0p+0, INEXACT)
T(RZ, 0x1p-125, 0x1p-125, 0x0p+0, INEXACT)
T(RZ, 0x1p-124, 0x1p-124, 0x0p+0, INEXACT)
T(RZ,-0x1.000002p-126,-0x1.000002p-126, 0x0p+0, INEXACT)
T(RZ,-0x1.000004p-126,-0x1.000004p-126, 0x0p+0, INEXACT)
T(RZ, -0x1p-125, -0x1p-125, 0x0p+0, INEXACT)
T(RZ, -0x1p-124, -0x1p-124, 0x0p+0, INEXACT)
T(RZ, 0x1p-149, 0x1p-149, 0x0p+0, INEXACT|UNDERFLOW)
T(RZ, 0x1p-148, 0x1p-148, 0x0p+0, INEXACT|UNDERFLOW)
T(RZ, 0x1p-128, 0x1p-128, 0x0p+0, INEXACT|UNDERFLOW)
T(RZ, 0x1p-127, 0x1p-127, 0x0p+0, INEXACT|UNDERFLOW)
T(RZ, 0x1.fffff8p-127, 0x1.fffff8p-127, 0x0p+0, INEXACT|UNDERFLOW)
T(RZ, 0x1.fffffcp-127, 0x1.fffffcp-127, 0x0p+0, INEXACT|UNDERFLOW)
T(RZ, 0x1p-126, 0x1p-126, 0x0p+0, INEXACT)
T(RZ, -0x1p-149, -0x1p-149, 0x0p+0, INEXACT|UNDERFLOW)
T(RZ, -0x1p-148, -0x1p-148, 0x0p+0, INEXACT|UNDERFLOW)
T(RZ, -0x1p-128, -0x1p-128, 0x0p+0, INEXACT|UNDERFLOW)
T(RZ, -0x1p-127, -0x1p-127, 0x0p+0, INEXACT|UNDERFLOW)
T(RZ,-0x1.fffff8p-127,-0x1.fffff8p-127, 0x0p+0, INEXACT|UNDERFLOW)
T(RZ,-0x1.fffffcp-127,-0x1.fffffcp-127, 0x0p+0, INEXACT|UNDERFLOW)
T(RZ, -0x1p-126, -0x1p-126, 0x0p+0, INEXACT)
T(RZ, 0x1.000004p+0, nan, 0x0p+0, INVALID)
T(RZ, 0x1p+1, nan, 0x0p+0, INVALID)
T(RZ, 0x1p+2, nan, 0x0p+0, INVALID)
T(RZ, 0x1p+126, nan, 0x0p+0, INVALID)
T(RZ, 0x1p+127, nan, 0x0p+0, INVALID)
T(RZ, 0x1.fffffcp+127, nan, 0x0p+0, INVALID)
T(RZ, 0x1.fffffep+127, nan, 0x0p+0, INVALID)
T(RZ, inf, nan, 0x0p+0, INVALID)
T(RZ, -0x1.000002p+0, nan, 0x0p+0, INVALID)
T(RZ, -0x1.000004p+0, nan, 0x0p+0, INVALID)
T(RZ, -0x1p+1, nan, 0x0p+0, INVALID)
T(RZ, -0x1p+2, nan, 0x0p+0, INVALID)
T(RZ, -0x1p+126, nan, 0x0p+0, INVALID)
T(RZ, -0x1p+127, nan, 0x0p+0, INVALID)
T(RZ,-0x1.fffffcp+127, nan, 0x0p+0, INVALID)
T(RZ,-0x1.fffffep+127, nan, 0x0p+0, INVALID)
T(RZ, -inf, nan, 0x0p+0, INVALID)
T(RZ, 0x1.8p-27, 0x1.8p-27, -0x1.2p-32, INEXACT)
T(RZ, 0x1p-26, 0x1p-26, -0x1.555554p-32, INEXACT)
T(RZ, 0x1p-12, 0x1p-12, -0x1.555554p-4, INEXACT)
T(RZ, 0x1.8p-12, 0x1.8p-12, -0x1.2p-2, INEXACT)
T(RZ, -0x1.8p-27, -0x1.8p-27, 0x1.2p-32, INEXACT)
T(RZ, -0x1p-26, -0x1p-26, 0x1.555554p-32, INEXACT)
T(RZ, -0x1p-12, -0x1p-12, 0x1.555554p-4, INEXACT)
T(RZ, -0x1.8p-12, -0x1.8p-12, 0x1.2p-2, INEXACT)