You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been writing/rewriting some problems to take advantage of the new extensions. Here's a nice example with Point and Fraction and I will update the samples problems to include something like this.
DOCUMENT();
loadMacros('PGstandard.pl', 'PGML.pl', 'contextFraction.pl', 'PGcourse.pl');
Context(context::Fraction::extending("Point"));
$A = non_zero_random(-20,20);
$B = non_zero_random(-20,20);
$C = non_zero_random(-20,20);
$xint = Point(Fraction($C,$A),0);
$yint = Point(0,Fraction($C,$B));
BEGIN_PGML
Find the [`x`]-intercept and [`y`]-intercept of the line: [` [$A]x+[$B]y=[$C] `]
a) [`x`]-intercept: [_]{$xint}
b) [`y`]-intercept: [_]{$yint}
END_PGML
ENDDOCUMENT();
@dpvc Is there a way to include the LimitedFraction with the Point context? I couldn't quite determine this.
The text was updated successfully, but these errors were encountered:
Is there a way to include the LimitedFraction with the Point context?
Well, the LimitedFraction context is an extension of the LimitedNumeric context, and since neither the Point nor the LimitedNumeric contexts are based on the extension idea, they can't really be mixed.
On the other hand, if you add the ( and , definitions into the LimitedFraction context, that will allow you to create points, so may be what you are looking for. Perhaps contexts like Point, Vector, and Matrix should be extensions as well, so they can be added onto any context (like Point extending Complex for complex points), so that you could use Point to extend LimitedFraction (which would really be Point extending Fraction extending LimitedNumeric).
I'll take a look at this, but this may be a candidate for adding the extension. I may take a look at doing the extension. This would make it much easier for authors.
I've been writing/rewriting some problems to take advantage of the new extensions. Here's a nice example with Point and Fraction and I will update the samples problems to include something like this.
@dpvc Is there a way to include the LimitedFraction with the Point context? I couldn't quite determine this.
The text was updated successfully, but these errors were encountered: