How to represent a double in a boolector model? - smt

I have a boolector model where the variable x has value 0x1000, now I would like to understand if it is possible to represent a number as a floating point or not. If yes can I have an example showing how I should do it please?
Thanks

Unfortunately I confirmed with the boolector team that the fp theory is not supported atm.

Related

kdb - issue with reading floating numbers

I am reading covariance data from flat files. For that reason, not being able to fully read the floating number results in covarince not satisfying positive semi definite requirements.
For instance, this is one of the input from raw text:
“-0.581050672”— no, actually raw text is this: -5.801050672E-01
When I read this into kdb and cast with F, it results in -0.50810507. When I do this for all and check the covariance, unfortunately it does not satisfy PSD constraints. Other hack I have been doing is to add small noise in Identity matrix…
Apart from this hack, is there way to read above data into proper floating number up to 9th digit? I tried \P and .Q.f but these only seem to work in Display.
Thank you
Sorry, does not seem like a kdb issue. Was exporting these data into different software and floating points were lost during this process. Thanks for pointer.

Representation of fixed point number in systemverilog

How should I represent a fixed point number in systemverilog since it doesnt support fixed point numbers for reg and logic.Is using real data type the correct method or can we use any different data type?
I am trying to do a square root function in systemverilog, in which the result will be in FP e.g sqrt(8) = 2.82.
What should be the data type of my inputs and outputs(sqrt) such that I can check the decimal point places correctly while verifying.
You use integral types for fixed point numbers. Some people will index their variables like
logic [M-1:-F] fp_number; // M-bits integer, F bit fractional
But it is up to you to adjust the decimal point when adding different sized numbers as well as adjusting for multiplication and division. There are some OpenCore libraries that have many of these operations for you.

Is it possible to calculate only a part of SHA512 hash? (C#)

I'm trying to solve a keygenme task. I found that there is a ulong value stored as a string. Hash is calculated using SHA512Managed and only 16 bytes of a 128 byte result matters. I need to find such a ulong value stored as a string that gives hash that has 16 specific bytes.
As I understand, SHA algorithm can't be reversed, thus the only possible solution is a brute-force approach. There are 18,446,744,073,709,551,616 possible ulong values which is quite a lot.
So, the question is "is it possible to calculate only 16 bytes oh hash in order to decrease calculation time?".
P.S. If you know another way to solve my task, please tell me. Thank you!
No, it is not. The algorithm rotates values so you cannot leave any part of it out when calculating.
Theoretically you could leave a small part out of the last round but that wouldn't have any real meaning to the time spent brute forcing.

What is the difference between LSB/g , Count/g and mV/g?

I know that all this are used to measure sensitivity in accelerometers. It's easy to understand the concept of mV/g but I didn't find any useful information about LSB/g and Count/g. Is there any relation between them?
Thank you all in advance!
The accelerometer has an analog output in mV. That's converted by an A to D, resulting in a number of some range. (E.g., a 12-bit A to D would give a number between 0 and 4095.) LSB/g and count/g would give the sensitivity of this output number.
See here for an example.

Is QAM the best way to do this?

Sorry about this noob question, because I never work with matlab and signal processing before.
Here is what I want to do: I have a fixed length of byte array X, now I want to encode it to a sound file, I also want this process to be reversible, which means the sound can be converted back to X with no error. I searched online, and found the following code:
M = 16;
x = randint(5000,1,M);
y=modulate(modem.qammod(M),x);
My question is that, is QAM the best way to do this? and how to use it? A little bit code example will be really appreciated, Thank you!
update#1: I tried to output y by sound(y), but matlab does not allow me to do so, it says I can only output floating numbers. How can I solve this? Thank you!
If you need to transmit over the air, you have quiet a lot of work in front of you I think. The most difficult problem to solve in a telecommunications system is often synchronization, meaning that your receiver will have to know where the QAM symbols are placed in time. This is not easy. If you choose to go ahead I agree with mtrw that you should try dsp.stackexchange.com.
Try for example to imaging a simple modulation scheme where each bit is converted to a short piece of sine with the frequency depending on whether the bit is one or zero. How would you go about decoding this on the receiver end? You need to detect the onset of the first bit and have some self maintaining clock running for synchronization on the receiver to find bits in case they do not change, aka a PLL (Phase Locked Loop). This could possibly be made easier by using manchester coding, but you would still have to do quite a lot to get it running.
As you see, there are no easy solutions when you leave the save Matlab harbor :-)
Best regards