2004-08-04 22:43:58 -04:00
|
|
|
typedef struct {
|
|
|
|
CELL numerator;
|
|
|
|
CELL denominator;
|
2004-12-10 21:46:42 -05:00
|
|
|
} F_RATIO;
|
2004-08-04 22:43:58 -04:00
|
|
|
|
2004-12-10 21:46:42 -05:00
|
|
|
INLINE F_RATIO* untag_ratio(CELL tagged)
|
2004-08-04 22:43:58 -04:00
|
|
|
{
|
|
|
|
type_check(RATIO_TYPE,tagged);
|
2004-12-10 21:46:42 -05:00
|
|
|
return (F_RATIO*)UNTAG(tagged);
|
2004-08-04 22:43:58 -04:00
|
|
|
}
|
|
|
|
|
2004-12-10 21:46:42 -05:00
|
|
|
INLINE CELL tag_ratio(F_RATIO* ratio)
|
2004-08-04 22:43:58 -04:00
|
|
|
{
|
|
|
|
return RETAG(ratio,RATIO_TYPE);
|
|
|
|
}
|
|
|
|
|
|
|
|
void primitive_numerator(void);
|
|
|
|
void primitive_denominator(void);
|
2004-09-18 22:29:29 -04:00
|
|
|
void primitive_from_fraction(void);
|