unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Kevin Ryde <user42@zip.com.au>
Subject: equal? frac versus real
Date: Wed, 11 Aug 2004 11:22:50 +1000	[thread overview]
Message-ID: <87fz6uo4d1.fsf@zip.com.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 189 bytes --]

        * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
        must be #f according to R5RS.  (equal? follows eqv?, and for eqv? an
        exact and inexact is #f.)


[-- Attachment #2: eq.c.frac-real.diff --]
[-- Type: text/plain, Size: 872 bytes --]

--- eq.c.~1.50.~	2004-07-28 08:49:08.000000000 +1000
+++ eq.c	2004-08-10 18:25:53.000000000 +1000
@@ -173,24 +173,6 @@
 			     && SCM_COMPLEX_IMAG (x) == 0.0);
 	}
 
-      /* should we handle fractions here also? */
-      else if ((SCM_FRACTIONP (x)) && (SCM_INEXACTP (y)))
-	{
-	  if (SCM_REALP (y))
-	    return scm_from_bool (scm_i_fraction2double (x) == SCM_REAL_VALUE (y));
-	  else
-	    return scm_from_bool (SCM_COMPLEX_REAL (y) == scm_i_fraction2double (x)
-			     && SCM_COMPLEX_IMAG (y) == 0.0);
-	}
-      else if ((SCM_FRACTIONP (y)) && (SCM_INEXACTP (x)))
-	{
-	  if (SCM_REALP (x))
-	    return scm_from_bool (scm_i_fraction2double (y) == SCM_REAL_VALUE (x));
-	  else
-	    return scm_from_bool (SCM_COMPLEX_REAL (x) == scm_i_fraction2double (y)
-			     && SCM_COMPLEX_IMAG (x) == 0.0);
-	}
-
       return SCM_BOOL_F;
     }
   switch (SCM_TYP7 (x))

[-- Attachment #3: Type: text/plain, Size: 143 bytes --]

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

                 reply	other threads:[~2004-08-11  1:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fz6uo4d1.fsf@zip.com.au \
    --to=user42@zip.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).