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

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

[Octave-bug-tracker] [bug #31872] mod/rem innacurate for non-integer rea


From: Rik
Subject: [Octave-bug-tracker] [bug #31872] mod/rem innacurate for non-integer real values
Date: Tue, 14 Dec 2010 04:48:08 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101206 Ubuntu/9.10 (karmic) Firefox/3.6.13

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

                 Summary: mod/rem innacurate for non-integer real values
                 Project: GNU Octave
            Submitted by: rik5
            Submitted on: Mon 13 Dec 2010 08:48:07 PM PST
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

There appears to be an implicit cast to 'single' in the calculation of
mod/rem for non-integer real values.


format long
mod (2.1, 0.2)
ans =  0.100000001490116
2.1 - 0.2*fix (2.1/0.2)
ans =  0.100000000000000
single(0.1)
ans =  0.100000001490116






    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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