Enhancements
Scientific Notation

Mobius Logo

By default Maple displays large (or very small) numbers in the format 1.234568E11. Some users would prefer the format 1.234568 × 1011. The following code will do this:

 

$a=467500000000; # Define or generate value here
$E=int(log($a))-lt($a,1); # Get the exponent.
$ED=if(eq($E,1),"",$E); # Avoid the 100 problem
$aS=$a/10^($E);
$Test1="\( $aS \times 10^{$ED} \)"; # Latex code for display
$Test2="<math><mrow><mn>$aS</mn><mo>×</mo><msup><mrow><mn>10</mn></mrow><mrow><mn>$ED</mn></mrow></msup></mrow></math>"; # MathML code

Enhancements Index

Main Index

Last updated: 03/26/2020 SS/DAG