guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

real numbers and integer-expt.


From: Rob Browning
Subject: real numbers and integer-expt.
Date: Wed, 13 Mar 2002 02:36:38 -0600
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.1 (i386-debian-linux-gnu)

integer-expt says:

  SCM_DEFINE (scm_integer_expt, "integer-expt", 2, 0, 0,
              (SCM n, SCM k),
              "Return @var{n} raised to the non-negative integer exponent\n"
              "@var{k}.\n"
              "\n"

but in the code we check to see if k satisfies SCM_REALP and if it
does, we coerce it to an int and see if we get any lossage.  If we
don't then we decide it's OK to use it.  Is that what we want, or
should callers be required to use inexact->exact when appropriate?

Thanks

-- 
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG=1C58 8B2C FB5E 3F64 EA5C  64AE 78FE E5FE F0CB A0AD



reply via email to

[Prev in Thread] Current Thread [Next in Thread]