You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/math/base/special/pow/src/main.c
+21-9
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,20 @@
14
14
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
15
* See the License for the specific language governing permissions and
16
16
* limitations under the License.
17
+
*
18
+
*
19
+
* ## Notice
20
+
*
21
+
* The following copyright and license were part of the original implementation available as part of [FreeBSD]{@link https://svnweb.freebsd.org/base/release/9.3.0/lib/msun/src/s_pow.c}. The implementation follows the original, but has been modified for JavaScript.
22
+
*
23
+
* ```text
24
+
* Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.
25
+
*
26
+
* Developed at SunPro, a Sun Microsystems, Inc. business.
27
+
* Permission to use, copy, modify, and distribute this
28
+
* software is freely granted, provided that this notice
k= ( ( i >> HIGH_NUM_SIGNIFICAND_BITS ) -STDLIB_CONSTANT_FLOAT64_EXPONENT_BIAS );
331
+
k= ( ( i >> STDLIB_CONSTANT_FLOAT64_NUM_HIGH_WORD_SIGNIFICAND_BITS ) -STDLIB_CONSTANT_FLOAT64_EXPONENT_BIAS );
320
332
n=0;
321
333
nc= (int32_t)n;
322
334
323
335
// `|z| > 0.5`, set `n = z+0.5`
324
336
if ( i>HIGH_BIASED_EXP_NEG_1 ) {
325
337
n= ( j+ ( HIGH_MIN_NORMAL_EXP >> ( k+1 ) ) );
326
-
k= ( ( ( n&STDLIB_CONSTANT_FLOAT64_HIGH_WORD_ABS_MASK ) >> HIGH_NUM_SIGNIFICAND_BITS ) -STDLIB_CONSTANT_FLOAT64_EXPONENT_BIAS ); // new k for n
338
+
k= ( ( ( n&STDLIB_CONSTANT_FLOAT64_HIGH_WORD_ABS_MASK ) >> STDLIB_CONSTANT_FLOAT64_NUM_HIGH_WORD_SIGNIFICAND_BITS ) -STDLIB_CONSTANT_FLOAT64_EXPONENT_BIAS ); // new k for n
0 commit comments