<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 20, 2018 at 10:44 PM, Jonathan Wilkes <span dir="ltr"><<a href="mailto:jon.w.wilkes@gmail.com" target="_blank">jon.w.wilkes@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="gmail-">On Sun, May 13, 2018 at 7:02 PM, Jonathan Wilkes <<a href="mailto:jon.w.wilkes@gmail.com">jon.w.wilkes@gmail.com</a>> wrote:<br>
> On Sun, May 13, 2018 at 3:39 PM, Matt Barber <<a href="mailto:brbrofsvl@gmail.com">brbrofsvl@gmail.com</a>> wrote:<br>
>> Much of that is already taken care of in m_pd.h<br>
><br>
> Ha! I forgot to search for it before asking that.<br>
><br>
> Ok, int32_t sounds like the way to go then.<br>
<br>
</span>A few more questions:<br>
<br>
1. Shouldn't it be uint32_t? Does the right shift make any difference given<br>
we're not caring about the sign in this test? Will that trigger evil compilers<br>
to format the harddrive? (Not sure what is defined behavior wrt to ints...)<br></blockquote><div><br></div><div><div class="gmail_default" style="font-family:verdana,sans-serif">​Yes, uint32_t is best for any kind of type punning.​</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
2. The comment next to PD_BADFLOAT:<br>
// test for NANs, infs and denormals<br>
<br>
But that test is only for NANs and INFs, no?<br></blockquote><div><br></div><div><div class="gmail_default" style="font-family:verdana,sans-serif">​Yes only NaN and INF.​</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
3. Comment for PD_BIGORSMALL:<br>
 // > abs(2^64) or < abs(2^-64)<br>
<br>
But those are off by one-- it should be:<br>
// > abs(2^65) or < abs(2^-63)<br>
<br>
Isn't that correct given the way the exponent bias works on IEEE 754 floats?<br></blockquote><div><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">​Yes.​ PD_BIGORSMALL is true if both the first two exponent bits are set or both are unset, so technically abs(f) >= 2^65 or abs(f) < 2^-63</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
4. Just curious-- why the choice of 0x20000000 for the cutoff?<br></blockquote><div><br></div><div><div class="gmail_default" style="font-family:verdana,sans-serif">​Because it's very fast and gets a reasonable range for high and low that are roughly inverse magnitude.​</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thanks,<br>
<div class="gmail-HOEnZb"><div class="gmail-h5">Jonathan<br>
______________________________<wbr>_________________<br>
L2Ork-dev mailing list<br>
<a href="mailto:L2Ork-dev@disis.music.vt.edu">L2Ork-dev@disis.music.vt.edu</a><br>
<a href="https://disis.music.vt.edu/listinfo/l2ork-dev" rel="noreferrer" target="_blank">https://disis.music.vt.edu/<wbr>listinfo/l2ork-dev</a></div></div></blockquote></div><br></div></div>