]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/mips/mips64/e_sqrtl.c
Update copyright dates with scripts/update-copyrights
[thirdparty/glibc.git] / sysdeps / mips / mips64 / e_sqrtl.c
CommitLineData
384fa30d 1/* long double square root in software floating-point emulation.
dff8da6b 2 Copyright (C) 1997-2024 Free Software Foundation, Inc.
384fa30d 3 This file is part of the GNU C Library.
384fa30d
DJ
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
ab84e3ff 16 License along with the GNU C Library. If not, see
5a82c748 17 <https://www.gnu.org/licenses/>. */
384fa30d
DJ
18
19#include <stdlib.h>
20#include <soft-fp.h>
21#include <quad.h>
220622dd 22#include <libm-alias-finite.h>
384fa30d
DJ
23
24long double
25__ieee754_sqrtl (const long double a)
26{
27 FP_DECL_EX;
28 FP_DECL_Q(A); FP_DECL_Q(C);
29 long double c;
30
31 FP_INIT_ROUNDMODE;
32 FP_UNPACK_Q(A, a);
33 FP_SQRT_Q(C, A);
34 FP_PACK_Q(c, C);
35 FP_HANDLE_EXCEPTIONS;
36 return c;
37}
220622dd 38libm_alias_finite (__ieee754_sqrtl, __sqrtl)