// ## cp_fatan-cbe-spu.c (C99) // ## Version 1.0 // ## // ## Copyright (c) 2006 Mike Acton // ## // ## SIGNIFICANT REFERENCES: // ## // ## [1] Cephes Math Library Release 2.8: June, 2000 // ## Copyright 1984, 1995, 2000, Stephen L. Moshier // ## [2] Numerical Computation Guide (PDF) // ## Copyright 2000, Sun Microsystems, Inc. // ## [3] IEEE 754 Support in C99 (PDF) // ## Copyright 2001, Jim Thomas // ## [4] Solaris 10 Reference Manual : atan2(3M) // ## Copyright 1994-2005, Sun Microsystems, Inc. // ## // ## Permission is hereby granted, free of charge, to any person obtaining // ## a copy of this software and associated documentation files // ## (the "Software"), to deal in the Software without restriction, including // ## without limitation the rights to use, copy, modify, merge, publish, // ## distribute, sublicense, and/or sell copies of the Software, and to permit // ## persons to whom the Software is furnished to do so, subject to the // ## following conditions: // ## // ## The above copyright notice and this permission notice shall be included // ## in all copies or substantial portions of the Software. // ## // ## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // ## OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // ## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // ## AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // ## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // ## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // ## THE SOFTWARE. // ## // Loading these contants from (global) SPU local memory is going to be a win over building them // or storing them locally near the function. const vector unsigned int _cp_f_pio4 = {+0x3F490FDA,+0x3F490FDA,+0x3F490FDA,+0x3F490FDA}; const vector unsigned int _cp_f_t3p8 = {+0x401A8279,+0x401A8279,+0x401A8279,+0x401A8279}; const vector unsigned int _cp_f_npio2 = {-0x4036F026,-0x4036F026,-0x4036F026,-0x4036F026}; const vector unsigned int _cp_f_pio2 = {+0x3FC90FDA,+0x3FC90FDA,+0x3FC90FDA,+0x3FC90FDA}; const vector unsigned int _cp_f_pt66 = {+0x3F28F5C2,+0x3F28F5C2,+0x3F28F5C2,+0x3F28F5C2}; const vector unsigned int _cp_f_pi = {+0x40490fda,+0x40490fda,+0x40490fda,+0x40490fda}; const vector unsigned int _cp_f_npi = {-0x3fb6f026,-0x3fb6f026,-0x3fb6f026,-0x3fb6f026}; const vector unsigned int _cp_f_atan_q4 = {+0x43428CF7,+0x43428CF7,+0x43428CF7,+0x43428CF7}; const vector unsigned int _cp_f_atan_q3 = {+0x43F2B1F8,+0x43F2B1F8,+0x43F2B1F8,+0x43F2B1F8}; const vector unsigned int _cp_f_atan_q2 = {+0x43D870C6,+0x43D870C6,+0x43D870C6,+0x43D870C6}; const vector unsigned int _cp_f_atan_q1 = {+0x432506EA,+0x432506EA,+0x432506EA,+0x432506EA}; const vector unsigned int _cp_f_atan_q0 = {+0x41C6DE22,+0x41C6DE22,+0x41C6DE22,+0x41C6DE22}; const vector unsigned int _cp_f_atan_p4 = {-0x3D7E4CB1,-0x3D7E4CB1,-0x3D7E4CB1,-0x3D7E4CB1}; const vector unsigned int _cp_f_atan_p3 = {-0x3D0A3A07,-0x3D0A3A07,-0x3D0A3A07,-0x3D0A3A07}; const vector unsigned int _cp_f_atan_p2 = {-0x3D69FB9F,-0x3D69FB9F,-0x3D69FB9F,-0x3D69FB9F}; const vector unsigned int _cp_f_atan_p1 = {-0x3E7EBD5E,-0x3E7EBD5E,-0x3E7EBD5E,-0x3E7EBD5E}; const vector unsigned int _cp_f_atan_p0 = {-0x409FFC03,-0x409FFC03,-0x409FFC03,-0x409FFC03}; const vector unsigned int _cp_f_hmorebits = {+0x240D3131,+0x240D3131,+0x240D3131,+0x240D3131}; const vector unsigned int _cp_f_morebits = {+0x248D3131,+0x248D3131,+0x248D3131,+0x248D3131};