33< html lang ="en ">
44
55< head >
6- < title > Code coverage report for math/base/special/expf/lib/expmulti .js</ title >
6+ < title > Code coverage report for math/base/special/expf/lib/expmultif .js</ title >
77 < meta charset ="utf-8 " />
88 < link rel ="stylesheet " href ="../../../../../prettify.css " />
99 < link rel ="stylesheet " href ="../../../../../base.css " />
1919< body >
2020< div class ='wrapper '>
2121 < div class ='pad1 '>
22- < h1 > < a href ="../../../../../index.html "> All files</ a > / < a href ="index.html "> math/base/special/expf/lib</ a > expmulti .js</ h1 >
22+ < h1 > < a href ="../../../../../index.html "> All files</ a > / < a href ="index.html "> math/base/special/expf/lib</ a > expmultif .js</ h1 >
2323 < div class ='clearfix '>
2424
2525 < div class ='fl pad1y space-right2 '>
26- < span class ="strong "> 97.36 % </ span >
26+ < span class ="strong "> 100 % </ span >
2727 < span class ="quiet "> Statements</ span >
28- < span class ='fraction '> 74 /76</ span >
28+ < span class ='fraction '> 76 /76</ span >
2929 </ div >
3030
3131
3232 < div class ='fl pad1y space-right2 '>
33- < span class ="strong "> 66.66 % </ span >
33+ < span class ="strong "> 100 % </ span >
3434 < span class ="quiet "> Branches</ span >
35- < span class ='fraction '> 2/3 </ span >
35+ < span class ='fraction '> 2/2 </ span >
3636 </ div >
3737
3838
@@ -44,9 +44,9 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
4444
4545
4646 < div class ='fl pad1y space-right2 '>
47- < span class ="strong "> 97.36 % </ span >
47+ < span class ="strong "> 100 % </ span >
4848 < span class ="quiet "> Lines</ span >
49- < span class ='fraction '> 74 /76</ span >
49+ < span class ='fraction '> 76 /76</ span >
5050 </ div >
5151
5252
@@ -191,25 +191,25 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
191191< span class ="cline-any cline-yes "> 1x</ span >
192192< span class ="cline-any cline-yes "> 1x</ span >
193193< span class ="cline-any cline-yes "> 1x</ span >
194- < span class ="cline-any cline-yes "> 3998x </ span >
195- < span class ="cline-any cline-yes "> 3998x </ span >
196- < span class ="cline-any cline-yes "> 3998x </ span >
197- < span class ="cline-any cline-yes "> 3998x </ span >
198- < span class ="cline-any cline-yes "> 3998x </ span >
199- < span class ="cline-any cline-yes "> 3998x </ span >
200- < span class ="cline-any cline-yes "> 3998x </ span >
201- < span class ="cline-any cline-yes "> 3998x </ span >
202- < span class ="cline-any cline-yes "> 3998x </ span >
203- < span class ="cline-any cline-yes "> 3998x </ span >
204- < span class ="cline-any cline-yes "> 3998x </ span >
205- < span class ="cline-any cline-yes "> 3998x </ span >
206- < span class ="cline-any cline-yes "> 3998x </ span >
207- < span class ="cline-any cline-yes "> 3998x </ span >
208- < span class ="cline-any cline-yes "> 3998x </ span >
209- < span class ="cline-any cline-yes "> 3998x </ span >
210- < span class ="cline-any cline-no " > </ span >
211- < span class ="cline-any cline-no " > </ span >
212- < span class ="cline-any cline-yes "> 3998x </ span >
194+ < span class ="cline-any cline-yes "> 1x </ span >
195+ < span class ="cline-any cline-yes "> 1x </ span >
196+ < span class ="cline-any cline-yes "> 1x </ span >
197+ < span class ="cline-any cline-yes "> 1x </ span >
198+ < span class ="cline-any cline-yes "> 1x </ span >
199+ < span class ="cline-any cline-yes "> 1x </ span >
200+ < span class ="cline-any cline-yes "> 4002x </ span >
201+ < span class ="cline-any cline-yes "> 4002x </ span >
202+ < span class ="cline-any cline-yes "> 4002x </ span >
203+ < span class ="cline-any cline-yes "> 4002x </ span >
204+ < span class ="cline-any cline-yes "> 4002x </ span >
205+ < span class ="cline-any cline-yes "> 4002x </ span >
206+ < span class ="cline-any cline-yes "> 4002x </ span >
207+ < span class ="cline-any cline-yes "> 4002x </ span >
208+ < span class ="cline-any cline-yes "> 4002x </ span >
209+ < span class ="cline-any cline-yes "> 4002x </ span >
210+ < span class ="cline-any cline-yes " > 4002x </ span >
211+ < span class ="cline-any cline-yes " > 4002x </ span >
212+ < span class ="cline-any cline-yes "> 4002x </ span >
213213< span class ="cline-any cline-yes "> 1x</ span >
214214< span class ="cline-any cline-yes "> 1x</ span >
215215< span class ="cline-any cline-yes "> 1x</ span >
@@ -235,70 +235,70 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
235235*
236236* ## Notice
237237*
238- * The following copyrights, licenses, and long comment were part of the original implementation available as part of{@link https://svnweb.freebsd.org/base/release/12.2.0/lib/msun/src/e_expf.c?view=markup}, The implementation follows the original, but has been modified for JavaScript.
238+ * The following copyrights, licenses, and long comment were part of the original implementation available as part of{@link https://svnweb.freebsd.org/base/release/12.2.0/lib/msun/src/e_expf.c}, The implementation follows the original, but has been modified for JavaScript.
239+ *
240+ * ```text
241+ * Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.
239242*
240- * e_expf.c -- float version of e_exp.c.
241- * Conversion to float by Ian Lance Taylor, Cygnus Support,
[email protected] .
242- * ====================================================
243- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
244243* Developed at SunPro, a Sun Microsystems, Inc. business.
245244* Permission to use, copy, modify, and distribute this
246245* software is freely granted, provided that this notice
247246* is preserved.
248- * ====================================================
247+ * ```
249248*/
250249
251250'use strict';
252251
253252// MODULES //
254253
255254var ldexpf = require( '@stdlib/math/base/special/ldexpf' );
255+ var f32 = require( '@stdlib/number/float64/base/to-float32' );
256256var polyvalP = require( './polyval_p.js' );
257257
258258
259+ // VARIABLES //
260+
261+ var ONE = f32( 1.0 );
262+ var TWO = f32( 2.0 );
263+
264+
259265// MAIN //
260266
261267/**
262- * Computes \\(e^{r} 2^k\\) where \\(r = \mathrm{hi} - \mathrm{lo}\\) and \\(|r| \leq \ln(2)/2\\).
268+ * Computes \\(e^{r} 2^k\\) for a single-precision floating-point number, where \\(r = \mathrm{hi} - \mathrm{lo}\\) and \\(|r| \leq \ln(2)/2\\).
263269*
264270* @private
265271* @param {number} hi - upper bound
266272* @param {number} lo - lower bound
267273* @param {integer} k - power of 2
268274* @returns {number} function value
269275*/
270- function expmulti( hi, lo, k ) {
271- var twom100;
276+ function expmultif( hi, lo, k ) {
272277 var r;
273278 var t;
274279 var c;
275280 var y;
276281
277- twom100 = 7.8886090522e-31;
278- r = hi - lo;
279- t = r * r;
280- c = r - ( t*polyvalP( t ) );
281- y = 1.0 - ( lo - ( (r*c)/(2.0-c) ) - hi );
282+ r = f32( hi - lo );
283+ t = f32( r * r );
284+ c = f32( r - f32( t*polyvalP( t ) ) );
285+ y = f32( ONE - f32( f32( lo - f32( f32(r*c)/f32(TWO-c) ) ) - hi ) );
282286
283- if ( k >= -125 ) {
284- return ldexpf( y, k );
285- }
286- < span class ="cstat-no " title ="statement not covered " > < span class ="branch-0 cbranch-no " title ="branch not covered " > </ span > </ span >
287- < span class ="cstat-no " title ="statement not covered " > return ldexpf( y, k + 100 ) * twom100 * twom100;</ span >
287+ return ldexpf( y, k );
288288}
289289
290290
291291// EXPORTS //
292292
293- module.exports = expmulti ;
293+ module.exports = expmultif ;
294294 </ pre > </ td > </ tr > </ table > </ pre >
295295
296296 < div class ='push '> </ div > <!-- for sticky footer -->
297297 </ div > <!-- /wrapper -->
298298 < div class ='footer quiet pad2 space-top1 center small '>
299299 Code coverage generated by
300300 < a href ="https://istanbul.js.org/ " target ="_blank " rel ="noopener noreferrer "> istanbul</ a >
301- at 2025-08-18T06:25:36.097Z
301+ at 2025-08-18T06:27:29.394Z
302302 </ div >
303303 < script src ="../../../../../prettify.js "> </ script >
304304 < script >
0 commit comments