WeBWorK Main Forum

Why scientific notation requires "X" instead of "*" for multiplication? Aren't students conditioned to use "*" everywhere?

Re: Why scientific notation requires "X" instead of "*" for multiplication? Aren't students conditioned to use "*" everywhere?

by Davide Cervone -
Number of replies: 0
It's because that's what the person who requested this context required. It was designed for use in a high-school course where the notational requirements were very strict.

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_PGML
to get the same effect.