[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #58956] Empty plot for certain xlim / ylim set

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 =
>> single(1e+11 + 2.0) - single(1e+11 - 2.0)
ans =
>> single(1e+6 + 2.0) - single(1e+6 - 2.0)
ans =

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:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]