|
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 | | -'use strict'; |
20 | | - |
21 | | -/* |
22 | | -* The original C code, long comment, copyright, license, and constants are from [Cephes]{@link http://www.netlib.org/cephes/cmath.tgz}. |
23 | 17 | * |
24 | | -* The implementation follows the original, but has been modified for JavaScript. |
25 | | -*/ |
26 | | - |
27 | | -/* |
28 | | -* COPYRIGHT |
29 | 18 | * |
30 | | -* Cephes Math Library Release 2.8: June, 2000 |
31 | | -* Copyright 1984, 1987, 1989, 1992, 2000 by Stephen L. Moshier |
| 19 | +* ## Notice |
32 | 20 | * |
| 21 | +* The original C code, long comment, copyright, license, and constants are from [Cephes]{@link http://www.netlib.org/cephes}. The implementation follows the original, but has been modified for JavaScript. |
33 | 22 | * |
34 | | -* LICENSE |
| 23 | +* ```text |
| 24 | +* Copyright 1985, 1995, 2000 by Stephen L. Moshier |
35 | 25 | * |
36 | | -* The README [file]{@link http://netlib.sandia.gov/cephes/} reads: |
37 | | -* > Some software in this archive may be from the book _Methods and Programs for Mathematical Functions_ (Prentice-Hall or Simon & Schuster International, 1989) or from the Cephes Mathematical Library, a commercial product. In either event, it is copyrighted by the author. What you see here may be used freely but it comes with no support or guarantee. |
38 | | -* > The two known misprints in the book are repaired here in the source listings for the gamma function and the incomplete beta integral. |
39 | | -* > Stephen L. Moshier |
40 | | -* > moshier@na-net.ornl.gov |
| 26 | +* Some software in this archive may be from the book _Methods and Programs for Mathematical Functions_ (Prentice-Hall or Simon & Schuster International, 1989) or from the Cephes Mathematical Library, a commercial product. In either event, it is copyrighted by the author. What you see here may be used freely but it comes with no support or guarantee. |
| 27 | +* |
| 28 | +* Stephen L. Moshier |
| 29 | +* moshier@na-net.ornl.gov |
| 30 | +* ``` |
41 | 31 | */ |
42 | 32 |
|
| 33 | +'use strict'; |
| 34 | + |
43 | 35 | // MODULES // |
44 | 36 |
|
45 | 37 | var evalpoly = require( '@stdlib/math/base/tools/evalpoly' ).factory; // TODO: replace with compiled polyval functions |
@@ -91,12 +83,15 @@ var polyvalCOS = evalpoly( COS_COEF ); |
91 | 83 | * @example |
92 | 84 | * var v = cos( 0.0 ); |
93 | 85 | * // returns 1.0 |
| 86 | +* |
94 | 87 | * @example |
95 | | -* var v = cos( Math.PI/4.0 ); |
| 88 | +* var v = cos( 3.14/4.0 ); |
96 | 89 | * // returns ~0.707 |
| 90 | +* |
97 | 91 | * @example |
98 | | -* var v = cos( -Math.PI/6.0 ); |
| 92 | +* var v = cos( -3.14/6.0 ); |
99 | 93 | * // returns ~0.866 |
| 94 | +* |
100 | 95 | * @example |
101 | 96 | * var v = cos( NaN ); |
102 | 97 | * // returns NaN |
|
0 commit comments