##DESCRIPTION
## Absolute Value Equalites and Inequalities
## 
##ENDDESCRIPTION
## DBsubject(Algebra)
## DBchapter(Algebra of real numbers and simplifying expressions)
## DBsection(Scientific notation)
## Institution(The College of Idaho)
## Author(RA Cruz)
## MLT(Div_scientific)
## MLTleader(1)
## Level(2)
## MO(1)
## TitleText1('Essentials of Intermediate Algebra')
## AuthorText1('Blitzer')
## EditionText1('1')
## Section1('4.3')
## Problem1('')
## KEYWORDS('inequalities','absolute value')
## Date: 2007/10

DOCUMENT(); # This should be the first executable line in the problem.

loadMacros(
  "PGstandard.pl",
  "MathObjects.pl",
  "contextScientificNotation.pl",
  "PGcourse.pl"
);

TEXT(beginproblem());

######################################
#  Setup

do {
   $num2 = random(1.5,9,.1);
   $num1 = -1*$num2*random(.2,.9,.05);  #Keep the decimal length small
} until ($num1<-1);

$exp1 = random(-7,-1,1);
$exp2 = random(3,7,1);

Context("ScientificNotation");

$a = ScientificNotation($num1 * 10**$exp1);
$b = ScientificNotation($num2 * 10**$exp2);

######################################
#  Main text

BEGIN_TEXT
Perform the computation and write the result in scientific notation:
$PAR
\( \displaystyle \frac{\{$a->TeX\}}{\{$b->TeX\}} \) =  \{ ans_rule(20) \}
END_TEXT

######################################
#  Answer

$answer = Compute($a/$b)->reduce;
ANS($answer->cmp);	

$showPartialCorrectAnswers = 1;

######################################


;
ENDDOCUMENT();
