rational

Section: OATH Reference Manual (3O)
Updated: 26 August 1991
Index Return to Main Contents
 

NAME

rational (rationalA, rationalG) - an object that holds rational number value  

SYNOPSIS

#include <oath/numeric.h>  

DESCRIPTION

The rational is an object that holds a rational numeric value. Note that rational and the other numeric types in OATH are object-oriented like bag, as opposed to value-oriented like int or float -- see complex(3O).  

DERIVATION

rational : real : complex : obj

rational is an abstract type.  

STATIC OPERATIONS

rationalA rationalA:: isa (objA)
rationalA::isa(O) returns O if it is truly a rational; otherwise it returns Nil.
 

MEMBER OPERATIONS

integerA rationalA:: makeNumerator (int = FALSE)
R.makeNumerator() makes and returns an integer representing the numerator of rational number R.
integerA rationalA:: makeDenominator (int = FALSE)
R.makeDenominator() makes and returns an integer representing the denominator of rational number R.
 

INTERNAL OPERATIONS

 

SEE ALSO

OATH(3O), complex(3O), real(3O), integer(3O)  

AUTHOR

Brian M. Kennedy (Computer Science Center, Texas Instruments Incorporated)  

COPYRIGHT

Copyright (C) 1991 Texas Instruments Incorporated

Permission is granted to any individual or institution to use, copy, modify, and distribute this software, provided that this complete copyright and permission notice is maintained, intact, in all copies and supporting documentation. Texas Instruments Incorporated provides this software "as is" without express or implied warranty.  

BUGS

There is only one implementation of rational provided, and it only supports integer precision (denominator = 1). Thus, all the difficulties in implementing cross-implementations of functionality may not be readily apparent. Thus, this interface may need augmentation to better support implementations. Planned implementations include bigRational, dlongRational, longRational, bigInteger, dlongInteger, and longInteger.


 

Index

NAME
SYNOPSIS
DESCRIPTION
DERIVATION
STATIC OPERATIONS
MEMBER OPERATIONS
INTERNAL OPERATIONS
SEE ALSO
AUTHOR
COPYRIGHT
BUGS

This document was created by man2html, using the manual pages.
Time: 20:37:47 GMT, July 24, 2024