[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guile/guile-core/libguile print.c objects.h obj...
From: |
Marius Vollmer |
Subject: |
guile/guile-core/libguile print.c objects.h obj... |
Date: |
Tue, 18 Nov 2003 14:59:53 -0500 |
CVSROOT: /cvsroot/guile
Module name: guile
Branch:
Changes by: Marius Vollmer <address@hidden> 03/11/18 14:59:53
Modified files:
guile-core/libguile: print.c objects.h objects.c numbers.h
numbers.c hash.c goops.c gc-mark.c
gc-card.c eval.c eq.c
Log message:
* print.c (scm_iprin1): Handle fractions.
* objects.h (scm_class_fraction): New.
* objects.c (scm_class_fraction): New.
(scm_class_of): Handle fractions.
* hash.c (scm_hasher): Handle fractions.
* numbers.c: New code for handling fraction all over the place.
(scm_odd_p, scm_even_p): Handle inexact integers.
(scm_rational_p): New function, same as scm_real_p.
(scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
New exact functions that replace the inexact 'dsubr'
implementations.
(scm_numerator, scm_denominator): New.
* numbers.h (SCM_NUMP): Recognize fractions.
(SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
SCM_FRACTION_REDUCED): New.
(scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
New prototypes.
(scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
scm_rational_p): New prototypes.
(scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
scm_i_print_fraction): New prototypes.
* goops.c (create_standard_classes): Create "<fraction>" class.
* gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
* gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
case in the switch, but do nothing for now.
* eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
to doubles when calling 'dsubr' functions.
* eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile/guile-core/libguile/print.c.diff?tr1=1.155&tr2=1.156&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile/guile-core/libguile/objects.h.diff?tr1=1.42&tr2=1.43&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile/guile-core/libguile/objects.c.diff?tr1=1.75&tr2=1.76&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile/guile-core/libguile/numbers.h.diff?tr1=1.76&tr2=1.77&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile/guile-core/libguile/numbers.c.diff?tr1=1.206&tr2=1.207&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile/guile-core/libguile/hash.c.diff?tr1=1.51&tr2=1.52&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile/guile-core/libguile/goops.c.diff?tr1=1.72&tr2=1.73&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile/guile-core/libguile/gc-mark.c.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile/guile-core/libguile/gc-card.c.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile/guile-core/libguile/eval.c.diff?tr1=1.348&tr2=1.349&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile/guile-core/libguile/eq.c.diff?tr1=1.47&tr2=1.48&r1=text&r2=text
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- guile/guile-core/libguile print.c objects.h obj...,
Marius Vollmer <=