### ? Context( 'RationalNmbrs' ) ??

by Dick Lane -$ac = Fraction( $a , $c );

$bc = Fraction( $b , $c );

$fcn = Formula( "$ac x + $bc" ) ;

replaced by

$fcn = Compute( "($a/$c) x + $b/$c" ) ;

both elicit error message

Undefined subroutine &context::Fraction::Real::cmp_defaults ...

Gavin's reduced_frac in Library/macros/Michigan/hhAdditionalMacros.pl shows one approach to coping with a part of this dilemma.

While it may be possible to extend tools in

pg/macros/PGpolynomialmacros.pl

a more general extension of the system might be feasible.

I just stumbled across the Math::Polynomial class for Perl. The documentation

http://search.cpan.org/~mhasch/Math-Polynomial-1.005/lib/Math/Polynomial.pm

says it can handle coefficients from a variety of rings: decimal real, decimal complex, rational, matrices, finite fields, etc. Could that provide support for development of a Context('Rational') that handles both numbers and functions (domain and range)? [RationalNmbrs should probably be distinguished from RationalFcns.]

### Re: ? Context( 'RationalNmbrs' ) ??

by Michael Gage -### Re: ? Context( 'RationalNmbrs' ) ??

by Dick Lane -Maxima (Sage's CAS) is not the only open-source CAS to consider (I need to update my list in http://lennes.math.umt.edu/391/cas.html). Work by the GeoGebra project may suggest ways to select a good subset of functionality from a major CAS, e.g, see

https://dev.geogebra.org/trac/wiki/GeoGebraCAS

### Re: ? Context( 'RationalNmbrs' ) ??

by Dick Lane -($n,$d) = $fraction -> value ;

$ratnl = ($d == 1) ? $n : "\frac{$n}{$d} " ;

to get full-size fractions for display in a solution.

(A RationalNmbr context would eliminate the need for that sort ot fiddling.)

There are also two uses of

$fraction->with(isHorizontal=>true);

which fail to have the desired effect.