unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* bug in numbers.c integer-expt, expt?
@ 2002-03-13  8:28 Rob Browning
  2002-03-13 19:30 ` Marius Vollmer
  0 siblings, 1 reply; 4+ messages in thread
From: Rob Browning @ 2002-03-13  8:28 UTC (permalink / raw)



Is integer-expt supposed to behave like expt wrt (integer-expt 0 0)?

Right now I get

  guile> (integer-expt 0 0)
  0
  guile> (expt 0 0)
  0

but r5rs says:

 - procedure: expt z1 z2
     Returns Z1 raised to the power Z2.  For z_1 ~= 0

                          z_1^z_2 = e^z_2 log z_1
 0^z is 1 if z = 0 and 0 otherwise.


-- 
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

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bug in numbers.c integer-expt, expt?
  2002-03-13  8:28 bug in numbers.c integer-expt, expt? Rob Browning
@ 2002-03-13 19:30 ` Marius Vollmer
  2002-03-13 21:20   ` Rob Browning
  0 siblings, 1 reply; 4+ messages in thread
From: Marius Vollmer @ 2002-03-13 19:30 UTC (permalink / raw)
  Cc: guile-devel

Rob Browning <rlb@defaultvalue.org> writes:

> Is integer-expt supposed to behave like expt wrt (integer-expt 0 0)?
> 
> Right now I get
> 
>   guile> (integer-expt 0 0)
>   0
>   guile> (expt 0 0)
>   0
> 
> but r5rs says:
> 
>  - procedure: expt z1 z2
>      Returns Z1 raised to the power Z2.  For z_1 ~= 0
> 
>                           z_1^z_2 = e^z_2 log z_1
>  0^z is 1 if z = 0 and 0 otherwise.

Looks like a bug.  I think you can't really deduce what 0^0 should be,
so you must decide it.  Let's follow R5RS.

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bug in numbers.c integer-expt, expt?
  2002-03-13 19:30 ` Marius Vollmer
@ 2002-03-13 21:20   ` Rob Browning
  2002-03-14 17:30     ` Marius Vollmer
  0 siblings, 1 reply; 4+ messages in thread
From: Rob Browning @ 2002-03-13 21:20 UTC (permalink / raw)
  Cc: guile-devel

Marius Vollmer <mvo@zagadka.ping.de> writes:

> Looks like a bug.  I think you can't really deduce what 0^0 should be,
> so you must decide it.  Let's follow R5RS.

Right, done (but won't be committed for a while...)

-- 
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

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bug in numbers.c integer-expt, expt?
  2002-03-13 21:20   ` Rob Browning
@ 2002-03-14 17:30     ` Marius Vollmer
  0 siblings, 0 replies; 4+ messages in thread
From: Marius Vollmer @ 2002-03-14 17:30 UTC (permalink / raw)
  Cc: guile-devel

Rob Browning <rlb@defaultvalue.org> writes:

> Right, done (but won't be committed for a while...)

Thanks!

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-03-14 17:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-13  8:28 bug in numbers.c integer-expt, expt? Rob Browning
2002-03-13 19:30 ` Marius Vollmer
2002-03-13 21:20   ` Rob Browning
2002-03-14 17:30     ` Marius Vollmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).