UNPKG

aureooms-js-number

Version:

Primitive number type arithmetic for JavaScript

19 lines (11 loc) 344 B
import test from 'ava' ; import * as number from '../../../src' ; test( "ishu" , t => { const n = 10 ; for ( let i = 0 ; i < n ; ++i ) { let a = Math.floor( Math.random() * Math.pow( 2 , 32 ) ) ; let b = Math.floor( Math.random() * 32 ) ; let x = a ; t.deepEqual( number.ishu( x , b ) , a >>>= b , x + " >>> " + b ) ; } } ) ;