From 0e0f3969a967cbf06dc117c735b5a270e858181c Mon Sep 17 00:00:00 2001 From: Kevin Ryde Date: Wed, 12 May 2004 00:44:33 +0000 Subject: [PATCH] (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number): New functions, replacing scm_tc7_cxr definitions, and ensuring exact arguments give exact results, as required by R5RS. Derived in part from the same by Marius in the cvs head. Reported by Ray Lehtiniemi. --- libguile/numbers.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libguile/numbers.h b/libguile/numbers.h index 592bb16db..0945446bf 100644 --- a/libguile/numbers.h +++ b/libguile/numbers.h @@ -2,7 +2,7 @@ #ifndef NUMBERSH #define NUMBERSH -/* Copyright (C) 1995,1996,1998,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,2000,2001, 2004 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -295,6 +295,10 @@ extern double scm_atanh (double x); extern double scm_truncate (double x); extern double scm_round (double x); extern double scm_exact_to_inexact (double z); +extern SCM scm_truncate_number (SCM x); +extern SCM scm_round_number (SCM x); +extern SCM scm_floor (SCM x); +extern SCM scm_ceiling (SCM x); extern SCM scm_sys_expt (SCM z1, SCM z2); extern SCM scm_sys_atan2 (SCM z1, SCM z2); extern SCM scm_make_rectangular (SCM z1, SCM z2);