Skip to content

LimitedFraction with new extension #1192

@pstaabp

Description

@pstaabp

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions