octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #54602] (patch) fix behavior of octfile signed


From: Gene Harvey
Subject: [Octave-bug-tracker] [bug #54602] (patch) fix behavior of octfile signed int mod
Date: Fri, 31 Aug 2018 01:13:15 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?54602>

                 Summary: (patch) fix behavior of octfile signed int mod
                 Project: GNU Octave
            Submitted by: gharveymn
            Submitted on: Fri 31 Aug 2018 05:13:13 AM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: Gene Harvey
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: other
        Operating System: Any

    _______________________________________________________

Details:

This is a small fix to the behavior of the octfile implementation of the
signed mod function.

Currently the function returns y if x%y==0 and y<0. Example: x=-125, y=-25
will return -25 instead of 0. The patch changes behavior to return 0.

I've included a few files to show the current behavior and how it differs from
MATLAB.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Fri 31 Aug 2018 05:13:13 AM UTC  Name: intmodpatch.patch  Size: 831B  
By: gharveymn

<http://savannah.gnu.org/bugs/download.php?file_id=44903>
-------------------------------------------------------
Date: Fri 31 Aug 2018 05:13:13 AM UTC  Name: testmatlab.m  Size: 528B   By:
gharveymn

<http://savannah.gnu.org/bugs/download.php?file_id=44904>
-------------------------------------------------------
Date: Fri 31 Aug 2018 05:13:13 AM UTC  Name: modtest.cpp  Size: 236B   By:
gharveymn

<http://savannah.gnu.org/bugs/download.php?file_id=44905>
-------------------------------------------------------
Date: Fri 31 Aug 2018 05:13:13 AM UTC  Name: testoctave.m  Size: 557B   By:
gharveymn

<http://savannah.gnu.org/bugs/download.php?file_id=44906>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?54602>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]