Skip to content

Commit ac50099

Browse files
Apply suggestions from code review
Co-authored-by: Gunj Joshi <[email protected]> Signed-off-by: Harsh Mathur <[email protected]>
1 parent 7e2791e commit ac50099

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

lib/node_modules/@stdlib/math/base/special/lcmf/README.md

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ var v = lcmf( 0, 12 );
5858
// returns 0
5959
```
6060

61-
The inputs must be valid floating-point numbers; otherwise, the function returns `NaN`.
61+
Both `a` and `b` must have integer values; otherwise, the function returns `NaN`.
6262

6363
```javascript
6464
var v = lcmf( 3.14, 12 );
@@ -132,22 +132,22 @@ for ( i = 0; i < 100; i++ ) {
132132
#include "stdlib/math/base/special/lcmf.h"
133133
```
134134

135-
### stdlib_base_lcmf( a,b )
135+
### stdlib_base_lcmf( a, b )
136136

137137
Computes the [least common multiple][lcm] for two single-precision floating-point numbers `a` and `b`.
138138

139139
```c
140140
float v = stdlib_base_lcmf( 10.0, 12.0 );
141-
// returns 60.0
141+
// returns 60.0f
142142
```
143143

144-
The function accepts the following argument:
144+
The function accepts the following arguments:
145145

146146
- **a**: `[in] float` input value.
147147
- **b**: `[in] float` input value.
148148

149149
```c
150-
double stdlib_base_lcmf( const float a, const float b );
150+
float stdlib_base_lcmf( const float a, const float b );
151151
```
152152
153153
</section>
@@ -205,12 +205,6 @@ int main( void ) {
205205

206206
<section class="related">
207207

208-
* * *
209-
210-
## See Also
211-
212-
- <span class="package-name">[`@stdlib/math/base/special/gcd`][@stdlib/math/base/special/gcd]</span><span class="delimiter">: </span><span class="description">compute the greatest common divisor (gcd).</span>
213-
214208
</section>
215209

216210
<!-- /.related -->
@@ -223,8 +217,6 @@ int main( void ) {
223217

224218
<!-- <related-links> -->
225219

226-
[@stdlib/math/base/special/gcd]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/gcd
227-
228220
<!-- </related-links> -->
229221

230222
</section>

lib/node_modules/@stdlib/math/base/special/lcmf/benchmark/benchmark.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ bench( pkg, function benchmark( b ) {
3535
var z;
3636
var i;
3737

38-
b.tic();
38+
x = randu( 100, 0, 50 );
39+
y = randu( 100, 0, 50 );
40+
41+
b.tic();
3942
for ( i = 0; i < b.iterations; i++ ) {
4043
z = lcmf( x[ i % x.length ], y[ i % y.length ] );
4144
if ( isnanf( z ) ) {

0 commit comments

Comments
 (0)