[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #54220] rats() function returns wrong result
From: |
Ales Berkopec |
Subject: |
[Octave-bug-tracker] [bug #54220] rats() function returns wrong result |
Date: |
Sun, 1 Jul 2018 10:02:30 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 |
URL:
<http://savannah.gnu.org/bugs/?54220>
Summary: rats() function returns wrong result
Project: GNU Octave
Submitted by: johntheoe
Submitted on: Sun 01 Jul 2018 02:02:28 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: JohnTheOE
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: other
Operating System: GNU/Linux
_______________________________________________________
Details:
I found a case of input data for which rats() function returns wrong result.
Numbers 1620 and 12019 have no common factors (computed correctly with
factor() function, see code below), but the result of rats(1620/12019) is
439/3257. The result is not completely off. It agrees with the correct value
up to 6th decimal place.
octave:4> rats(1620/12019)
ans = 439/3257
octave:5> factor(1620)
ans =
2 2 3 3 3 3 5
octave:6> factor(12019)
ans =
7 17 101
octave:10> 1620/12019
ans = 0.134786587902488
octave:11> 439/3257
ans = 0.134786613447958
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?54220>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #54220] rats() function returns wrong result,
Ales Berkopec <=