Application Center - Maplesoft

App Preview:

Presenting Scientific and Engineering Notation

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application


 

engineeringNotation.mws

Presenting Scientific and Engineering Notation

by Otto Wilke
otto_wilke@hotmail.com

Some people, especially megawatt and microamp people, like to see numbers in engineering notation.  The following code presents real numbers in scientific notation and in engineering notation.

>    restart;
x:=98790;
xf:=evalf(x);
absxf:=abs(xf);
xlog:=log[10](absxf);
xfloor:=floor(xlog);
xmod:=modp(xfloor,3);

x := 98790

xf := 98790.

absxf := 98790.

xlog := 4.994712985

xfloor := 4

xmod := 1

>    [xf*10^(-xfloor)]*[10]^[xfloor];

[9.879000000]*[10]^[4]

>    [xf*10^(-xfloor+xmod)]*[10]^[xfloor-xmod];

[98.79000000]*[10]^[3]

>    restart;
x:=-.000354;
xf:=evalf(x);
absxf:=abs(xf);
xlog:=log[10](absxf);
xfloor:=floor(xlog);
xmod:=modp(xfloor,3);
[xf*10^(-xfloor)]*[10]^[xfloor];
[xf*10^(-xfloor+xmod)]*[10]^[xfloor-xmod];

x := -.354e-3

xf := -.354e-3

absxf := .354e-3

xlog := -3.450996738

xfloor := -4

xmod := 2

[-3.540000]*[10]^[-4]

[-354.000000]*[10]^[-6]

>    restart;x:=-1;
xf:=evalf(x);
absxf:=abs(xf);
xlog:=log[10](absxf);
xfloor:=floor(xlog);
xmod:=modp(xfloor,3);
[xf*10^(-xfloor)]*[10]^[xfloor];
[xf*10^(-xfloor+xmod)]*[10]^[xfloor-xmod];

x := -1

xf := -1.

absxf := 1.

xlog := 0.

xfloor := 0

xmod := 0

[-1.]*[10]^[0]

[-1.]*[10]^[0]

>