ARPDAS_QNX6 1.0
rational.h
Go to the documentation of this file.
00001 /* rational.h contains definitions required for rational numbers.
00002    Written 1-26-87
00003    Moved to ps February 25, 1988
00004    Stolen for data use May 1, 1991
00005 
00006    $Id: rational.h,v 1.1 2008/07/03 19:46:28 ntallen Exp $
00007    $Log: rational.h,v $
00008    Revision 1.1  2008/07/03 19:46:28  ntallen
00009    Missing functions
00010 
00011    Revision 1.1  2008/07/03 15:31:02  ntallen
00012    Added rational.h
00013 
00014  * Revision 1.2  1994/11/22  14:55:40  nort
00015  * Changes for 32-bit
00016  *
00017  * Revision 1.1  1992/07/20  15:30:58  nort
00018  * Initial revision
00019  *
00020 */
00021 #ifndef _RATIONAL_H
00022 #define _RATIONAL_H
00023 
00024 typedef struct {
00025   short int num;
00026   short int den;
00027 } rational;
00028 
00029 extern void rreduce(rational *);
00030 extern void rplus(rational *, rational *, rational *);
00031 extern void rminus(rational *, rational *, rational *);
00032 extern void rtimes(rational *, rational *, rational *);
00033 extern void rdivide(rational *, rational *, rational *);
00034 extern void rtimesint(rational *a, short int b, rational *c);
00035 extern void rdivideint(rational *a, short int b, rational *c);
00036 int rcompare(rational *a, rational *b);
00037 extern rational zero, one_half, one;
00038 #endif
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines