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

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

[Octave-bug-tracker] [bug #43734] Problem in chop.m


From: Avinoam Kalma
Subject: [Octave-bug-tracker] [bug #43734] Problem in chop.m
Date: Mon, 01 Dec 2014 22:39:18 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36

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

                 Summary: Problem in chop.m
                 Project: GNU Octave
            Submitted by: avinoam
            Submitted on: Mon 01 Dec 2014 10:39:17 PM GMT
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Avinoam
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.8.2
        Operating System: Microsoft Windows

    _______________________________________________________

Details:


Hi,

in Octave ver. 3.8.2, in Microsoft Windows, 
chop.m fails in 9 of 10 tests, while in linux it passes all the
tests.

The reason is probably fom the fact the in windows version
10^(-n) - 1./10^n 
is not equal zero.

changing the line 

deflate = 10 .^ (tmp - ndigits);
to 
deflate = 1./inflate;

solve this problem, and chop.m passes all the tests.
Please check this.

A patch is attached.

Avinoam





    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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