bugKawa - Bugs: bug #39222, `numerator` and `denominator` do...

 
 

bug #39222: `numerator` and `denominator` do the wrong thing on inexacts

Submitter:  None
Submitted:  Mon 10 Jun 2013 07:03:52 PM UTC
   
 
Category:  Scheme language Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  bothner
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 24 Oct 2014 08:05:35 PM UTC, comment #2: 

I checked in a fix for this.  Likewise for gcd and lcm.

Per Bothner <bothner>
Group administrator
Mon 10 Jun 2013 07:31:37 PM UTC, comment #1: 

My preliminary response: This is a bug in R5RS and R7RS.
(numerator 5.5) should be a type error.

Per Bothner <bothner>
Group administrator
Mon 10 Jun 2013 07:03:52 PM UTC, original submission:  

Kawa gives a type error if you try (numerator 5.5) or (denominator 5.5), instead of converting the inexact value to a ratio, getting the ratio numerator or denominator, and then making it inexact again.  This is what R5RS and R7RS demand, because the argument can be any rational number, exact or inexact.

I've reported this bug for Chicken and Chibi, and I'm going to do so for RScheme and S7 too.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bothner (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-10-24 bothner StatusNone Fixed
        Assigned toNone bothner
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code