Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(666)

Side by Side Diff: fusl/src/math/exp2l.c

Issue 1706293003: [fusl] Remove some more tabs (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: apptest rebase Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fusl/src/malloc/malloc.c ('k') | fusl/src/math/tgamma.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* origin: FreeBSD /usr/src/lib/msun/ld80/s_exp2l.c and 1 /* origin: FreeBSD /usr/src/lib/msun/ld80/s_exp2l.c and
2 * /usr/src/lib/msun/ld128/s_exp2l.c */ 2 * /usr/src/lib/msun/ld128/s_exp2l.c */
3 /*- 3 /*-
4 * Copyright (c) 2005-2008 David Schultz <das@FreeBSD.ORG> 4 * Copyright (c) 2005-2008 David Schultz <das@FreeBSD.ORG>
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 * a degree-10 minimax polynomial with maximum error under 2**-120. 516 * a degree-10 minimax polynomial with maximum error under 2**-120.
517 * The values in exp2t[] and eps[] are chosen such that 517 * The values in exp2t[] and eps[] are chosen such that
518 * exp2t[i] = exp2(i/TBLSIZE + eps[i]), and eps[i] is a small offset such 518 * exp2t[i] = exp2(i/TBLSIZE + eps[i]), and eps[i] is a small offset such
519 * that exp2t[i] is accurate to 2**-122. 519 * that exp2t[i] is accurate to 2**-122.
520 * 520 *
521 * Note that the range of i is +-TBLSIZE/2, so we actually index the tables 521 * Note that the range of i is +-TBLSIZE/2, so we actually index the tables
522 * by i0 = i + TBLSIZE/2. 522 * by i0 = i + TBLSIZE/2.
523 * 523 *
524 * This method is due to Gal, with many details due to Gal and Bachelis: 524 * This method is due to Gal, with many details due to Gal and Bachelis:
525 * 525 *
526 *» Gal, S. and Bachelis, B. An Accurate Elementary Mathematical Library 526 * Gal, S. and Bachelis, B. An Accurate Elementary Mathematical Library
527 *» for the IEEE Floating Point Standard. TOMS 17(1), 26-46 (1991). 527 * for the IEEE Floating Point Standard. TOMS 17(1), 26-46 (1991).
528 */ 528 */
529 long double exp2l(long double x) { 529 long double exp2l(long double x) {
530 union ldshape u = {x}; 530 union ldshape u = {x};
531 int e = u.i.se & 0x7fff; 531 int e = u.i.se & 0x7fff;
532 long double r, z, t; 532 long double r, z, t;
533 uint32_t i0; 533 uint32_t i0;
534 union { 534 union {
535 uint32_t u; 535 uint32_t u;
536 int32_t i; 536 int32_t i;
537 } k; 537 } k;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 z * (P3 + 583 z * (P3 +
584 z * (P4 + 584 z * (P4 +
585 z * (P5 + 585 z * (P5 +
586 z * (P6 + 586 z * (P6 +
587 z * (P7 + 587 z * (P7 +
588 z * (P8 + z * (P9 + z * P10))))))))); 588 z * (P8 + z * (P9 + z * P10)))))))));
589 589
590 return scalbnl(r, k.i); 590 return scalbnl(r, k.i);
591 } 591 }
592 #endif 592 #endif
OLDNEW
« no previous file with comments | « fusl/src/malloc/malloc.c ('k') | fusl/src/math/tgamma.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698