[r6rs-discuss] [Formal] Allow limited comparisons of complex numbers

John Cowan cowan at ccil.org
Sat Jan 20 20:08:49 EST 2007


---
This message is a formal comment which was submitted to formal-comment at r6rs.org, following the requirements described at: http://www.r6rs.org/process.html
---
Submitter: John Cowan
Email address: cowan at ccil.org
Issue type: Enhancement
Priority: Minor
Component: Numbers
Report version: 5.92
Summary:  Some general complex inequality comparisons should be allowed.

Currently, general complex numbers cannot be compared with <, >, <=,
or >=: the concept is mathematically defined.  However, certain kinds
of restricted complex numbers can be compared.  The status quo is to
permit comparison of real numbers only.

Option A: extend these functions to compare imaginary numbers (real part
zero in the sense of "zero?").

Option B: extend these functions to compare general complex numbers
provided that all the real-parts are the same or all the imaginary-parts
are the same.

In either case, an error should be signaled if the numbers don't meet
the criteria.

This allows looping along any orthogonal line in the complex plane using >=
rather than = to terminate; with inexact numbers, < is more reliable.

-- 
All Norstrilians knew what laughter was:        John Cowan
it was "pleasurable corrigible malfunction".    cowan at ccil.org
        --Cordwainer Smith, Norstrilia




More information about the r6rs-discuss mailing list