[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: |
Mon, 21 Feb 2022 13:40:21 -0500 (EST) |
Follow-up Comment #12, bug #61319 (project octave):
Thanks! I haven't tested thoroughly. But I can also see the slowdown here.
I believe that integer arithmetic is always a bit slower than floating point
arithmetic. So, most probably we'll need to live with some slow-down if we
want to fix this bug.
Nevertheless, it might be possible to get rid of some multiplications and
calls to the `sign` and `abs` function.
With the attached modifications to your patch the function is a bit faster for
the "ceil" and "floor" cases (albeit not as fast as we were with the floating
point division).
Maybe something similar is possible for the "fix" case.
I haven't put much thought into this admittedly. So, please check if this
still does the right thing...
(file #52898)
_______________________________________________________
Additional Item Attachment:
File name: bug61319-v2.patch Size:2 KB
<https://file.savannah.gnu.org/file/bug61319-v2.patch?file_id=52898>
_______________________________________________________
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 <=
- [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/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