Skip to content

Strange evaluation-time error when comparing two FloatingPoint values #711

Answered by quark17
RyanGlScott asked this question in Q&A
Discussion options

You must be logged in to vote

They are not equivalent because, in one, the inputs are constants that are known (statically) at compile time and, in the other, the inputs come from registers who values are only known (dynamically) at runtime of the hardware. The reset value of 0.0 to the registers does not matter; BSC must assume that the registers could contain any possible values, including NaN values. (In theory, maybe BSC could perform "model checking" to detect what states can be reached, but BSC does not currently do that.) When the input is statically known, BSC can pick the right case-arm and only evaluate that. However, when the input is not known at compile time, BSC must generate the hardware for all possibl…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@RyanGlScott
Comment options

@rsnikhil
Comment options

@RyanGlScott
Comment options

Answer selected by RyanGlScott
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants