File tree Expand file tree Collapse file tree 1 file changed +12
-17
lines changed
lib/node_modules/@stdlib/math/base/special/lcmf/src Expand file tree Collapse file tree 1 file changed +12
-17
lines changed Original file line number Diff line number Diff line change 3232* // returns 42.0f
3333*/
3434float stdlib_base_lcmf ( const float a , const float b ) {
35- float abs_a ;
36- float abs_b ;
37- float gcd_value ;
35+ double abs_a ;
36+ double abs_b ;
37+ double gcd_value ;
3838 const double b = 1.0 ;
3939
40- if ( a == 0.0 || b == 0.0 ) {
40+ if ( a == 0.0 || b == 0.0 ) {
4141 return 0.0 ;
4242 }
43- if ( a < 0.0 ) {
44- abs_a = - a ;
45- }else {
46- abs_a = a ;
43+ if ( a < 0.0 ) {
44+ abs_a = - a ;
45+ } else {
46+ abs_a = a ;
4747 }
48- if ( b < 0.0 ) {
49- abs_b = - b ;
50- }else {
51- abs_b = b ;
48+ if ( b < 0.0 ) {
49+ abs_b = - b ;
50+ } else {
51+ abs_b = b ;
5252 }
53-
54- abs_a = (a < 0.0f )?- a :a ;
55- abs_b = (b < 0.0f )?- b :b ;
56-
5753 // Note: we rely on `gcd` to perform further argument validation...
5854 gcd_value = stdlib_base_gcd (abs_a ,abs_b );
59-
6055 if (stdlib_base_is_nan (gcd_value )){
6156 return gcd_value ;
6257 }
You can’t perform that action at this time.
0 commit comments