Expresa el número superior en notación científica arrastrando el punto decimal en el número inferior:
init({range:[[-8,14],[-1,3]],scale:[23,45]}),graph.decimalPlace=E;var decimal=icu.getDecimalFormatSymbols().decimal_separator;graph.digits=[];for(var i=-5;0>i;++i)graph.digits.push(label([i-.5,0],"\\Huge{0}")),i>=E&&label([i-.5,2],"\\Huge{0}");for($.each(integerToDigits(NUMBER_SEED),function(){graph.digits.push(label([i-.5,0],"\\Huge{"+this+"}")),label([i-.5,2],"\\Huge{"+this+"}"),++i});11>i;++i)graph.digits.push(label([i-.5,0],"\\Huge{0}")),E>=i&&label([i-.5,2],"\\Huge{0}");label([0,1],"\\large{=}"),graph.exp=bogusShape,addMouseLayer(),graph.decimal=addMovablePoint({coord:[graph.decimalPlace,-.3],snapX:1,constraints:{constrainY:!0},normalStyle:{fill:KhanUtil.BLUE,stroke:KhanUtil.BLUE}}),graph.decimal.visibleShape.remove(),graph.decimal.visibleShape=label([graph.decimalPlace,-.3],"\\Huge{"+decimal+"}"),graph.decimal.visibleShape.css("color",KhanUtil.BLUE),graph.decimal.onHighlight=function(){graph.decimal.visibleShape.css("color",KhanUtil.ORANGE),$({scale:1}).animate({scale:1.5},{step:function(e){graph.decimal.visibleShape.css("transform","scale("+e+")")},duration:50})},graph.decimal.onUnhighlight=function(){graph.decimal.visibleShape.css("color",KhanUtil.BLUE),$({scale:1.5}).animate({scale:1},{step:function(e){graph.decimal.visibleShape.css("transform","scale("+e+")")},duration:50})},style({stroke:null,fill:"black"},function(){label([E,1.7],"\\Huge{"+decimal+"}")});var lastPlaceAndExp=[null,null],setDecimal=function(e,r){if(lastPlaceAndExp[0]!==e||lastPlaceAndExp[1]!==r){lastPlaceAndExp=[e,r];var n;if(0>=e){for(n=-5;e-1>n;++n)graph.digits[n+5].hide();for(;NUMBER_SEED_LENGTH>n;)graph.digits[n+5].show(),++n;for(graph.exp.remove(),graph.exp=label([n-1,.25],"\\color{gray}{\\huge{ \\times 10^{\\color{"+BLUE+"}{"+r+"}}}}","right");11>n;)graph.digits[n+5].hide(),++n}else{for(n=-5;0>n;++n)graph.digits[n+5].hide();for(;e>n||NUMBER_SEED_LENGTH>n;)graph.digits[n+5].show(),++n;for(graph.exp.remove(),graph.exp=label([n-1,.25],"\\color{gray}{\\huge{ \\times 10^{\\color{"+BLUE+"}{"+r+"}}}}","right");11>n;)graph.digits[n+5].hide(),++n}}};setDecimal(E+1,0),graph.decimal.onMove=function(e,r){if(-5>e||e>10)return!1;var n=E-e;setDecimal(e+1,n),graph.decimal.visibleShape.setPosition([e,r])}
A medida que muevas el punto decimal, el exponente cambiará automáticamente para que ambos números sean siempre iguales.
To write PRETTY_DECIMAL in scientific notation, move the decimal
to the rightleft so the number is greater than or equal
to 1, but less than 10.
Mover el decimal a la rightleft abs( E ) lugar nos deja con BASE_STR.
Mover el decimal a la rightleft abs( E ) lugares nos deja con BASE_STR.
Mover el decimal a la derechaizquierda abs( E ) lugares es lo mismo que miltiplicardividir por diez abs( E ) veces. Por lo tanto, para contrarrestar el mover el decimal, debemos dividirmulyiplicar por diezabs( E ) veces — que es lo mismo que multiplicar por 10^{E}.
Mover el decimal a la derechaizquierda abs( E ) lugares es lo mismo que miltiplicardividir por diez abs( E ) veces. Por lo tanto, para contrarrestar el mover el decimal, debemos dividirmulyiplicar por diezabs( E ) veces — que es lo mismo que multiplicar por 10^{E}.
PRETTY_DECIMAL en notación científica es \color{PINK}{BASE_STR}\times \color{BLUE}{10^{E}}.
var place=graph.decimal.coord[0];$({0:place}).animate({0:0},{duration:50*abs(place),easing:"linear",step:function(e){e=round(e),graph.decimal.setCoord([e,-.3]),graph.decimal.onMove(e,-.3)}})