Finding the pattern in a set of values

  • Thread starter martix
  • Start date
  • Tags
    Set
In summary: This was very helpful.In summary, the data was in little endian and there were a lot of zeros before those values in every structure they were present so that might have been it.
  • #1
martix
168
4
I have this set of binary values, but the way to arrive at them remains a mystery. I would appreciate some help on that issue.
Code:
Value(LEndian)	Start Diff	Prev Diff	Resulting Multiplier
16256		+0		+0		1
16272		+16		+16		1.125
16288		+32		+16		1.25
16320		+64		+32		1.5
16384		+128		+64		2
16512		+256		+128		4
16640		+384		+128		8
16768		+512		+128		16
16896		+640		+128		32
The question being how do you arrive at the corresponding multiplier from the given value.
 
Technology news on Phys.org
  • #2
Hi martix! :smile:

Your Value is the 'single precision' float representation of your Resulting Multiplier.
Or to be more precise, only the top two bytes that should be in there.
See this wiki page for details: http://en.wikipedia.org/wiki/Single_precision

If you want a formula, it's:
[tex]Multiplier = (1 + \frac {Value \textrm{ MOD } 128} {128}) \cdot 2^{Value \textrm{ DIV } 128 - 127}[/tex]
In this formula MOD means to take the remainder after division.
And DIV means to take the integer part after division.

Btw, you missed 2 bytes in your Value. It's supposed to be a 4 byte value.
Those 2 bytes would have been zero for the numbers you've put into your table.
But the consequence would be that the numbers in your Value column should actually be 65536 times as large.
 
Last edited:
  • #3
Those values are the 16 most significant bits of single precision (32 bit floating point) numbers:

Code:
multiplier      hex      decimal   hex   value
 1.0000 => 3f800000 = 1065353216  3f80 = 16256
 1.1250 => 3f900000 = 1066401792  3f90 = 16272
 1.2500 => 3fa00000 = 1067450368  3fa0 = 16288
 1.5000 => 3fc00000 = 1069547520  3fc0 = 16320
 2.0000 => 40000000 = 1073741824  4000 = 16384
 4.0000 => 40800000 = 1082130432  4080 = 16512
 8.0000 => 41000000 = 1090519040  4100 = 16640
16.0000 => 41800000 = 1098907648  4180 = 16768
32.0000 => 42000000 = 1107296256  4200 = 16896
 
Last edited:
  • #4
rcgldr said:
Those aren't single (32-bit) numbers. For single precision numbers:

Divide your numbers by 65536 and you'll find a match.

Actually, I had just edited my previous post to explain that. ;)
 
  • #5
I like Serena said:
Divide your numbers by 65536 and you'll find a match.
Actually, I had just edited my previous post to explain that.
Was in the process of updating my post, it's fixed now.
 
  • #6
rcgldr said:
Was in the process of updating my post, it's fixed now.

Nice table! It clarifies quite neatly what is going on. :smile:
 
  • #7
I just had a massive FACEPALM. How I didn't see that I have no idea.
The data was in little endian and there were a lot of zeros before those values in every structure they were present so that might have been it.

Anyway, thank you very much!
 

Related to Finding the pattern in a set of values

1. How do you determine the pattern in a set of values?

To determine the pattern in a set of values, you can analyze the data by looking for repeated values or trends. You can also plot the data on a graph to visually identify any patterns.

2. What are some common types of patterns in a set of values?

Some common types of patterns in a set of values include linear, exponential, and periodic patterns. Linear patterns show a constant increase or decrease in values, exponential patterns show a rapid increase or decrease, and periodic patterns show a repeating cycle.

3. How can finding the pattern in a set of values be useful?

Finding the pattern in a set of values can be useful for making predictions and identifying relationships between variables. It can also help in making informed decisions and understanding trends in the data.

4. Can there be more than one pattern in a set of values?

Yes, there can be multiple patterns in a set of values. It is important to thoroughly analyze the data to identify all possible patterns and understand their relationships.

5. What techniques can be used to find the pattern in a set of values?

Some techniques that can be used to find the pattern in a set of values include visual inspection, calculation of averages and rates of change, and statistical analysis. You can also use software programs or data visualization tools to aid in the identification of patterns.

Similar threads

Replies
1
Views
932
Replies
1
Views
1K
Replies
23
Views
5K
  • General Discussion
Replies
1
Views
3K
  • General Math
2
Replies
35
Views
3K
Replies
5
Views
2K
Replies
4
Views
2K
Back
Top