[PATCH] math: Add ilogb ported from amd-builtins

The scalar float/double function bodies are a direct copy/paste
with usage of the CLC wrappers to vectorize them.

Signed-off-by: Aaron Watry <awatry@gmail.com>

The scalar float/double function bodies are a direct copy/paste
with usage of the CLC wrappers to vectorize them.

LGTM.

The scalar float/double function bodies are a direct copy/paste
with usage of the CLC wrappers to vectorize them.

Signed-off-by: Aaron Watry <awatry@gmail.com>
---
These have been tested using the tests I just sent to the piglit
list.

Those tests only handle float, and ignore the ilogb(0) and ilogb(nan)
cases due to
the fact that ilogb(0||nan) can return either MAX_INT or MIN_INT
depending on the
implementation's desires.

shouldn't we add FP_ILOGB0 FP_ILOGNAN macros that go with this
implementation?

> The scalar float/double function bodies are a direct copy/paste
> with usage of the CLC wrappers to vectorize them.
>
> Signed-off-by: Aaron Watry <awatry@gmail.com>
> ---
> These have been tested using the tests I just sent to the piglit
> list.
>
> Those tests only handle float, and ignore the ilogb(0) and ilogb(nan)
> cases due to
> the fact that ilogb(0||nan) can return either MAX_INT or MIN_INT
> depending on the
> implementation's desires.

shouldn't we add FP_ILOGB0 FP_ILOGNAN macros that go with this
implementation?

Yeah, I guess we can do that now as well.

--Aaron