Lines Matching +full:rx +full:- +full:threshold
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2007-2008 David Schultz <das@FreeBSD.ORG>
36 * Several thresholds require a 15-bit exponent and also the usual bias.
37 * s_logl.c and e_hypotl have less hard-coding but end up requiring the
46 * The precise threshold is nontrivial to determine and spell, so use a
47 * lower threshold of approximaely LDBL_MAX / 4, and don't use LDBL_MAX
48 * to spell this since LDBL_MAX is broken on i386 (it overflows in 53-bit
57 long double a, b, rx, ry, scale, t; in csqrtl() local
68 t = (b - b) / (b - b); /* raise invalid if b is not a NaN */ in csqrtl()
75 * csqrt(-inf + NaN i) = NaN +- inf i in csqrtl()
76 * csqrt(-inf + y i) = 0 + inf i in csqrtl()
79 return (CMPLXL(fabsl(b - b), copysignl(a, b))); in csqrtl()
81 return (CMPLXL(a, copysignl(b - b, b))); in csqrtl()
84 t = (a - a) / (a - a); /* raise invalid */ in csqrtl()
95 if (fabsl(a) >= 0x1p-16380L) in csqrtl()
97 if (fabsl(b) >= 0x1p-16380L) in csqrtl()
105 if (fabsl(a) < 0x1p-16382L && fabsl(b) < 0x1p-16382L) { in csqrtl()
108 scale = 0x1p-32; in csqrtl()
114 rx = scale * t; in csqrtl()
117 t = sqrtl((-a + hypotl(a, b)) * 0.5); in csqrtl()
118 rx = scale * fabsl(b) / (2 * t); in csqrtl()
122 return (CMPLXL(rx, ry)); in csqrtl()