[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #32924] lcm yields wrong results
From: |
Jordi Gutiérrez Hermoso |
Subject: |
[Octave-bug-tracker] [bug #32924] lcm yields wrong results |
Date: |
Mon, 28 Mar 2011 14:06:26 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20110109 Riverdragon/3.6.13 (like Firefox/3.6.13) |
Follow-up Comment #4, bug #32924 (project octave):
Octave is a numerical computing environment. Hardware floats are the native
type, and the user is thus expected to know about the limitations of hardware
floats. The reason why it's using hardware floats is for speed, and the reason
why many operations are unchecked is also for speed.
Octave has many other functions that silently return incorrect results if the
user inputs incorrect values. For example, try tan(pi/2), sin(pi), or 0.3 -
0.2 - 0.1. All of these silently give incorrect results due to the limitations
of hardware floats. Or try gamma(-1), which really should give NaN, not inf,
as the limit around that simple pole doesn't exist.
Like I said before, lcm is meant as a simple convenience, not a powerful
number theory function, because Octave is not a symbolic computation nor a
number theoretical environment. Building in checks into lcm would slow the
function down, because the principal aim here is speed, not correctness. It is
up to the user to not give the function incorrect values and not use integers
larger than what can be represented with a double.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?32924>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #32924] lcm yields wrong results, Jordi Gutiérrez Hermoso, 2011/03/27
- [Octave-bug-tracker] [bug #32924] lcm yields wrong results, Rik, 2011/03/27
- Message not available
- [Octave-bug-tracker] [bug #32924] lcm yields wrong results,
Jordi Gutiérrez Hermoso <=
- [Octave-bug-tracker] [bug #32924] lcm yields wrong results, Cornelius, 2011/03/28
- [Octave-bug-tracker] [bug #32924] lcm yields wrong results, Cornelius, 2011/03/28
- [Octave-bug-tracker] [bug #32924] lcm yields wrong results, Cornelius, 2011/03/28
- [Octave-bug-tracker] [bug #32924] lcm yields wrong results, Cornelius, 2011/03/28
- [Octave-bug-tracker] [bug #32924] lcm does not warn when losing precision, Jordi Gutiérrez Hermoso, 2011/03/28