[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #61319] idivide fails to distinguish between c
From: |
Michael Leitner |
Subject: |
[Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares |
Date: |
Mon, 21 Feb 2022 14:06:15 -0500 (EST) |
Follow-up Comment #13, bug #61319 (project octave):
Markus, you are missing the x(y_sel) instead of x in the "floor" case. Apart
from that, it looks correct.
Yes, integer division is slower than floating-point division. But note that
C99 and later specifies that integer division rounds towards zero, that is,
what here seems to be the "fix" option. C++ (what octave is written in) seems
to be the same. However, octave integer division per default does what the
"round" mode does, thus there has to be some post-processing to be done on the
result of x/y (on the C++ level). What I do not get now is why it is not even
slower. On the other hand, there should be a way to speed up the "fix" case:
just use C++ integer division without the post-processing. Or am I missing the
point somewhere?
_______________________________________________________
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, Gaël Bonithon, 2022/02/20
- [Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares, Gaël Bonithon, 2022/02/21
- [Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares, Markus Mützel, 2022/02/21
- [Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares,
Michael Leitner <=
- [Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares, Markus Mützel, 2022/02/21
- [Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares, Michael Leitner, 2022/02/21
- [Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares, Markus Mützel, 2022/02/22
- [Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares, Michael Leitner, 2022/02/22
- [Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares, Gaël Bonithon, 2022/02/22
- [Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares, Gaël Bonithon, 2022/02/23
- [Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares, Michael Leitner, 2022/02/23
- [Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares, Gaël Bonithon, 2022/02/23
- [Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares, Markus Mützel, 2022/02/26
- [Octave-bug-tracker] [bug #61319] idivide fails to distinguish between ceil and floor for inputs close to perfect squares, Gaël Bonithon, 2022/02/27