| @@ -18,29 +18,30 @@ | | | @@ -18,29 +18,30 @@ |
18 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | 18 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
19 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | 19 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
20 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 20 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
21 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 21 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
22 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 22 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
23 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 23 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
24 | * SUCH DAMAGE. | | 24 | * SUCH DAMAGE. |
25 | */ | | 25 | */ |
26 | | | 26 | |
27 | #include <sys/cdefs.h> | | 27 | #include <sys/cdefs.h> |
28 | #if 0 | | 28 | #if 0 |
29 | __FBSDID("$FreeBSD: head/lib/msun/src/s_csqrtl.c 181402 2008-08-08 00:15:16Z das $"); | | 29 | __FBSDID("$FreeBSD: head/lib/msun/src/s_csqrtl.c 181402 2008-08-08 00:15:16Z das $"); |
30 | #else | | 30 | #else |
31 | __RCSID("$NetBSD: csqrtl.c,v 1.1 2014/10/10 00:48:18 christos Exp $"); | | 31 | __RCSID("$NetBSD: csqrtl.c,v 1.2 2014/10/11 00:43:51 christos Exp $"); |
32 | #endif | | 32 | #endif |
33 | | | 33 | |
| | | 34 | #include "../src/namespace.h" |
34 | #include <complex.h> | | 35 | #include <complex.h> |
35 | #include <float.h> | | 36 | #include <float.h> |
36 | #include <math.h> | | 37 | #include <math.h> |
37 | #include <stdbool.h> | | 38 | #include <stdbool.h> |
38 | | | 39 | |
39 | /* | | 40 | /* |
40 | * gcc doesn't implement complex multiplication or division correctly, | | 41 | * gcc doesn't implement complex multiplication or division correctly, |
41 | * so we need to handle infinities specially. We turn on this pragma to | | 42 | * so we need to handle infinities specially. We turn on this pragma to |
42 | * notify conforming c99 compilers that the fast-but-incorrect code that | | 43 | * notify conforming c99 compilers that the fast-but-incorrect code that |
43 | * gcc generates is acceptable, since the special cases have already been | | 44 | * gcc generates is acceptable, since the special cases have already been |
44 | * handled. | | 45 | * handled. |
45 | */ | | 46 | */ |
46 | // #pragma STDC CX_LIMITED_RANGE ON | | 47 | // #pragma STDC CX_LIMITED_RANGE ON |