// needs: // needs: // ****************************************************************************** // ****************************************************************************** // ****************************************************************************** // ****************************************************************************** // Unit of Misur CLASS (UM) *************************************** // an element is a string like m^2 k^3 s^(-1) // its rappresentatios is: [["m",2],["k",3],["s",-1]] // (using gnmath constants definition we can also use: [[_m,2],[_k,3],[_s,-1]] function UM(zxc){ this.vv=zxc; } new UM([['dummy',0]]); UM.prototype.toString=function(){ this.collect(); s="" for (var i=0;i'+this.vv[i][1]+' ': ' ' } return s; } // +++++++++++ make the nth power of um UM.pow=function(umis,n){// umis : is a UM!! // wwl('inUM.pow azsx='+azsx) for (var i=0;i'+dot+''+'10 '+this.exp+' ' ) + this.mis.toString()+' ' ) } PQ.prototype.clone=function(){ var s=""; s+=this.x; s+=','+this.exp var ss="[ " var comma=',' for (var i=0;i