/* 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. */ /* atan2s(+-0,+anything but nan) is +-0 */ atan2s n eq - 0 0 0 atan2s n eq - 0 1 0 atan2s n eq - 0 00100000 0 atan2s n eq - 0 7f7fffff 0 atan2s n eq - 0 7f800000 0 atan2s n eq - 80000000 0 80000000 atan2s n eq - 80000000 1 80000000 atan2s n eq - 80000000 00100000 80000000 atan2s n eq - 80000000 7f7fffff 80000000 atan2s n eq - 80000000 7f800000 80000000 /* atan2s(+-0,-anything but nan) is +-pi */ atan2s n eq ?x 0 ff800000 40490fdb atan2s n eq ?x 0 ff7fffff 40490fdb atan2s n eq ?x 0 80100000 40490fdb atan2s n eq ?x 0 80000001 40490fdb atan2s n eq ?x 0 80000000 40490fdb atan2s n eq ?x 80000000 ff800000 c0490fdb atan2s n eq ?x 80000000 ff7fffff c0490fdb atan2s n eq ?x 80000000 80100000 c0490fdb atan2s n eq ?x 80000000 80000001 c0490fdb atan2s n eq ?x 80000000 80000000 c0490fdb /* atan2s(+-anything but 0 and nan, 0) is +- pi/2 */ atan2s n eq ?x 7f800000 0 3fc90fdb atan2s n eq ?x 7f800000 80000000 3fc90fdb atan2s n eq ?x 7f7fffff 0 3fc90fdb atan2s n eq ?x 7f7fffff 80000000 3fc90fdb atan2s n eq ?x 00800000 0 3fc90fdb atan2s n eq ?x 00800000 80000000 3fc90fdb atan2s n eq ?x 1 0 3fc90fdb atan2s n eq ?x 1 80000000 3fc90fdb atan2s n eq ?x ff800000 0 bfc90fdb atan2s n eq ?x ff800000 80000000 bfc90fdb atan2s n eq ?x ff7fffff 0 bfc90fdb atan2s n eq ?x ff7fffff 80000000 bfc90fdb atan2s n eq ?x 80800000 0 bfc90fdb atan2s n eq ?x 80800000 80000000 bfc90fdb atan2s n eq ?x 80000001 0 bfc90fdb atan2s n eq ?x 80000001 80000000 bfc90fdb /* atan2s(big,small) :=: +-pi/2 */ atan2s n vn x 7f7fffff 00800000 3fc90fdb atan2s n vn x 7f7fffff 80800000 3fc90fdb atan2s n vn x ff7fffff 00800000 bfc90fdb atan2s n vn x ff7fffff 80800000 bfc90fdb atan2s z vn x 7f7fffff 00800000 3fc90fdb atan2s z vn x 7f7fffff 80800000 3fc90fdb atan2s z vn x ff7fffff 00800000 bfc90fdb atan2s z vn x ff7fffff 80800000 bfc90fdb atan2s p vn x 7f7fffff 00800000 3fc90fdb atan2s p vn x 7f7fffff 80800000 3fc90fdb atan2s p vn x ff7fffff 00800000 bfc90fdb atan2s p vn x ff7fffff 80800000 bfc90fdb atan2s m vn x 7f7fffff 00800000 3fc90fdb atan2s m vn x 7f7fffff 80800000 3fc90fdb atan2s m vn x ff7fffff 00800000 bfc90fdb atan2s m vn x ff7fffff 80800000 bfc90fdb /* atan2s(small,big) = small/big (big>0) else sign(small)(pi - |small/big|) */ atan2s n eq ux 00800000 7f7fffff 0 atan2s n eq ux 80800000 7f7fffff 80000000 atan2s n vn x 00800000 ff7fffff 40490fdb atan2s n vn x 80800000 ff7fffff c0490fdb atan2s z eq ux 00800000 7f7fffff 0 atan2s z eq ux 80800000 7f7fffff 80000000 atan2s z vn x 00800000 ff7fffff 40490fdb atan2s z vn x 80800000 ff7fffff c0490fdb atan2s p vn ux 00800000 7f7fffff 0 atan2s p vn ux 80800000 7f7fffff 80000000 atan2s p vn x 00800000 ff7fffff 40490fdb atan2s p vn x 80800000 ff7fffff c0490fdb atan2s m vn ux 00800000 7f7fffff 0 atan2s m vn ux 80800000 7f7fffff 80000000 atan2s m vn x 00800000 ff7fffff 40490fdb atan2s m vn x 80800000 ff7fffff c0490fdb /* atan2s(+-x,+x) = +-pi/4 for normal x */ atan2s n eq x 00800000 00800000 3f490fdb atan2s n eq x 80800000 00800000 bf490fdb atan2s n eq x 7f7fffff 7f7fffff 3f490fdb atan2s n eq x ff7fffff 7f7fffff bf490fdb /* atan2s(+-x,-x) = +-3pi/4 for normal x */ atan2s n eq x 00800000 80800000 4016cbe4 atan2s n eq x 80800000 80800000 c016cbe4 atan2s n eq x 3f800000 bf800000 4016cbe4 atan2s n eq x bf800000 bf800000 c016cbe4 atan2s n eq x 7f7fffff ff7fffff 4016cbe4 atan2s n eq x ff7fffff ff7fffff c016cbe4 /* random arguments between -2.0 and 2.0 */ atan2s n vn x bf099426 3fb65470 beb8b690 atan2s n vn x 3fe16530 bfaaf890 400e1037 atan2s n vn x bf0ab3cf bda0f099 bfdb7fa2 atan2s n vn x 3f940d87 3fdae71a 3f183c4e atan2s n vn x beac1a41 bff54112 c03df284 atan2s n vn x bf5570c0 3dbd4ed1 bfbaedbe atan2s n vn x bfc22800 3fb65191 bf511bd9 atan2s n vn x bfff04df bfffb63f c016e21e atan2s n vn x bf692641 3f94db41 bf2a1451 atan2s n vn x 3f12f53f 3f7ccacc 3f06ce4b /* atan2s involve nan */ atan2s n uo v 0 7f800001 0 atan2s n uo - 3f800000 ffc00000 0 atan2s n uo v 7f800001 00000001 0 atan2s n uo - 7fc00000 ff7fffff 0 atan2s n uo v 7fc00000 ff800001 0 atan2s n uo - ffc00000 ffc00000 0 atan2s z uo v 0 7f800001 0 atan2s z uo - 3f800000 ffc00000 0 atan2s z uo v 7f800001 00000001 0 atan2s z uo - 7fc00000 ff7fffff 0 atan2s z uo v 7fc00000 ff800001 0 atan2s z uo - ffc00000 ffc00000 0 atan2s p uo v 0 7f800001 0 atan2s p uo - 3f800000 ffc00000 0 atan2s p uo v 7f800001 00000001 0 atan2s p uo - 7fc00000 ff7fffff 0 atan2s p uo v 7fc00000 ff800001 0 atan2s p uo - ffc00000 ffc00000 0 atan2s m uo v 0 7f800001 0 atan2s m uo - 3f800000 ffc00000 0 atan2s m uo v 7f800001 00000001 0 atan2s m uo - 7fc00000 ff7fffff 0 atan2s m uo v 7fc00000 ff800001 0 atan2s m uo - ffc00000 ffc00000 0 /* atan2s(+-(anything but inf and nan), +inf) is +-0 */ atan2s n eq - 0 7f800000 0 atan2s n eq - 1 7f800000 0 atan2s n eq - 7f7fffff 7f800000 0 atan2s n eq - 80000000 7f800000 80000000 atan2s n eq - 80000001 7f800000 80000000 atan2s n eq - ff7fffff 7f800000 80000000 /* atan2s(+-(anything but inf and nan), -inf) is +-pi */ atan2s n eq ?x 0 ff800000 40490fdb atan2s n eq ?x 1 ff800000 40490fdb atan2s n eq ?x 7f7fffff ff800000 40490fdb atan2s n eq ?x 80000000 ff800000 c0490fdb atan2s n eq ?x 80000001 ff800000 c0490fdb atan2s n eq ?x ff7fffff ff800000 c0490fdb /* atan2s(+-inf,+inf ) is +-pi/4 */ atan2s n eq ?x 7f800000 7f800000 3f490fdb atan2s n eq ?x ff800000 7f800000 bf490fdb /* atan2s(+-inf,-inf ) is +-3pi/4 */ atan2s n eq ?x 7f800000 ff800000 4016cbe4 atan2s n eq ?x ff800000 ff800000 c016cbe4 /* atan2s(+-inf, (anything but,0,nan, and inf)) is +-pi/2 */ atan2s n eq ?x 7f800000 1 3fc90fdb atan2s n eq ?x 7f800000 80000001 3fc90fdb atan2s n eq ?x 7f800000 7f7fffff 3fc90fdb atan2s n eq ?x 7f800000 ff7fffff 3fc90fdb atan2s n eq ?x ff800000 1 bfc90fdb atan2s n eq ?x ff800000 80000001 bfc90fdb atan2s n eq ?x ff800000 7f7fffff bfc90fdb atan2s n eq ?x ff800000 ff7fffff bfc90fdb atan2s m uo - 3f800000 ffc00000 00000000 atan2s m uo - 7fc00000 ff7fffff 00000000 atan2s m uo - ffc00000 ffc00000 00000000 atan2s m uo v 00000000 7f800001 00000000 atan2s m uo v 7f800001 00000001 00000000 atan2s m uo v 7fc00000 ff800001 00000000 atan2s m vn x 00800000 ff7fffff 40490fdb atan2s m vn x 80800000 ff7fffff c0490fdb atan2s m vn xu 00800000 7f7fffff 00000000 atan2s m vn xu 80800000 7f7fffff 80000000 atan2s n eq xu 00800000 7f7fffff 00000000 atan2s n eq xu 80800000 7f7fffff 80000000 atan2s n uo - 3f800000 ffc00000 00000000 atan2s n uo - 7fc00000 ff7fffff 00000000 atan2s n uo - ffc00000 ffc00000 00000000 atan2s n uo v 00000000 7f800001 00000000 atan2s n uo v 7f800001 00000001 00000000 atan2s n uo v 7fc00000 ff800001 00000000 atan2s n vn x 00800000 ff7fffff 40490fdb atan2s n vn x 80800000 ff7fffff c0490fdb atan2s p uo - 3f800000 ffc00000 00000000 atan2s p uo - 7fc00000 ff7fffff 00000000 atan2s p uo - ffc00000 ffc00000 00000000 atan2s p uo v 00000000 7f800001 00000000 atan2s p uo v 7f800001 00000001 00000000 atan2s p uo v 7fc00000 ff800001 00000000 atan2s p vn x 00800000 ff7fffff 40490fdb atan2s p vn x 80800000 ff7fffff c0490fdb atan2s p vn xu 00800000 7f7fffff 00000000 atan2s p vn xu 80800000 7f7fffff 80000000 atan2s z eq xu 00800000 7f7fffff 00000000 atan2s z eq xu 80800000 7f7fffff 80000000 atan2s z uo - 3f800000 ffc00000 00000000 atan2s z uo - 7fc00000 ff7fffff 00000000 atan2s z uo - ffc00000 ffc00000 00000000 atan2s z uo v 00000000 7f800001 00000000 atan2s z uo v 7f800001 00000001 00000000 atan2s z uo v 7fc00000 ff800001 00000000 atan2s z vn x 00800000 ff7fffff 40490fdb atan2s z vn x 80800000 ff7fffff c0490fdb