[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #61319] idivide fails to distinguish between c
From: |
Markus Mützel |
Subject: |
[Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares |
Date: |
Sat, 9 Oct 2021 11:08:41 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36 Edg/94.0.992.38 |
Update of bug #61319 (project octave):
Status: None => Confirmed
Operating System: GNU/Linux => Any
_______________________________________________________
Follow-up Comment #4:
IIUC, for integers smaller flintmax, converting to double and using `fix`,
`floor`, or `ceil` probably works fine.
For larger integers, this does no longer work in general.
I don't understand what you mean by rounding the numerator or denominator
separately. Aren't they already integer for integer input? What would rounding
do in that case?
IIUC, the result of integer division is always rounded to the closest integer.
(At least that is what the docstring of `idivide` says.)
Maybe we could use `rem` or `mod` to detect whether that was rounded up or
down and correct the result accordingly?
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61319>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares, Arun Giridhar, 2021/10/09
- [Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares, Arun Giridhar, 2021/10/09
- [Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares, Michael Leitner, 2021/10/09
- [Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares, anonymous, 2021/10/09
- [Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares,
Markus Mützel <=
- [Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares, Arun Giridhar, 2021/10/09
- [Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares, Markus Mützel, 2021/10/09
- [Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares, Arun Giridhar, 2021/10/09
- [Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares, Michael Leitner, 2021/10/09
- [Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares, Markus Mützel, 2021/10/09