bugGNU Octave - Bugs: bug #39689, mod function is not correct

 
 

bug #39689: mod function is not correct

Submitted by:  None
Submitted on:  Sun 04 Aug 2013 05:14:34 AM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: InvalidAssigned to: None
Originator Name: Originator Email: -unavailable-
Open/Closed: ClosedRelease: 3.6.2
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 04 Aug 2013 02:11:39 PM UTC, comment #1:

This is not a bug, just an issue with how integers are represented in floating point format. See the bitmax() function for the largest integer that can be represented in an IEEE double. It is 2^53-1 or ~9e15. Your number is bigger than that and so it can't be represented correctly as an integer. However, this is what the integer class is for.

Try

Rik <rik5>
Project Administrator
Sun 04 Aug 2013 05:14:34 AM UTC, original submission:

I would like to find 1e16%17, the result should be 1, but Octave give me 0. I know 10000000000000000 is not a small number, but still with in 64 bit range, I would say it is a bug.

Anonymous

 

(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

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    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 project members can vote.

     

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

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 04 Aug 2013 02:11:39 PM UTCrik5StatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1