Algebra.js
function(a) {
                    for(var i=0; i<a.length; i++)
                        if(!a[i].equals(0)) return i;
                }
function(a) {
                    for(var i=0; i<a.length; i++)
                        if(!a[i].equals(0)) return i;
                }
function ( a ) { for ( var i = 0 ; i < a . length ; i ++ ) if ( ! a [ i ] . equals ( 0 ) ) return i ; }
get the first nozero coefficient and returns its power
get the first nozero coefficient and returns its power