bugKawa - Bugs: bug #4867, floor returns a <real>,...

 
 

bug #4867: floor returns a <real>, should return an <integer>

Submitted by:  Chris Dean <ctdean>
Submitted on:  Wed 20 Aug 2003 10:06:13 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 21 Aug 2003 06:40:19 PM UTC, comment #3:

Thanks, works great.

Chris Dean <ctdean>
Thu 21 Aug 2003 07:04:30 AM UTC, comment #2:

I generalized quotient, remainder, and modulo to real numbers.
See the manual. Your example should now work.

Per Bothner <bothner>
Project Administrator
Thu 21 Aug 2003 06:50:29 AM UTC, comment #1:

floor, ceiling, truncate, and round return integers, but
not necessarily exact integers. I.e. (truncate 4.5)
returns the DFloNum 4.0, not the IntNum 4. And in Kawa
as currently implement <integer> means an exact integer.
(Note the definition of integer? is different.) Changing
the definition of <integer> would a big change, but I
did change the documentation at least.

However, (remainder (truncate 100.0) 10) should work.
(It does under PLT - but not Guile.) I thought I had
fixed it - but it seems not. I'll expect to do so
tomorrow morning.

Per Bothner <bothner>
Project Administrator
Wed 20 Aug 2003 10:06:13 PM UTC, original submission:

floor, ceiling, truncate, and round all return a <real> but should probably return an <integer>. R5RS says "These procedures return integers". Also, expressions such as
(remainder (truncate 100.0) 10) fail with a wrong type error.

Chris Dean <ctdean>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follows 1 latest change.

Date Changed By Updated Field Previous Value => Replaced By
Thu 21 Aug 2003 07:04:30 AM UTCbothnerOpen/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1