// 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;i0 ){
this.mis=new UM(_mis);
}
else{ // if _mis is already a um:
this.mis=_mis
}
}
new PQ(0,0,[['dummy',0]])
PQ.precision=3;
PQ.prototype.toString=function (){
this.mis.collect();
return (
trunc(this.x,PQ.precision)+
( (this.exp==0)? '':''+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