// 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.
// atans(+-max) is +-pi/2
T(RN, 0x1.fffffep+127, 0x1.921fb6p+0, 0x1.777a5cp-2, INEXACT)
T(RN,-0x1.fffffep+127, -0x1.921fb6p+0, -0x1.777a5cp-2, INEXACT)
// atans(+-1) is +-pi/4
T(RN, 0x1p+0, 0x1.921fb6p-1, 0x1.777a5cp-2, INEXACT)
T(RN, -0x1p+0, -0x1.921fb6p-1, -0x1.777a5cp-2, INEXACT)
// atans(tiny) is tiny
T(RN, 0x1p-29, 0x1p-29, 0x1.555556p-37, INEXACT)
T(RN, -0x1p-29, -0x1p-29, -0x1.555556p-37, INEXACT)
T(RN, 0x1p-126, 0x1p-126, 0x0p+0, INEXACT)
T(RN, -0x1p-126, -0x1p-126, 0x0p+0, INEXACT)
T(RZ, 0x1p-29, 0x1.fffffep-30, -0x1.fffffep-1, INEXACT)
T(RZ, -0x1p-29, -0x1.fffffep-30, 0x1.fffffep-1, INEXACT)
T(RZ, 0x1p-126, 0x1.fffffcp-127, -0x1.fffffep-1, INEXACT|UNDERFLOW)
T(RZ, -0x1p-126,-0x1.fffffcp-127, 0x1.fffffep-1, INEXACT|UNDERFLOW)
T(RU, 0x1p-29, 0x1p-29, 0x1.555556p-37, INEXACT)
T(RU, -0x1p-29, -0x1.fffffep-30, 0x1p+0, INEXACT)
T(RU, 0x1p-126, 0x1p-126, 0x0p+0, INEXACT)
T(RU, -0x1p-126,-0x1.fffffcp-127, 0x1p+0, INEXACT|UNDERFLOW)
T(RD, 0x1p-29, 0x1.fffffep-30, -0x1p+0, INEXACT)
T(RD, -0x1p-29, -0x1p-29, -0x1.555556p-37, INEXACT)
T(RD, 0x1p-126, 0x1.fffffcp-127, -0x1p+0, INEXACT|UNDERFLOW)
T(RD, -0x1p-126, -0x1p-126, 0x0p+0, INEXACT)
// atans(+-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 -2 and 2
T(RN, -0x1.13284cp-1, -0x1.f8f75ep-2, -0x1.ffeb8ap-2, INEXACT)
T(RN, 0x1.6ca8ep+0, 0x1.eadc6ep-1, 0x1.cd861ap-2, INEXACT)
T(RN, 0x1.c2ca6p+0, 0x1.0de7f8p+0, -0x1.c7422ap-2, INEXACT)
T(RN, -0x1.55f12p+0, -0x1.db367cp-1, -0x1.c22522p-2, INEXACT)
T(RN, -0x1.15679ep-1, -0x1.fc7284p-2, 0x1.82b19ep-3, INEXACT)
T(RN, -0x1.41e132p-4, -0x1.413834p-4, -0x1.8b82b8p-2, INEXACT)
T(RN, 0x1.281b0ep+0, 0x1.b74042p-1, 0x1.b8739ep-3, INEXACT)
T(RN, 0x1.b5ce34p+0, 0x1.0aab58p+0, -0x1.2c3954p-2, INEXACT)
T(RN, -0x1.583482p-2, -0x1.4c0e14p-2, -0x1.6847fap-3, INEXACT)
T(RN, -0x1.ea8224p+0, -0x1.16fb9cp+0, -0x1.d09d38p-2, INEXACT)
T(RZ, -0x1.13284cp-1, -0x1.f8f75cp-2, 0x1.000a3ap-1, INEXACT)
T(RZ, 0x1.6ca8ep+0, 0x1.eadc6cp-1, -0x1.193cf2p-1, INEXACT)
T(RZ, 0x1.c2ca6p+0, 0x1.0de7f8p+0, -0x1.c74228p-2, INEXACT)
T(RZ, -0x1.55f12p+0, -0x1.db367ap-1, 0x1.1eed6ep-1, INEXACT)
T(RZ, -0x1.15679ep-1, -0x1.fc7284p-2, 0x1.82b19cp-3, INEXACT)
T(RZ, -0x1.41e132p-4, -0x1.413832p-4, 0x1.3a3ea2p-1, INEXACT)
T(RZ, 0x1.281b0ep+0, 0x1.b7404p-1, -0x1.91e318p-1, INEXACT)
T(RZ, 0x1.b5ce34p+0, 0x1.0aab58p+0, -0x1.2c3952p-2, INEXACT)
T(RZ, -0x1.583482p-2, -0x1.4c0e12p-2, 0x1.a5eep-1, INEXACT)
T(RZ, -0x1.ea8224p+0, -0x1.16fb9ap+0, 0x1.17b162p-1, INEXACT)
T(RU, -0x1.13284cp-1, -0x1.f8f75cp-2, 0x1.000a3cp-1, INEXACT)
T(RU, 0x1.6ca8ep+0, 0x1.eadc6ep-1, 0x1.cd861cp-2, INEXACT)
T(RU, 0x1.c2ca6p+0, 0x1.0de7fap+0, 0x1.1c5eecp-1, INEXACT)
T(RU, -0x1.55f12p+0, -0x1.db367ap-1, 0x1.1eed7p-1, INEXACT)
T(RU, -0x1.15679ep-1, -0x1.fc7284p-2, 0x1.82b19ep-3, INEXACT)
T(RU, -0x1.41e132p-4, -0x1.413832p-4, 0x1.3a3ea4p-1, INEXACT)
T(RU, 0x1.281b0ep+0, 0x1.b74042p-1, 0x1.b873ap-3, INEXACT)
T(RU, 0x1.b5ce34p+0, 0x1.0aab5ap+0, 0x1.69e358p-1, INEXACT)
T(RU, -0x1.583482p-2, -0x1.4c0e12p-2, 0x1.a5ee02p-1, INEXACT)
T(RU, -0x1.ea8224p+0, -0x1.16fb9ap+0, 0x1.17b164p-1, INEXACT)
T(RD, -0x1.13284cp-1, -0x1.f8f75ep-2, -0x1.ffeb8cp-2, INEXACT)
T(RD, 0x1.6ca8ep+0, 0x1.eadc6cp-1, -0x1.193cf4p-1, INEXACT)
T(RD, 0x1.c2ca6p+0, 0x1.0de7f8p+0, -0x1.c7422ap-2, INEXACT)
T(RD, -0x1.55f12p+0, -0x1.db367cp-1, -0x1.c22524p-2, INEXACT)
T(RD, -0x1.15679ep-1, -0x1.fc7286p-2, -0x1.9f539ap-1, INEXACT)
T(RD, -0x1.41e132p-4, -0x1.413834p-4, -0x1.8b82bap-2, INEXACT)
T(RD, 0x1.281b0ep+0, 0x1.b7404p-1, -0x1.91e31ap-1, INEXACT)
T(RD, 0x1.b5ce34p+0, 0x1.0aab58p+0, -0x1.2c3954p-2, INEXACT)
T(RD, -0x1.583482p-2, -0x1.4c0e14p-2, -0x1.6847fcp-3, INEXACT)
T(RD, -0x1.ea8224p+0, -0x1.16fb9cp+0, -0x1.d09d3ap-2, INEXACT)
// atans(+-inf) is +-pi/2
T(RN, inf, 0x1.921fb6p+0, 0x1.777a5cp-2, INEXACT)
T(RN, -inf, -0x1.921fb6p+0, -0x1.777a5cp-2, INEXACT)
// atans(nan) is nan
T(RN, nan, nan, 0x0p+0, 0)
T(RN, nan, nan, 0x0p+0, 0)
T(RZ, nan, nan, 0x0p+0, 0)
T(RZ, nan, nan, 0x0p+0, 0)
T(RU, nan, nan, 0x0p+0, 0)
T(RU, nan, nan, 0x0p+0, 0)
T(RD, nan, nan, 0x0p+0, 0)
T(RD, nan, nan, 0x0p+0, 0)
T(RD, 0x1.000002p-126, 0x1p-126, -0x1p+0, INEXACT)
T(RD, 0x1.000004p-126, 0x1.000002p-126, -0x1p+0, INEXACT)
T(RD, 0x1p-125, 0x1.fffffep-126, -0x1p+0, INEXACT)
T(RD, 0x1p-124, 0x1.fffffep-125, -0x1p+0, INEXACT)
T(RD,-0x1.000002p-126,-0x1.000002p-126, 0x0p+0, INEXACT)
T(RD,-0x1.000004p-126,-0x1.000004p-126, 0x0p+0, INEXACT)
T(RD,-0x1.fffff6p-126,-0x1.fffff6p-126, 0x0p+0, INEXACT)
T(RD, -0x1p-125, -0x1p-125, 0x0p+0, INEXACT)
T(RD,-0x1.000006p-125,-0x1.000006p-125, 0x0p+0, INEXACT)
T(RD, -0x1p-124, -0x1p-124, 0x0p+0, INEXACT)
T(RD, 0x1p-149, 0x0p+0, -0x1p+0, INEXACT|UNDERFLOW)
T(RD, 0x1p-148, 0x1p-149, -0x1p+0, INEXACT|UNDERFLOW)
T(RD, 0x1p-128, 0x1.fffffp-129, -0x1p+0, INEXACT|UNDERFLOW)
T(RD, 0x1p-127, 0x1.fffff8p-128, -0x1p+0, INEXACT|UNDERFLOW)
T(RD, 0x1.fffff8p-127, 0x1.fffff4p-127, -0x1p+0, INEXACT|UNDERFLOW)
T(RD, 0x1.fffffcp-127, 0x1.fffff8p-127, -0x1p+0, INEXACT|UNDERFLOW)
T(RD, -0x1p-149, -0x1p-149, 0x0p+0, INEXACT|UNDERFLOW)
T(RD, -0x1p-148, -0x1p-148, 0x0p+0, INEXACT|UNDERFLOW)
T(RD, -0x1.2p-146, -0x1.2p-146, 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, 0x1.8p-27, 0x1.7ffffep-27, -0x1p+0, INEXACT)
T(RD, 0x1p-12, 0x1.fffffep-13, -0x1.555556p-1, INEXACT)
T(RD, -0x1.8p-27, -0x1.8p-27, -0x1.2p-31, INEXACT)
T(RD, -0x1p-12, -0x1p-12, -0x1.555556p-3, 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, 0x1.fffff6p-126, 0x1.fffff6p-126, 0x0p+0, INEXACT)
T(RN, 0x1p-125, 0x1p-125, 0x0p+0, INEXACT)
T(RN, 0x1.000006p-125, 0x1.000006p-125, 0x0p+0, INEXACT)
T(RN, 0x1p-124, 0x1p-124, 0x0p+0, INEXACT)
T(RN, 0x1.8p-27, 0x1.8p-27, 0x1.2p-31, INEXACT)
T(RN, 0x1p-12, 0x1p-12, 0x1.555554p-3, 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,-0x1.fffff6p-126,-0x1.fffff6p-126, 0x0p+0, INEXACT)
T(RN, -0x1p-125, -0x1p-125, 0x0p+0, INEXACT)
T(RN,-0x1.000006p-125,-0x1.000006p-125, 0x0p+0, INEXACT)
T(RN, -0x1p-124, -0x1p-124, 0x0p+0, INEXACT)
T(RN, -0x1.8p-27, -0x1.8p-27, -0x1.2p-31, INEXACT)
T(RN, -0x1p-12, -0x1p-12, -0x1.555554p-3, INEXACT)
T(RN, 0x1p-149, 0x1p-149, 0x0p+0, INEXACT|UNDERFLOW)
T(RN, 0x1p-148, 0x1p-148, 0x0p+0, INEXACT|UNDERFLOW)
T(RN, 0x1.2p-146, 0x1.2p-146, 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, -0x1.2p-146, -0x1.2p-146, 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(RU, 0x1.000002p-126, 0x1.000002p-126, 0x0p+0, INEXACT)
T(RU, 0x1.000004p-126, 0x1.000004p-126, 0x0p+0, INEXACT)
T(RU, 0x1.fffff6p-126, 0x1.fffff6p-126, 0x0p+0, INEXACT)
T(RU, 0x1p-125, 0x1p-125, 0x0p+0, INEXACT)
T(RU, 0x1.000006p-125, 0x1.000006p-125, 0x0p+0, INEXACT)
T(RU, 0x1p-124, 0x1p-124, 0x0p+0, INEXACT)
T(RU,-0x1.000002p-126, -0x1p-126, 0x1p+0, INEXACT)
T(RU,-0x1.000004p-126,-0x1.000002p-126, 0x1p+0, INEXACT)
T(RU, -0x1p-125,-0x1.fffffep-126, 0x1p+0, INEXACT)
T(RU, -0x1p-124,-0x1.fffffep-125, 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, 0x1.2p-146, 0x1.2p-146, 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-149, -0x0p+0, 0x1p+0, INEXACT|UNDERFLOW)
T(RU, -0x1p-148, -0x1p-149, 0x1p+0, INEXACT|UNDERFLOW)
T(RU, -0x1p-128, -0x1.fffffp-129, 0x1p+0, INEXACT|UNDERFLOW)
T(RU, -0x1p-127,-0x1.fffff8p-128, 0x1p+0, INEXACT|UNDERFLOW)
T(RU,-0x1.fffff8p-127,-0x1.fffff4p-127, 0x1p+0, INEXACT|UNDERFLOW)
T(RU,-0x1.fffffcp-127,-0x1.fffff8p-127, 0x1p+0, INEXACT|UNDERFLOW)
T(RU, 0x1.8p-27, 0x1.8p-27, 0x1.2p-31, INEXACT)
T(RU, 0x1p-12, 0x1p-12, 0x1.555556p-3, INEXACT)
T(RU, -0x1.8p-27, -0x1.7ffffep-27, 0x1p+0, INEXACT)
T(RU, -0x1p-12, -0x1.fffffep-13, 0x1.555556p-1, INEXACT)
T(RZ, 0x1.000002p-126, 0x1p-126, -0x1.fffffep-1, INEXACT)
T(RZ, 0x1.000004p-126, 0x1.000002p-126, -0x1.fffffep-1, INEXACT)
T(RZ, 0x1p-125, 0x1.fffffep-126, -0x1.fffffep-1, INEXACT)
T(RZ, 0x1p-124, 0x1.fffffep-125, -0x1.fffffep-1, INEXACT)
T(RZ,-0x1.000002p-126, -0x1p-126, 0x1.fffffep-1, INEXACT)
T(RZ,-0x1.000004p-126,-0x1.000002p-126, 0x1.fffffep-1, INEXACT)
T(RZ, -0x1p-125,-0x1.fffffep-126, 0x1.fffffep-1, INEXACT)
T(RZ, -0x1p-124,-0x1.fffffep-125, 0x1.fffffep-1, INEXACT)
T(RZ, 0x1p-149, 0x0p+0, -0x1p+0, INEXACT|UNDERFLOW)
T(RZ, 0x1p-148, 0x1p-149, -0x1p+0, INEXACT|UNDERFLOW)
T(RZ, 0x1p-128, 0x1.fffffp-129, -0x1.fffffep-1, INEXACT|UNDERFLOW)
T(RZ, 0x1p-127, 0x1.fffff8p-128, -0x1.fffffep-1, INEXACT|UNDERFLOW)
T(RZ, 0x1.fffff8p-127, 0x1.fffff4p-127, -0x1.fffffep-1, INEXACT|UNDERFLOW)
T(RZ, 0x1.fffffcp-127, 0x1.fffff8p-127, -0x1.fffffep-1, INEXACT|UNDERFLOW)
T(RZ, -0x1p-149, -0x0p+0, 0x1p+0, INEXACT|UNDERFLOW)
T(RZ, -0x1p-148, -0x1p-149, 0x1p+0, INEXACT|UNDERFLOW)
T(RZ, -0x1p-128, -0x1.fffffp-129, 0x1.fffffep-1, INEXACT|UNDERFLOW)
T(RZ, -0x1p-127,-0x1.fffff8p-128, 0x1.fffffep-1, INEXACT|UNDERFLOW)
T(RZ,-0x1.fffff8p-127,-0x1.fffff4p-127, 0x1.fffffep-1, INEXACT|UNDERFLOW)
T(RZ,-0x1.fffffcp-127,-0x1.fffff8p-127, 0x1.fffffep-1, INEXACT|UNDERFLOW)
T(RZ, 0x1.8p-27, 0x1.7ffffep-27, -0x1.fffffep-1, INEXACT)
T(RZ, 0x1p-12, 0x1.fffffep-13, -0x1.555554p-1, INEXACT)
T(RZ, -0x1.8p-27, -0x1.7ffffep-27, 0x1.fffffep-1, INEXACT)
T(RZ, -0x1p-12, -0x1.fffffep-13, 0x1.555554p-1, INEXACT)