Skip to content

How to get raw representation (as given by hex()) from an Fxp #37

Answered by francof2a
aniongithub asked this question in Q&A
Discussion options

You must be logged in to vote

Hello Ani, first let me convert this issue to a discussion.

I guess you need get the int value which represents the raw value of the fixed-point. In that case, you can use raw method.

from fxpmath import Fxp

x = Fxp(0.25, dtype='s8.8')
x.raw() # returns 64 as raw value

If my assumption is wrong, please write an example with the desired output.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by francof2a
Comment options

You must be logged in to vote
1 reply
@francof2a
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #36 on July 29, 2021 19:42.