|
| From: | Markus Mützel |
| Subject: | [Octave-bug-tracker] [bug #58956] Empty plot for certain xlim / ylim settings |
| Date: | Mon, 7 Sep 2020 03:21:01 -0400 (EDT) |
| User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36 Edg/85.0.564.44 |
Follow-up Comment #11, bug #58956 (project octave):
That might be far fetched: But most of OpenGL "is" single precision. The
interface to glOrtho uses ´double´, but it might be that these values are
cast to ´float´ somewhere for its calculations.
Depending on where this conversion happens, it might be necessary that
"nearVal" and "farVal" must be different in single precision to avoid a
division by 0 (or something similar):
>> single((1e+11 + 2.0) - (1e+11 - 2.0))
ans =
4
>> single(1e+11 + 2.0) - single(1e+11 - 2.0)
ans =
0
>> single(1e+6 + 2.0) - single(1e+6 - 2.0)
ans =
4
Maybe we should make sure that "nearVal" and "farVal" differ on the 23-bit
mantissa of a single precision floating point number?
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58956>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
| [Prev in Thread] | Current Thread | [Next in Thread] |