Dr. Iverson disavowed operator overloading.  Since otherwise this seems like a great case for overloading I propose a new feature. In this, the rational precision is specified as maximum either denominator or number of digits therein, and set as a global parameter.  Currently it exists as _ .  When R0 u R1 has a larger denominator the result would be approximated using for example https://en.wikipedia.org/wiki/Continued_fraction .  Implementation of this proposal would make rational arithmetic wieldy.  With our infinite precision denominators can become ridiculous, and we wouldn't need to write messy

    R1 sub_MyRat_ R0

    normalize R0 + R1

Thoughts?  Would you be more likely to exploit j's rationals?

Stay well, Dave.

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to