[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #55682] round(X,N) and round(X,N,type)
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #55682] round(X,N) and round(X,N,type) |
Date: |
Mon, 10 Jun 2024 14:45:25 -0400 (EDT) |
Follow-up Comment #13, bug #55682 (group octave):
In response to comment #12, things are actually a bit easier. There is a
distinction between pure math and numerical computation. And that distinction
can be enormously subtle and hard to navigate. But, round() is a function
provided by Matlab and Octave seeks to be compatible with Matlab. So, we
actually have an easy way to answer the question of what "round (0.15, 1)"
should return which is that it should return the value that the reference
implementation Matlab returns. In this case, that value is 0.2. Similarly,
Both Octave and Matlab rely on the C++ standard library for some reference
functions such as realpow().
10 .^ -5 == 1e-5
returns false in Matlab, but true in Octave on my machine. So, it does depend
on the particular version of C++ libraries and probably compilation options as
well since you report that this returned false for you.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?55682>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #55682] round(X,N) and round(X,N,type), anonymous, 2024/06/10
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- [Octave-bug-tracker] [bug #55682] round(X,N) and round(X,N,type),
Rik <=