README.md (3403B)
1 <!-- 2 3 @license Apache-2.0 4 5 Copyright (c) 2019 The Stdlib Authors. 6 7 Licensed under the Apache License, Version 2.0 (the "License"); 8 you may not use this file except in compliance with the License. 9 You may obtain a copy of the License at 10 11 http://www.apache.org/licenses/LICENSE-2.0 12 13 Unless required by applicable law or agreed to in writing, software 14 distributed under the License is distributed on an "AS IS" BASIS, 15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 See the License for the specific language governing permissions and 17 limitations under the License. 18 19 --> 20 21 # ellipe 22 23 > Compute the [complete elliptic integral of the second kind][elliptic-integral]. 24 25 <section class="intro"> 26 27 The [complete elliptic integral of the second kind][elliptic-integral] is defined as 28 29 <!-- <equation class="equation" label="eq:complete_elliptic_integral_second_kind" align="center" raw="E(m)=\int_0^{\pi/2} \sqrt{1 - m (\sin\theta)^2} d\theta" alt="Complete elliptic integral of the second kind."> --> 30 31 <div class="equation" align="center" data-raw-text="E(m)=\int_0^{\pi/2} \sqrt{1 - m (\sin\theta)^2} d\theta" data-equation="eq:complete_elliptic_integral_second_kind"> 32 <img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@129e5a32ce2af2ed694daf2e9d4214255e60c42a/lib/node_modules/@stdlib/math/base/special/ellipe/docs/img/equation_complete_elliptic_integral_second_kind.svg" alt="Complete elliptic integral of the second kind."> 33 <br> 34 </div> 35 36 <!-- </equation> --> 37 38 where the parameter `m` is related to the modulus `k` by `m = k^2`. 39 40 </section> 41 42 <!-- /.intro --> 43 44 <section class="usage"> 45 46 ## Usage 47 48 ```javascript 49 var ellipe = require( '@stdlib/math/base/special/ellipe' ); 50 ``` 51 52 #### ellipe( m ) 53 54 Computes the [complete elliptic integral of the second kind][elliptic-integral]. 55 56 ```javascript 57 var v = ellipe( 0.5 ); 58 // returns ~1.351 59 60 v = ellipe( -1.0 ); 61 // returns ~1.910 62 63 v = ellipe( 2.0 ); 64 // returns NaN 65 66 v = ellipe( Infinity ); 67 // returns NaN 68 69 v = ellipe( -Infinity ); 70 // returns NaN 71 72 v = ellipe( NaN ); 73 // returns NaN 74 ``` 75 76 </section> 77 78 <!-- /.usage --> 79 80 <section class="notes"> 81 82 ## Notes 83 84 - This function is valid for `-∞ < m <= 1`. 85 86 </section> 87 88 <!-- /.notes --> 89 90 <section class="examples"> 91 92 ## Examples 93 94 <!-- eslint no-undef: "error" --> 95 96 ```javascript 97 var randu = require( '@stdlib/random/base/randu' ); 98 var ellipe = require( '@stdlib/math/base/special/ellipe' ); 99 100 var m; 101 var i; 102 103 for ( i = 0; i < 100; i++ ) { 104 m = -1.0 + ( randu() * 2.0 ); 105 console.log( 'ellipe(%d) = %d', m, ellipe( m ) ); 106 } 107 ``` 108 109 </section> 110 111 <!-- /.examples --> 112 113 * * * 114 115 <section class="references"> 116 117 ## References 118 119 - Fukushima, Toshio. 2009. "Fast computation of complete elliptic integrals and Jacobian elliptic functions." _Celestial Mechanics and Dynamical Astronomy_ 105 (4): 305. doi:[10.1007/s10569-009-9228-z][@fukushima:2009a]. 120 - Fukushima, Toshio. 2015. "Precise and fast computation of complete elliptic integrals by piecewise minimax rational function approximation." _Journal of Computational and Applied Mathematics_ 282 (July): 71–76. doi:[10.1016/j.cam.2014.12.038][@fukushima:2015a]. 121 122 </section> 123 124 <!-- /.references --> 125 126 <section class="links"> 127 128 [elliptic-integral]: https://en.wikipedia.org/wiki/Elliptic_integral 129 130 [@fukushima:2009a]: https://doi.org/10.1007/s10569-009-9228-z 131 132 [@fukushima:2015a]: https://doi.org/10.1016/j.cam.2014.12.038 133 134 </section> 135 136 <!-- /.links -->