Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xmm_int32_q #9

Open
jrmwng opened this issue Nov 19, 2015 · 0 comments
Open

xmm_int32_q #9

jrmwng opened this issue Nov 19, 2015 · 0 comments

Comments

@jrmwng
Copy link
Owner

jrmwng commented Nov 19, 2015

fixed-pointer number

xmm_int32_q<4, 16, 30> xmmQ(1.0F/16.0F, 1.0F/65536.0F, 1.0F/(1024.0F * 1024.0F * 1024.0F));

assert(get_int<0>(xmmQ) == 1); // Q28.4
assert(get_int<1>(xmmQ) == 1); // Q16.16
assert(get_int<2>(xmmQ) == 1); // Q2.30

assert(get_float<0>(xmmQ) == 1.0F / 16.0F);
assert(get_float<1>(xmmQ) == 1.0F / 65536.0F);
assert(get_float<2>(xmmQ) == 1.0F / (1024.0F * 1024.0F * 1024.0F));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant