[L2Ork-dev] PD_BIGORSMALL

Jonathan Wilkes jon.w.wilkes at gmail.com
Sun May 20 22:44:15 EDT 2018


On Sun, May 13, 2018 at 7:02 PM, Jonathan Wilkes <jon.w.wilkes at gmail.com> wrote:
> On Sun, May 13, 2018 at 3:39 PM, Matt Barber <brbrofsvl at gmail.com> wrote:
>> Much of that is already taken care of in m_pd.h
>
> Ha! I forgot to search for it before asking that.
>
> Ok, int32_t sounds like the way to go then.

A few more questions:

1. Shouldn't it be uint32_t? Does the right shift make any difference given
we're not caring about the sign in this test? Will that trigger evil compilers
to format the harddrive? (Not sure what is defined behavior wrt to ints...)

2. The comment next to PD_BADFLOAT:
// test for NANs, infs and denormals

But that test is only for NANs and INFs, no?

3. Comment for PD_BIGORSMALL:
 // > abs(2^64) or < abs(2^-64)

But those are off by one-- it should be:
// > abs(2^65) or < abs(2^-63)

Isn't that correct given the way the exponent bias works on IEEE 754 floats?

4. Just curious-- why the choice of 0x20000000 for the cutoff?

Thanks,
Jonathan


More information about the L2Ork-dev mailing list