@@ -25,7 +25,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
2525 < div class ='fl pad1y space-right2 '>
2626 < span class ="strong "> 100% </ span >
2727 < span class ="quiet "> Statements</ span >
28- < span class ='fraction '> 157/157 </ span >
28+ < span class ='fraction '> 164/164 </ span >
2929 </ div >
3030
3131
@@ -46,7 +46,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
4646 < div class ='fl pad1y space-right2 '>
4747 < span class ="strong "> 100% </ span >
4848 < span class ="quiet "> Lines</ span >
49- < span class ='fraction '> 157/157 </ span >
49+ < span class ='fraction '> 164/164 </ span >
5050 </ div >
5151
5252
@@ -220,7 +220,14 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
220220< a name ='L155 '> </ a > < a href ='#L155 '> 155</ a >
221221< a name ='L156 '> </ a > < a href ='#L156 '> 156</ a >
222222< a name ='L157 '> </ a > < a href ='#L157 '> 157</ a >
223- < a name ='L158 '> </ a > < a href ='#L158 '> 158</ a > </ td > < td class ="line-coverage quiet "> < span class ="cline-any cline-yes "> 1x</ span >
223+ < a name ='L158 '> </ a > < a href ='#L158 '> 158</ a >
224+ < a name ='L159 '> </ a > < a href ='#L159 '> 159</ a >
225+ < a name ='L160 '> </ a > < a href ='#L160 '> 160</ a >
226+ < a name ='L161 '> </ a > < a href ='#L161 '> 161</ a >
227+ < a name ='L162 '> </ a > < a href ='#L162 '> 162</ a >
228+ < a name ='L163 '> </ a > < a href ='#L163 '> 163</ a >
229+ < a name ='L164 '> </ a > < a href ='#L164 '> 164</ a >
230+ < a name ='L165 '> </ a > < a href ='#L165 '> 165</ a > </ td > < td class ="line-coverage quiet "> < span class ="cline-any cline-yes "> 1x</ span >
224231< span class ="cline-any cline-yes "> 1x</ span >
225232< span class ="cline-any cline-yes "> 1x</ span >
226233< span class ="cline-any cline-yes "> 1x</ span >
@@ -354,6 +361,13 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
354361< span class ="cline-any cline-yes "> 1x</ span >
355362< span class ="cline-any cline-yes "> 1x</ span >
356363< span class ="cline-any cline-yes "> 1x</ span >
364+ < span class ="cline-any cline-yes "> 1x</ span >
365+ < span class ="cline-any cline-yes "> 1x</ span >
366+ < span class ="cline-any cline-yes "> 1x</ span >
367+ < span class ="cline-any cline-yes "> 1x</ span >
368+ < span class ="cline-any cline-yes "> 1x</ span >
369+ < span class ="cline-any cline-yes "> 1x</ span >
370+ < span class ="cline-any cline-yes "> 3x</ span >
357371< span class ="cline-any cline-yes "> 3x</ span >
358372< span class ="cline-any cline-yes "> 3x</ span >
359373< span class ="cline-any cline-yes "> 3x</ span >
@@ -397,7 +411,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
397411*
398412* ## Notice
399413*
400- * The following copyright and license were part of the original implementation available as part of [FreeBSD]{@link https://svnweb.freebsd.org/base/release/12.2.0/lib/msun/src/k_log .h}. The implementation follows the original, but has been modified for JavaScript.
414+ * The following copyright and license were part of the original implementation available as part of [FreeBSD]{@link https://svnweb.freebsd.org/base/release/12.2.0/lib/msun/src/k_logf .h}. The implementation follows the original, but has been modified for JavaScript.
401415*
402416* ```text
403417* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -413,15 +427,21 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
413427
414428// MODULES //
415429
416- var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );
430+ var f32 = require( '@stdlib/number/float64/base/to-float32' );
417431var polyvalP = require( './polyval_p.js' );
418432var polyvalQ = require( './polyval_q.js' );
419433
420434
435+ // VARIABLES //
436+
437+ var HALF = f32( 0.5 );
438+ var TWO = f32( 2.0 );
439+
440+
421441// MAIN //
422442
423443/**
424- * Computes `logf (1+f) - f` for `1+f` in `~[sqrtf (2)/2, sqrtf (2)]`.
444+ * Computes `log (1+f) - f` for `1+f` in `~[sqrt (2)/2, sqrt (2)]` as a single-precision floating-point number .
425445*
426446* ## Method
427447*
@@ -504,7 +524,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
504524* // returns ~0.1931
505525*
506526* @example
507- * var v = kernelLog1pf( 1.4142135 );
527+ * var v = kernelLog1pf( 1.4142135381698608 );
508528* // returns ~0.4672
509529*
510530* @example
@@ -520,14 +540,15 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
520540 var R;
521541 var w;
522542
523- s = float64ToFloat32( f / float64ToFloat32( 2.0 + f ) );
524- z = float64ToFloat32( s * s );
525- w = float64ToFloat32( z * z );
526- t1 = float64ToFloat32( w * polyvalP( w ) );
527- t2 = float64ToFloat32( z * polyvalQ( w ) );
528- R = float64ToFloat32( t2 + t1 );
529- hfsq = float64ToFloat32( 0.5 * float64ToFloat32( f * f ) );
530- return float64ToFloat32( s * float64ToFloat32( hfsq + R ) );
543+ f = f32( f );
544+ s = f32( f / f32( TWO + f ) );
545+ z = f32( s * s );
546+ w = f32( z * z );
547+ t1 = f32( w * polyvalP( w ) );
548+ t2 = f32( z * polyvalQ( w ) );
549+ R = f32( t2 + t1 );
550+ hfsq = f32( HALF * f32( f * f ) );
551+ return f32( s * f32( hfsq + R ) );
531552}
532553
533554
@@ -541,7 +562,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
541562 < div class ='footer quiet pad2 space-top1 center small '>
542563 Code coverage generated by
543564 < a href ="https://istanbul.js.org/ " target ="_blank " rel ="noopener noreferrer "> istanbul</ a >
544- at 2025-07-14T04:37:08.140Z
565+ at 2025-07-14T05:04:04.756Z
545566 </ div >
546567 < script src ="../../../../../prettify.js "> </ script >
547568 < script >
0 commit comments