The value of the "total value" of the number

I am tired of the value of "total value" in the Java language specification:

Extension of primitive transformations does not lose information about the total value of a numerical value.

Is it "in order of magnitude" or "absolute value"? Or something else?

+6
source share
2 answers

From the Wikipedia article Scale (math) :

In mathematics, a value is the size of a mathematical object, a property by which an object can be compared as more or less than other objects of the same type.

In plain English, the value 32767 is 32767. The value is equivalent to the value of the number.

In the JLS specification, I think they use a value to indicate the number of digits in a number. 32767 is the largest integer that can fit into a signed 16-bit field. If you move 32767 to a bit field with less than 15 bits, that number will no longer be 32767. This is called narrowing. If you move 32767 to a bit field with more than 15 bits (or 16 bits signed), the value 32767 will be saved. This is called an extension.

The order of magnitude is the addition or subtraction of a digit from a number. For example, using the base 10 integers, 32767 is an order of magnitude higher than 3276. 3276 is an order of magnitude higher than 327.

+3
source

Well, here is another attempt at a formal definition.

If f(x) is an expanding transformation, then for each x <= y , f(x) <= f(y) . In other words, expanding conversions preserve a partial order of values.

That which has not lost information about the total value may mean.

The loss of accuracy in this structure means that for some x < y , f(x) = f(y) .


The only problem with this definition is the (float)Double.MAX_VALUE resulting from Float.POSITIVE_INFINITY , which technically fulfills the above criteria, but should not really be considered not to lose information about the total value.

+1
source

All Articles