Skip to content

Commit 5365aa1

Browse files
committed
fix: restore correct includes in main.c - use pow/trunc instead of powf/truncf
1 parent fc6dae7 commit 5365aa1

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

lib/node_modules/@stdlib/math/base/special/truncbf/lib/index.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* you may not use this file except in compliance with the License.
88
* You may obtain a copy of the License at
99
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
10+
* http://www.apache.org/licenses/LICENSE-2.0
1111
*
1212
* Unless required by applicable law or agreed to in writing, software
1313
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -27,23 +27,23 @@
2727
* var truncbf = require( '@stdlib/math/base/special/truncbf' );
2828
*
2929
* var v = truncbf( 3.14159, 2, 10 );
30-
* // returns 3.14
30+
* // returns 3.140000104904175
3131
*
3232
* v = truncbf( 3.14159, 3, 10 );
33-
* // returns 3.141
33+
* // returns 3.1410000324249268
3434
*
3535
* v = truncbf( 15.0, -1, 10 );
3636
* // returns 10.0
3737
*
3838
* v = truncbf( -3.14159, 2, 10 );
39-
* // returns -3.14
39+
* // returns -3.140000104904175
4040
*/
4141

4242
// MODULES //
4343

4444
var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
45-
var main = require( './main.js' );
46-
var tryRequire = require( '@stdlib/utils/try-require' );
45+
var tryRequire = require( '@stdlib/utils/try-require' ); // <-- MOVED UP
46+
var main = require( './main.js' ); // <-- MOVED DOWN
4747

4848

4949
// VARIABLES //
@@ -54,13 +54,13 @@ var native = tryRequire( './native.js' );
5454
// MAIN //
5555

5656
if ( native instanceof Error ) {
57-
native = null;
57+
native = null;
5858
}
5959
if ( native ) {
60-
setReadOnly( main, 'native', native );
60+
setReadOnly( main, 'native', native );
6161
}
6262

6363

6464
// EXPORTS //
6565

66-
module.exports = main;
66+
module.exports = main;

lib/node_modules/@stdlib/math/base/special/truncbf/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@
7575
]
7676
}
7777
]
78-
}
78+
}

lib/node_modules/@stdlib/math/base/special/truncbf/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,4 +250,4 @@
250250
}
251251
}
252252
}
253-
}
253+
}

lib/node_modules/@stdlib/math/base/special/truncbf/src/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,4 @@ float stdlib_base_truncbf( const float x, const int32_t n, const int32_t b ) {
5151
// Multiply by scale, truncate (using truncf), then divide by scale
5252
return stdlib_base_truncf( x * s ) / s;
5353
}
54+

0 commit comments

Comments
 (0)