If you want to use *
for the multiplication, you can add it into the context as follows:
Context("ScientificNotation"); Context()->operators->add( '*' => {precedence => 3, associativity => 'left', type => 'bin', TeX => '\times ', class => 'ScientificNotation::BOP::x'}, );so you can enter
1.23*10^3
, but the output will still show the x
. Changing that would require using a subclass of the Scientific notation class, and that is a bit more work.
Also, note that you don't have to use Compute()
for your PGML. You could just use
BEGIN_PGML See if you can enter 1230 in scientific notation. [____________]{"1.23 x 10**3"} END_PGMLto get the same effect.